younifyd
Menu

Get Availability

Returns availability for multiple products.

GET/organizations/{organizationId}/availability

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Get Availability action (under Shopper Availability).
  3. Fill in the fields below, then reference the result from later steps as {{getAvailability.response.data}}.

Request

Path parameters

organizationIdstringrequired

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](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).

Query parameters

productIdsarray<any>required

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.

inventoryIdsarray<any>

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.

siteIdstringrequired

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.

expandarray<string>

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.

Response

Returns 200 with an object. Read it in later steps with {{getAvailability.response.data.<field>}}.

limitinteger (int32)

The number of returned product entries in the data array.

dataarray<object>

The array of product availability entries. Each entry represents one product (SKU) with available inventory across the requested inventory lists.

idstringrequired

The id (SKU) of the product.

inventoriesarray<object>required7 fields

The array of inventory information for the product.

totalinteger (int32)

The total number of distinct product entries in the data array, not individual inventory records.

json
{
  "limit": 2,
  "data": [
    {
      "id": "apple-ipod-classic",
      "inventories": [
        {
          "id": "Site1InventoryList",
          "ats": 15,
          "backorderable": true,
          "inStockDate": "9999-12-31T00:00:00.0Z",
          "orderable": true,
          "preorderable": false,
          "stockLevel": 10
        }
      ]
    }
  ],
  "total": 2
}

Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.