Shopper Availability

GET Returns availability for multiple products.

GET /organizations/{organizationId}/availability

Operation ID: getAvailability. Security: ShopperToken (sfcc.shopper-availability, sfcc.shopper-standard); ShopperClientContextToken (sfcc.shopper-availability, sfcc.shopper-standard).

Returns availability for multiple products. If inventoryIds is omitted, availability is returned from the site-assigned default inventory list. If inventoryIds is provided, availability is returned only from the specified inventory lists. The maximum number of product IDs that you can request is 24. The maximum number of inventory list IDs you can request is 5. The productIds parameter accepts product IDs for any product type (master, variant, standard, set, or bundle). Products that are offline or not found are silently filtered from the response. To retrieve availability for all variants of a master product, use the expand=variations parameter. Use the productId from each entry in the Shopper Products API variants array to look up availability for a specific variant.

Parameters

  • organizationId (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character realm identifier and a 3-character instance type identifier.

    Example

    f_ecom_zzxy_prd
  • productIds (query, array of object, required, style: form, explode: false) The IDs of the requested products (comma-separated, max 24 IDs). If more than 24 IDs are required, split them into multiple parallel requests. Products that are offline or not found are silently filtered from the response.
    Minimum items: 1. Maximum items: 24.

    Example

    apple-ipod-shuffle,apple-ipod-nano

    Example

    [
      "apple-ipod-shuffle",
      "apple-ipod-nano"
    ]
  • inventoryIds (query, array of object, style: form, explode: false) The inventory list IDs for which the availability should be shown (comma-separated, max 5 inventory list IDs). If omitted, availability is returned from the site-assigned default inventory list. If provided, availability is returned only from the specified inventory lists.
    Minimum items: 1. Maximum items: 5.

    Example

    Site1InventoryList,Site2InventoryList

    Example

    [
      "Site1InventoryList",
      "Site2InventoryList"
    ]
  • siteId (query, SiteId, required) The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.

    Example: SiteId

    RefArch
  • expand (query, array of string, style: form, explode: false) Expand the response to include availability for related products. When variations is specified, availability for all variation products of a master product is included. When set_products is specified, availability for all products in a product set is included. The parent product's availability is always included alongside the expanded entries. Expansion is single-level only: if a variation is itself a product set, its set products are not further expanded. Other product types (bundles, bundled items, set items) are not expanded. Expanded results are returned flat at the top level of the response array, not nested below their parent product. Note: When using expand=variations, combine this response with variant data from the Shopper Products API to determine which specific variant attribute combinations (e.g. size=L, color=red) are orderable. Use the productId from each entry in the Shopper Products API variants array as the key to look up availability for that variant in this response.
    Items: Allowed values: variations, set_products. Example: variations.

    Example

    variations,set_products

    Example

    [
      "variations",
      "set_products"
    ]
  • sfdc_usid (header, string (uuid)) A unique shopper identifier (USID) for tracking client context. Used with endpoints secured with ShopperClientContextToken. This header is required for all endpoints secured with ShopperClientContextToken.
    Example: 550e8400-e29b-41d4-a716-446655440000.
  • personalized (query, string) Controls whether personalization is applied to the response. When set to none, the server skips applying personalization to the response.
    Allowed values: none. Example: none.
  • sfdc_shopper_context (header, string) Shopper context information (for example clientIP, sourceCode, and customQualifiers) passed in from a trusted backend application.

Responses

  • 200 Success.

    Media type: application/json. Schema: AvailabilityResult.

    Example: GetAvailabilityResponseExample

    {
      "data": [
        {
          "id": "poodle-collar",
          "inventories": [
            {
              "ats": 100,
              "backorderable": false,
              "id": "site-default-inventory",
              "inStockDate": "2026-06-15T00:00:00.0Z",
              "orderable": true,
              "preorderable": false,
              "stockLevel": 90
            }
          ]
        },
        {
          "id": "poodle-coat",
          "inventories": [
            {
              "id": "site-default-inventory"
            }
          ]
        }
      ],
      "limit": 2,
      "total": 2
    }

    Example: GetAvailabilityInventoryListsResponseExample

    {
      "data": [
        {
          "id": "poodle-collar",
          "inventories": [
            {
              "ats": 100,
              "backorderable": false,
              "id": "inventory1",
              "orderable": true,
              "preorderable": false,
              "stockLevel": 90
            },
            {
              "ats": 5,
              "backorderable": false,
              "id": "inventory2",
              "orderable": true,
              "preorderable": true,
              "stockLevel": 5
            }
          ]
        },
        {
          "id": "poodle-coat",
          "inventories": [
            {
              "ats": 7100,
              "backorderable": false,
              "id": "inventory1",
              "orderable": true,
              "preorderable": false,
              "stockLevel": 7090
            },
            {
              "ats": 15,
              "backorderable": false,
              "id": "inventory2",
              "orderable": true,
              "preorderable": true,
              "stockLevel": 15
            }
          ]
        }
      ],
      "limit": 2,
      "total": 2
    }
  • 400 Bad Request

    Media type: application/problem+json. Schema: ErrorResponse.

    Example: GetAvailabilityBadRequestResponseExample

    {
      "title": "Bad Request",
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/validation",
      "detail": "Maximum number of product IDs you can request in one call is 24."
    }

    Example: GetAvailabilityInventoryListsBadRequestResponseExample

    {
      "title": "Bad Request",
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/validation",
      "detail": "Maximum number of inventory list IDs you can request in one call is 5."
    }

    Example: MalformedSelectorResponseExample

    {
      "title": "Malformed Selector",
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/malformed-selector",
      "detail": "The property selector '(data.(id, inventories.(**))' is malformed.",
      "selector": "(data.(id, inventories.(**))"
    }
  • 401 Your access token is invalid or expired and can’t be used to identify a user.

    Media type: application/problem+json. Schema: ErrorResponse.

    Example: UnauthorizedExample

    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }

Extension points

  • sfcc.product.shopper-availability.v1.availability.beforeGET (before) called before retrieving product availability.
  • sfcc.product.shopper-availability.v1.availability.modifyGETResponse (modifyResponse) called to modify the product availability response.