docs
  1. Resources
  2. Baskets
  3. Apply Multiple Item Operations

Apply multiple item operations

{{version}}
OpenAPI 3.1.0

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

  1. Generate access token in the SCAYLE Panel > Shops > Storefront > API Keys.
  2. 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.

Server:https://{tenant-space}.storefront.api.scayle.cloud
Client Libraries

baskets

​

Manage baskets

Apply multiple item operations

​

Applies an ordered list of add / update / remove operations to a basket within a single lock acquisition. Each operation behaves like the equivalent single-item request.

Operations are applied in array order and evaluated independently: a failing operation does not prevent later operations from being applied. results[n] describes operations[n], including when it failed.

A request that fails validation, including a single malformed operation, is rejected with 400 and no operation is applied.

update and remove can only target items that existed before the request. Item keys are server-generated, so an item added by this request cannot be referenced by a later operation in the same request.

If the basket does not exist yet, the request creates it, just like adding a single item does. The operations then run on the new, empty basket, so an update or remove fails with ITEM_NOT_FOUND.

Fewer units than requested

When stock or a shop category limit allows fewer units than an add or update asks for, the operation still succeeds with the allowed quantity:

  • results[n].status is success, and the response stays 200 unless another operation failed.
  • results[n].quantity is the quantity actually applied.
  • results[n].requestedQuantity is the quantity that was asked for. It is present only in this case.

Compare the two to tell the shopper that fewer units were added. The single-item endpoints answer 206 in this case instead.

An update into a shop category that is already full also succeeds: quantity is the item's unchanged quantity and requestedQuantity the quantity that was asked for. The single-item endpoint answers 413 in this case. An add into a full category fails with CATEGORY_LIMIT_EXCEEDED.

Path Parameters

  • The ID of the Basket

Query Parameters

  • The numeric ID of the shop to resolve the request against. Every shop in a multi-shop setup has a unique shopId.

    Priority: shopId (or the X-Shop-Id header) takes precedence over all other shop identification parameters. When shopId is present, shopKey, countryCode, and locale are ignored entirely.

    Alternative: If neither shopId nor X-Shop-Id is provided, you must supply all three of shopKey, countryCode, and locale together to identify the shop.

  • The unique string key identifying the shop (e.g. sa, de).

    Must be provided together with countryCode and locale as a query-parameter alternative to shopId. All three parameters are mandatory when using this identification method — omitting any one of them results in a validation error.

    Ignored when shopId or the X-Shop-Id header is present.

  • The ISO 3166-1 alpha-2 country code of the shop (e.g. DE, AT). Automatically normalised to uppercase.

    Must be provided together with shopKey and locale as a query-parameter alternative to shopId. All three parameters are mandatory when using this identification method — omitting any one of them results in a validation error.

    Ignored when shopId or the X-Shop-Id header is present.

  • The locale of the shop (e.g. en_GB, de_DE). Used to validate that the resolved shop's locale matches the requested locale.

    Must be provided together with shopKey and countryCode as a query-parameter alternative to shopId. All three parameters are mandatory when using this identification method — omitting any one of them results in a validation error.

    Ignored when shopId or the X-Shop-Id header is present.

  • Adjust prices based on the specified campaignKey. If provided campaign doesn't exist, the default price is returned.

    Please note, that campaign prices are stored in advance and available earlier than the campaign starts.

  • If includeItemsWithoutProductData is set to true, basket items will be included even if there is no product information available (items.product and items.variant might be empty).

  • Adjust product and variant price based on the specified pricePromotionKey. If the variant does not have a matching price promotion, the default price is returned. This does not apply to the returned basket price. It only applies to the product and variant information under each basket item.

  • This parameter allows disabling the availability check when adding an item into the wishlist or basket. This is needed to make sure that sold out products can be reserved via Click & Reserve in retail stores.

  • Include related resources, for example, the attributes of a product can be included using with=items.product.attributes. Multiple filter values are separated by a pipe, e.g., with=items.product.attributes:key(color\|size). Custom data of items, item promotions, applicable promotions, products, images, videos, variants and merchants is returned in full by default, so only its customData:key(keyA\|...) filter is listed.

    The following table describes all the possible parameters that can be used:

    Parameter Description
    applicablePromotions Include promotions that can be applied to the basket.
    applicablePromotions.customData:key(keyA|...) Include custom data of applicable promotions with only specified keys.
    items.customData:key(keyA|...) Include custom data of basket items with only specified keys.
    items.product.attributes Include attributes of the product.
    items.product.attributes:key(keyA|...) Return only the attributes matching the specified names, e.g., with=items.product.attributes:key(ean).
    items.product.attributes:exclude(keyA|...) Return all attributes except the specified names, e.g., with=items.product.attributes:exclude(brand). Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.product.attributes:type(typeA|...) Return only the attributes matching the specified types, e.g., with=items.product.attributes:type(fit_size).
    items.product.advancedAttributes Include advanced attributes of the product.
    items.product.advancedAttributes:key(keyA|...) Return only the advanced attributes matching the specified names, e.g., with=items.product.advancedAttributes:key(productName).
    items.product.advancedAttributes:exclude(keyA|...) Return all advanced attributes except the specified names, e.g., with=items.product.advancedAttributes:exclude(description). Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.product.advancedAttributes:type(typeA|...) Return only the advanced attributes matching the specified types, e.g., with=items.product.advancedAttributes:type(material_care).
    items.product.images.attributes Include attributes of each product image.
    items.product.images.attributes:key(keyA|...) Return only the image attributes matching the specified names, e.g., with=items.product.images.attributes:key(plusSize).
    items.product.images.attributes:exclude(keyA|...) Return all image attributes except the specified names, e.g., with=items.product.images.attributes:exclude(brand). Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.product.images.attributes:type(typeA|...) Return only the image attributes matching the specified types, e.g., with=items.product.images.attributes:type(material_care).
    items.product.images.customData:key(keyA|...) Include custom data of each product image with only specified keys.
    items.product.videos Include videos of the product.
    items.product.videos.attributes Include attributes of each product video.
    items.product.videos.attributes:key(keyA|...) Return only the video attributes matching the specified names, e.g., with=items.product.videos.attributes:key(plusSize).
    items.product.videos.attributes:exclude(keyA|...) Return all video attributes except the specified names, e.g., with=items.product.videos.attributes:exclude(brand). Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.product.videos.attributes:type(typeA|...) Return only the video attributes matching the specified types, e.g., with=items.product.videos.attributes:type(material_care).
    items.product.videos.customData:key(keyA|...) Include custom data of each product video with only specified keys.
    items.product.definingAttributes Include defining attributes of the product.
    items.product.categories Include categories of the product.
    items.product.categories:hidden(true) Return also the hidden categories.
    items.product.categories.categoryProperties:name(keyA|...) Return only the category properties matching, e.g., with=items.product.categories.categoryProperties:name(gender_female).
    items.product.categories.countryLevelCustomData Include country-level custom data of the category.
    items.product.categories.countryLevelCustomData:key(keyA|...) Include country-level custom data of the category with only specified keys.
    items.product.categories.shopLevelCustomData Include shop-level custom data of the category.
    items.product.categories.shopLevelCustomData:key(keyA|...) Include shop-level custom data of the category with only specified keys.
    items.product.customData:key(keyA|...) Include custom data of the product with only specified keys.
    items.product.siblings Include sibling products.
    items.product.siblings.attributes Include attributes of sibling products.
    items.product.siblings.attributes:key(keyA|...) Return only the sibling product attributes matching the specified names, e.g., with=items.product.siblings.attributes:key(ean).
    items.product.siblings.attributes:exclude(keyA|...) Return all sibling product attributes except the specified names, e.g., with=items.product.siblings.attributes:exclude(brand). Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.product.siblings.attributes:type(typeA|...) Return only the sibling product attributes matching the specified types, e.g., with=items.product.siblings.attributes:type(fit_size).
    items.product.siblings.advancedAttributes Include advanced attributes of sibling products.
    items.product.siblings.advancedAttributes:key(keyA|...) Return only the sibling product advanced attributes matching the specified names, e.g., with=items.product.siblings.advancedAttributes:key(productName).
    items.product.siblings.advancedAttributes:exclude(keyA|...) Return all sibling product advanced attributes except the specified names, e.g., with=items.product.siblings.advancedAttributes:exclude(description). Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.product.siblings.advancedAttributes:type(typeA|...) Return only the sibling product advanced attributes matching the specified types, e.g., with=items.product.siblings.advancedAttributes:type(material_care).
    items.product.siblings.customData:key(keyA|...) Include custom data of sibling products with only specified keys.
    items.product.siblings.categories Include categories of sibling products.
    items.product.siblings.categories:hidden(true) Return also the hidden categories of sibling products.
    items.product.siblings.categories.countryLevelCustomData Include country-level custom data of sibling product categories.
    items.product.siblings.categories.countryLevelCustomData:key(keyA|...) Include country-level custom data of sibling product categories with only specified keys.
    items.product.siblings.categories.shopLevelCustomData Include shop-level custom data of sibling product categories.
    items.product.siblings.categories.shopLevelCustomData:key(keyA|...) Include shop-level custom data of sibling product categories with only specified keys.
    items.product.siblings.masterCategories Include master categories of sibling products.
    items.product.siblings.definingAttributes Include defining attributes of sibling products.
    items.product.siblings.lowestPriorPrice Include the lower prior price of sibling products.
    items.product.siblings.sellableTimeframe Include the sellable timeframe of sibling products.
    items.product.siblings.variants Include variants of sibling products.
    items.product.siblings.variants.attributes Include attributes of sibling product variants.
    items.product.siblings.variants.attributes:key(keyA|...) Return only sibling product variant attributes matching the specified names, e.g., with=items.product.siblings.variants.attributes:key(ean).
    items.product.siblings.variants.attributes:exclude(keyA|...) Return all sibling product variant attributes except the specified names, e.g., with=items.product.siblings.variants.attributes:exclude(brand). Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.product.siblings.variants.attributes:type(typeA|...) Return only sibling product variant attributes matching the specified types, e.g., with=items.product.siblings.variants.attributes:type(fit_size).
    items.product.siblings.variants.advancedAttributes Include advanced attributes of sibling product variants.
    items.product.siblings.variants.advancedAttributes:key(keyA|...) Return only sibling product variant advanced attributes matching the specified names, e.g., with=items.product.siblings.variants.advancedAttributes:key(productName).
    items.product.siblings.variants.advancedAttributes:exclude(keyA|...) Return all sibling product variant advanced attributes except the specified names, e.g., with=items.product.siblings.variants.advancedAttributes:exclude(description). Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.product.siblings.variants.advancedAttributes:type(typeA|...) Return only sibling product variant advanced attributes matching the specified types, e.g., with=items.product.siblings.variants.advancedAttributes:type(material_care).
    items.product.siblings.variants.customData:key(keyA|...) Include custom data of sibling product variants with only specified keys.
    items.product.siblings.variants.price.customData Include custom data of sibling product variant prices.
    items.product.siblings.variants.price.customData:key(keyA|...) Include custom data of sibling product variant prices with only specified keys.
    items.product.siblings.variants.lowestPriorPrice Include sibling product variants lowestPriorPrice.
    items.product.siblings.priceRange Include information about the price range of sibling products.
    items.product.siblings.priceRange.customData Include custom data of the sibling product price range.
    items.product.siblings.priceRange.customData:key(keyA|...) Include custom data of the sibling product price range with only specified keys.
    items.product.siblings.reductionRange Include information about the reduction range of sibling products.
    items.product.siblings.reductionRange.customData Include custom data of the sibling product reduction range.
    items.product.siblings.reductionRange.customData:key(keyA|...) Include custom data of the sibling product reduction range with only specified keys.
    items.product.siblings.variants.merchant Include merchant of sibling product variants.
    items.product.siblings.variants.merchant.customData:key(keyA|...) Include merchant custom data of sibling product variants with only specified keys.
    items.product.siblings.images.attributes Include attributes of sibling product images.
    items.product.siblings.images.attributes:key(keyA|...) Return only the sibling product image attributes matching the specified names, e.g., with=items.product.siblings.images.attributes:key(plusSize).
    items.product.siblings.images.attributes:exclude(keyA|...) Return all sibling product image attributes except the specified names, e.g., with=items.product.siblings.images.attributes:exclude(brand). Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.product.siblings.images.attributes:type(typeA|...) Return only the sibling product image attributes matching the specified types, e.g., with=items.product.siblings.images.attributes:type(material_care).
    items.product.siblings.images.customData:key(keyA|...) Include custom data of sibling product images with only specified keys.
    items.product.siblings.videos Include videos of sibling products.
    items.product.siblings.videos.attributes Include attributes of each sibling product video.
    items.product.siblings.videos.attributes:key(keyA|...) Return only the sibling product video attributes matching the specified names.
    items.product.siblings.videos.attributes:exclude(keyA|...) Return all sibling product video attributes except the specified names. Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.product.siblings.videos.attributes:type(typeA|...) Return only the sibling product video attributes matching the specified types.
    items.product.siblings.videos.customData:key(keyA|...) Include custom data of sibling product videos with only specified keys.
    items.product.searchCategoryIds Include the list of IDs of all categories associated with the product, both hidden and visible.
    items.product.baseCategories Include base categories of the product. (deprecated)
    items.product.masterCategories Include master categories of the product.
    items.product.priceRange Include information about the price range of the product.
    items.product.priceRange.customData Include custom data of the item product price range.
    items.product.priceRange.customData:key(keyA|...) Include custom data of the item product price range with only specified keys.
    items.product.reductionRange Include information about the reduction range of the price.
    items.product.reductionRange.customData Include custom data of the item product reduction range.
    items.product.reductionRange.customData:key(keyA|...) Include custom data of the item product reduction range with only specified keys.
    items.product.lowestPriorPrice Include the lower prior price of the product.
    items.product.sellableTimeframe Include the sellable timeframe of the product.
    items.product.variants Include item product variants.
    items.product.variants.attributes Include item product variants attributes.
    items.product.variants.attributes:key(keyA|...) Return only the attributes matching the specified names, e.g., with=items.product.variants.attributes:key(ean).
    items.product.variants.attributes:exclude(keyA|...) Return all attributes except the specified names, e.g., with=items.product.variants.attributes:exclude(brand). Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.product.variants.attributes:type(typeA|...) Return only the attributes matching the specified types, e.g., with=items.product.variants.attributes:type(fit_size).
    items.product.variants.advancedAttributes Include item product variants advanced attributes
    items.product.variants.advancedAttributes:key(keyA|...) Return only the advanced attributes matching the specified names, e.g., with=items.product.variants.advancedAttributes:key(productName).
    items.product.variants.advancedAttributes:exclude(keyA|...) Return all advanced attributes except the specified names, e.g., with=items.product.variants.advancedAttributes:exclude(description). Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.product.variants.advancedAttributes:type(typeA|...) Return only the advanced attributes matching the specified types, e.g., with=items.product.variants.advancedAttributes:type(material_care).
    items.product.variants.customData:key(keyA|...) Include custom data of item product variants with only specified keys.
    items.product.variants.price.customData Include custom data of item product variant prices.
    items.product.variants.price.customData:key(keyA|...) Include custom data of item product variant prices with only specified keys.
    items.product.variants.lowestPriorPrice Include item product variants lowestPriorPrice
    items.product.variants.merchant Include the information about the merchant selling the product variant.
    items.product.variants.merchant.customData:key(keyA|...) Include custom data of the product variant merchant with only specified keys.
    items.product.variants.relatedVariants Include the resolved components of a composite product variant. Always an array once requested, even if the variant isn't composite.
    items.product.variants.relatedVariants.attributes Include attributes of related-variant components.
    items.product.variants.relatedVariants.attributes:key(keyA|...) Return only related-variant component attributes matching the specified names.
    items.product.variants.relatedVariants.attributes:exclude(keyA|...) Return all related-variant component attributes except the specified names. Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.product.variants.relatedVariants.attributes:type(typeA|...) Return only related-variant component attributes matching the specified types.
    items.product.variants.relatedVariants.advancedAttributes Include advanced attributes of related-variant components.
    items.product.variants.relatedVariants.advancedAttributes:key(keyA|...) Return only related-variant component advanced attributes matching the specified names.
    items.product.variants.relatedVariants.advancedAttributes:exclude(keyA|...) Return all related-variant component advanced attributes except the specified names. Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.product.variants.relatedVariants.advancedAttributes:type(typeA|...) Return only related-variant component advanced attributes matching the specified types.
    items.product.variants.relatedVariants.lowestPriorPrice Include the lowest prior price of related-variant components.
    items.product.variants.relatedVariants.customData:key(keyA|...) Include custom data of related-variant components with only specified keys.
    items.product.variants.relatedVariants.price.customData Include custom data of related-variant component prices.
    items.product.variants.relatedVariants.price.customData:key(keyA|...) Include custom data of related-variant component prices with only specified keys.
    items.promotion.customData:key(keyA|...) Include custom data of item promotions with only specified keys.
    items.variant.lowestPriorPrice Include the lower prior price of the item variant.
    items.variant.attributes Include attributes of the item variant.
    items.variant.attributes:key(keyA|...) Return only the variant's attributes matching the specified names, e.g., with=items.variant.attributes:key(size).
    items.variant.attributes:exclude(keyA|...) Return all the variant's attributes except the specified names, e.g., with=items.variant.attributes:exclude(brand). Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.variant.attributes:type(typeA|...) Return only the variant's attributes matching the specified types, e.g., with=items.variant.attributes:type(size).
    items.variant.advancedAttributes Include advanced attributes of the item variant.
    items.variant.advancedAttributes:key(keyA|...) Return only the variant's advanced attributes matching the specified names, e.g., with=items.variant.advancedAttributes:key(productName).
    items.variant.advancedAttributes:exclude(keyA|...) Return all the variant's advanced attributes except the specified names, e.g., with=items.variant.advancedAttributes:exclude(description). Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.variant.advancedAttributes:type(typeA|...) Return only the variant's advanced attributes matching the specified types, e.g., with=items.variant.advancedAttributes:type(material_care).
    items.variant.customData:key(keyA|...) Include custom data of the item variant with only specified keys.
    items.variant.price.customData Include custom data of the item variant price.
    items.variant.price.customData:key(keyA|...) Include custom data of the item variant price with only specified keys.
    items.variant.merchant Include the information about the merchant selling the item variant.
    items.variant.merchant.customData:key(keyA|...) Include custom data of the item variant merchant with only specified keys.
    items.variant.relatedVariants Include the resolved components of a composite item variant. Always an array once requested, even if the variant isn't composite.
    items.variant.relatedVariants.attributes Include attributes of related-variant components.
    items.variant.relatedVariants.attributes:key(keyA|...) Return only related-variant component attributes matching the specified names.
    items.variant.relatedVariants.attributes:exclude(keyA|...) Return all related-variant component attributes except the specified names. Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.variant.relatedVariants.attributes:type(typeA|...) Return only related-variant component attributes matching the specified types.
    items.variant.relatedVariants.advancedAttributes Include advanced attributes of related-variant components.
    items.variant.relatedVariants.advancedAttributes:key(keyA|...) Return only related-variant component advanced attributes matching the specified names.
    items.variant.relatedVariants.advancedAttributes:exclude(keyA|...) Return all related-variant component advanced attributes except the specified names. Combined with key(...)/type(...) the excluded keys are subtracted from the selection.
    items.variant.relatedVariants.advancedAttributes:type(typeA|...) Return only related-variant component advanced attributes matching the specified types.
    items.variant.relatedVariants.lowestPriorPrice Include the lowest prior price of related-variant components.
    items.variant.relatedVariants.customData:key(keyA|...) Include custom data of related-variant components with only specified keys.
    items.variant.relatedVariants.price.customData Include custom data of related-variant component prices.
    items.variant.relatedVariants.price.customData:key(keyA|...) Include custom data of related-variant component prices with only specified keys.

Headers

  • The numeric ID of the shop to resolve the request against. Every shop in a multi-shop setup has a unique shop ID.

    Priority: X-Shop-Id (or the shopId query parameter) takes precedence over all other shop identification parameters. When this header is present, X-Shop-Key, X-Country-Code, and X-Locale are ignored entirely.

    Alternative: If neither X-Shop-Id nor shopId is provided, you must supply all three of X-Shop-Key, X-Country-Code, and X-Locale together to identify the shop.

  • The unique string key identifying the shop (e.g. sa, de).

    Must be provided together with X-Country-Code and X-Locale as a header-based alternative to X-Shop-Id. All three headers are mandatory when using this identification method — omitting any one of them results in a validation error.

    Ignored when X-Shop-Id or the shopId query parameter is present.

  • The ISO 3166-1 alpha-2 country code of the shop (e.g. DE, AT). Automatically normalised to uppercase.

    Must be provided together with X-Shop-Key and X-Locale as a header-based alternative to X-Shop-Id. All three headers are mandatory when using this identification method — omitting any one of them results in a validation error.

    Ignored when X-Shop-Id or the shopId query parameter is present.

  • The locale of the shop (e.g. en_GB, de_DE). Used to validate that the resolved shop's locale matches the requested locale.

    Must be provided together with X-Shop-Key and X-Country-Code as a header-based alternative to X-Shop-Id. All three headers are mandatory when using this identification method — omitting any one of them results in a validation error.

    Ignored when X-Shop-Id or the shopId query parameter is present.

  • Base64-encoded JSON object with order-level custom data. Promotion conditions can read it as payload.customData, so promotions that depend on order custom data already apply in the basket. The data is only used to evaluate promotions for the current request and is not stored on the basket.

    The decoded value must be a JSON object, otherwise the request fails with 400 Bad Request.

    For example, {"channel":"app"} is sent as eyJjaGFubmVsIjoiYXBwIn0=.

  • A JWT token containing the customer ID used to validate promotions in the promotion engine.

  • Access token for accessing protected endpoints

