docs
  1. SCAYLE Resource Center
  2. Authentication & Accounts
  3. Account area

Account area

Overview

SCAYLE provides multiple backend APIs which you can use to build your account area.

Depending on your needs you can also combine different APIs by e.g. fetching an orderId from the Customer Account API and using the same ID to fetch the full order via the Admin API.

Before you start

You need to have a valid accessToken for the current user in order to load the customer profile. Please refer to the Checkout Authentication API guide for more detailed information.

Customer Account API

Customer profile

To use the /api/oauth/me endpoint within your shop backend integration, the accessToken must be used as Authorization bearer token for calls to the Checkout API.

curl --location --request GET 'https://{{tenant-space}}.checkout.api.scayle.cloud/api/oauth/me' \
  --header 'Content-Type: application/json' \
  --header 'X-Shop-Id: {{shopId}}' \
  --header 'Authorization: Bearer {{accessToken}}'

For details please refer to the endpoint specification.

Orders

To display a list of past orders, you need to fetch the /api/oauth/me endpoint as well and parse the orderSummary property of the response.

For each order in that list you can then use one of the available API endpoints to fetch the order details:

Past orders

To display a list of past orders, you need to fetch the /api/oauth/me endpoint as well and parse the orderSummary property of the response. For each order in that list you can then use one of the availableAPI endpoints to fetch the order details: