Storefront API Documentation
SCAYLE Storefront API is a REST API used to access your product data in any customer-facing application. Some common scenarios include retrieving campaigns, promotions, categories or configuration. You can also use it to save baskets or wishlists for individual customers and filter and search products.
Core concepts of the Storefront API are: Variant: Any distinct sellable item, for example: a blue colored shirt in size L. Available quantity/stock information is always on variant level. Product: A product is a collection of one or more variants with some shared attributes, for example: A blue colored shirt (product) available in different sizes (variants). A product will be sold out when all its variants are sold out. Sibling: A product closely related to another product, for example, the same shirt by the same brand, but in another color. Category: Each product can be assigned to one or more category nodes in the category tree. Attribute: Attributes are, for example, size, material, color. Attributes can be assigned to product level or variant level. Filter: Any criteria available to filter a list of products, for example: an attribute or a category. Basket: The basket holds variants that a customer intends to buy and has added to his shopping cart. Wishlist: Customers can add variants to a wishlist to remember them or buy them later.
Requests Base URL: https://{{tenant-space}}.storefront.api.scayle.cloud
Authentication
- Generate access token in the SCAYLE Panel > Shops > Storefront > API Keys.
- Provide the generated access token in the X-Access-Token Header
Note: After the token is generated in the SCAYLE Panel, it can take some time for changes to take effect.
Rate-Limiting Headers
SCAYLE Storefront API enforces a rate-limiting policy to manage the number of requests a client can make within a defined time window. Each response may include the following headers to provide users with their current rate-limit status:
X-RateLimit-Limit: Indicates the maximum number of allowed API requests for the current period, specific to the tenant's rate limit.X-RateLimit-Remaining: Shows the remaining number of API requests allowed within the current period, specific to the tenant's rate limit.X-RateLimit-Reset: The date and time when the current rate-limit window will reset.X-RateLimit-Scope: Specifies the scope of the rate limit as it applies to the tenant, e.g.,global.
If a tenant exceeds its allowed limit, the response status code will be 429 Too Many Requests.