Body·

required
application/json
  • The operations to apply, in order. The effective maximum is the tenant's configured limit, 100 by default.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/baskets/{basketId}/bulk
curl --location \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'X-Access-Token: {{accessToken}}' \
  'https://{{tenant-space}}.storefront.api.scayle.cloud/v1/baskets/{{basketId}}/bulk?shopId={{shopId}}' \
  --data '{
    "operations": [
      { "action": "add", "variantId": 338316, "quantity": 2 },
      { "action": "update", "key": "5e0b7c2d94a1f38e6c7d0a4b1f2e9d83", "quantity": 2 },
      { "action": "remove", "key": "b12d4e8a91c7f2043ac9915e77b0c8d1" }
    ]
  }'

Build an outfit in one request

Adds a T-shirt and jeans, raises the sneakers to two pairs and removes the socks.

{
  "basket": {
    "key": "bapi_customer_4711",
    "items": [
      {
        "key": "5e0b7c2d94a1f38e6c7d0a4b1f2e9d83",
        "packageId": 1,
        "quantity": 2,
        "status": "available",
        "availableQuantity": 120,
        "customData": {},
        "displayData": {
          "name": {
            "key": "name",
            "label": "Product",
            "value": "Leather Sneakers"
          }
        },
        "lowestPriorPrice": {
          "withTax": null,
          "relativeDifferenceToPrice": null
        },
        "price": {
          "total": {
            "currencyCode": "EUR",
            "withTax": 17998,
            "withoutTax": 15124,
            "recommendedRetailPrice": null,
            "tax": {
              "vat": {
                "amount": 2874,
                "rate": 0.19
              }
            },
            "appliedReductions": []
          },
          "unit": {
            "currencyCode": "EUR",
            "withTax": 8999,
            "withoutTax": 7562,
            "recommendedRetailPrice": null,
            "tax": {
              "vat": {
                "amount": 1437,
                "rate": 0.19
              }
            },
            "appliedReductions": []
          }
        },
        "variant": {
          "id": 338310,
          "referenceKey": "SNK-338310",
          "firstLiveAt": "2026-03-02T09:00:00+00:00",
          "createdAt": "2026-03-01T12:00:00+00:00",
          "updatedAt": "2026-09-28T08:00:00+00:00",
          "stock": {
            "supplierId": 1,
            "warehouseId": 1,
            "quantity": 120,
            "isSellableWithoutStock": false,
            "expectedAvailabilityAt": null
          },
          "price": {
            "currencyCode": "EUR",
            "withTax": 8999,
            "withoutTax": 7562,
            "beforeSaleWithTax": null,
            "recommendedRetailPrice": null,
            "tax": {
              "vat": {
                "amount": 1437,
                "rate": 0.19
              }
            },
            "appliedReductions": [],
            "totalAppliedReductions": null,
            "reductionsRelativeTo": null
          },
          "customData": {}
        },
        "product": {
          "id": 208140,
          "isActive": true,
          "isSoldOut": false,
          "isNew": false,
          "createdAt": "2026-03-01T12:00:00+00:00",
          "updatedAt": "2026-09-28T08:00:00+00:00",
          "indexedAt": "2026-09-28T08:05:00+00:00",
          "firstLiveAt": "2026-03-02T09:00:00+00:00",
          "masterKey": "snk-master",
          "referenceKey": "SNK-338310",
          "images": [
            {
              "hash": "images/snk-338310"
            }
          ],
          "customData": {}
        },
        "itemGroup": null,
        "promotionId": null,
        "promotionCode": null,
        "promotions": []
      },
      {
        "key": "aec0f393f63d0e70f0418d10cc1acb2e",
        "packageId": 1,
        "quantity": 2,
        "status": "available",
        "availableQuantity": 3,
        "customData": {},
        "displayData": {
          "name": {
            "key": "name",
            "label": "Product",
            "value": "Cotton T-Shirt"
          }
        },
        "lowestPriorPrice": {
          "withTax": null,
          "relativeDifferenceToPrice": null
        },
        "price": {
          "total": {
            "currencyCode": "EUR",
            "withTax": 5998,
            "withoutTax": 5040,
            "recommendedRetailPrice": null,
            "tax": {
              "vat": {
                "amount": 958,
                "rate": 0.19
              }
            },
            "appliedReductions": []
          },
          "unit": {
            "currencyCode": "EUR",
            "withTax": 2999,
            "withoutTax": 2520,
            "recommendedRetailPrice": null,
            "tax": {
              "vat": {
                "amount": 479,
                "rate": 0.19
              }
            },
            "appliedReductions": []
          }
        },
        "variant": {
          "id": 338316,
          "referenceKey": "TSH-338316",
          "firstLiveAt": "2026-03-02T09:00:00+00:00",
          "createdAt": "2026-03-01T12:00:00+00:00",
          "updatedAt": "2026-09-28T08:00:00+00:00",
          "stock": {
            "supplierId": 1,
            "warehouseId": 1,
            "quantity": 3,
            "isSellableWithoutStock": false,
            "expectedAvailabilityAt": null
          },
          "price": {
            "currencyCode": "EUR",
            "withTax": 2999,
            "withoutTax": 2520,
            "beforeSaleWithTax": null,
            "recommendedRetailPrice": null,
            "tax": {
              "vat": {
                "amount": 479,
                "rate": 0.19
              }
            },
            "appliedReductions": [],
            "totalAppliedReductions": null,
            "reductionsRelativeTo": null
          },
          "customData": {}
        },
        "product": {
          "id": 208143,
          "isActive": true,
          "isSoldOut": false,
          "isNew": false,
          "createdAt": "2026-03-01T12:00:00+00:00",
          "updatedAt": "2026-09-28T08:00:00+00:00",
          "indexedAt": "2026-09-28T08:05:00+00:00",
          "firstLiveAt": "2026-03-02T09:00:00+00:00",
          "masterKey": "tsh-master",
          "referenceKey": "TSH-338316",
          "images": [
            {
              "hash": "images/tsh-338316"
            }
          ],
          "customData": {}
        },
        "itemGroup": null,
        "promotionId": null,
        "promotionCode": null,
        "promotions": []
      },
      {
        "key": "c37f81ba22e4d9057ef1204ab8c93e6d",
        "packageId": 1,
        "quantity": 1,
        "status": "available",
        "availableQuantity": 80,
        "customData": {},
        "displayData": {
          "name": {
            "key": "name",
            "label": "Product",
            "value": "Slim Fit Jeans"
          }
        },
        "lowestPriorPrice": {
          "withTax": null,
          "relativeDifferenceToPrice": null
        },
        "price": {
          "total": {
            "currencyCode": "EUR",
            "withTax": 5999,
            "withoutTax": 5041,
            "recommendedRetailPrice": null,
            "tax": {
              "vat": {
                "amount": 958,
                "rate": 0.19
              }
            },
            "appliedReductions": []
          },
          "unit": {
            "currencyCode": "EUR",
            "withTax": 5999,
            "withoutTax": 5041,
            "recommendedRetailPrice": null,
            "tax": {
              "vat": {
                "amount": 958,
                "rate": 0.19
              }
            },
            "appliedReductions": []
          }
        },
        "variant": {
          "id": 338317,
          "referenceKey": "JNS-338317",
          "firstLiveAt": "2026-03-02T09:00:00+00:00",
          "createdAt": "2026-03-01T12:00:00+00:00",
          "updatedAt": "2026-09-28T08:00:00+00:00",
          "stock": {
            "supplierId": 1,
            "warehouseId": 1,
            "quantity": 80,
            "isSellableWithoutStock": false,
            "expectedAvailabilityAt": null
          },
          "price": {
            "currencyCode": "EUR",
            "withTax": 5999,
            "withoutTax": 5041,
            "beforeSaleWithTax": null,
            "recommendedRetailPrice": null,
            "tax": {
              "vat": {
                "amount": 958,
                "rate": 0.19
              }
            },
            "appliedReductions": [],
            "totalAppliedReductions": null,
            "reductionsRelativeTo": null
          },
          "customData": {}
        },
        "product": {
          "id": 208144,
          "isActive": true,
          "isSoldOut": false,
          "isNew": false,
          "createdAt": "2026-03-01T12:00:00+00:00",
          "updatedAt": "2026-09-28T08:00:00+00:00",
          "indexedAt": "2026-09-28T08:05:00+00:00",
          "firstLiveAt": "2026-03-02T09:00:00+00:00",
          "masterKey": "jns-master",
          "referenceKey": "JNS-338317",
          "images": [
            {
              "hash": "images/jns-338317"
            }
          ],
          "customData": {}
        },
        "itemGroup": null,
        "promotionId": null,
        "promotionCode": null,
        "promotions": []
      }
    ],
    "packages": [
      {
        "id": 1,
        "carrierKey": "DHL",
        "deliveryDate": {
          "min": "2026-10-02",
          "max": "2026-10-03"
        }
      }
    ],
    "cost": {
      "currencyCode": "EUR",
      "withTax": 29995,
      "withoutTax": 25205,
      "recommendedRetailPrice": null,
      "tax": {
        "vat": {
          "amount": 4790,
          "rate": 0.19
        }
      },
      "appliedReductions": []
    }
  },
  "results": [
    {
      "action": "add",
      "status": "success",
      "variantId": 338316,
      "key": "aec0f393f63d0e70f0418d10cc1acb2e",
      "quantity": 2
    },
    {
      "action": "add",
      "status": "success",
      "variantId": 338317,
      "key": "c37f81ba22e4d9057ef1204ab8c93e6d",
      "quantity": 1
    },
    {
      "action": "update",
      "status": "success",
      "key": "5e0b7c2d94a1f38e6c7d0a4b1f2e9d83",
      "quantity": 2
    },
    {
      "action": "remove",
      "status": "success",
      "key": "b12d4e8a91c7f2043ac9915e77b0c8d1"
    }
  ]
}

Models

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​

Last updated: December 02, 2026