younifyd
Menu

Get Stock For All Products

Get Stock for all Products

GET/inventories

Use it in a workflow

  1. Add a step and choose the Elastic Path connector.
  2. Pick the Get Stock For All Products action (under Inventory (Legacy)).
  3. Fill in the fields below, then reference the result from later steps as {{getStockForAllProducts.response.data}}.

Request

Query parameters

page[offset]integer (int)

The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](https://elasticpath.dev/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.

page[limit]integer (int)

The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](https://elasticpath.dev/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.

Response

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

dataarray<object>
idstringrequired

The unique identifier of the product.

stock_idstring

The Stock ID of a product, or empty if the product ID matches the Stock ID

typestringrequired

The type represents the object being returned. Always `stock`.

One ofstockDefault "stock"

totalinteger (int64)required

The total amount of stock we have.

availableinteger (int64)required

The amount of stock available for purchase.

allocatedinteger (int64)required

The amount of paid for stock, also known as **reserved**.

metaany
metaany
json
{
  "data": [
    {
      "id": "f976dace-450f-4a5d-8877-d119c5a550a1",
      "type": "stock",
      "total": 100,
      "available": 75,
      "allocated": 25,
      "stock_id": "ce9049af-bba2-4db2-8118-5df5268184c7",
      "meta": null
    }
  ],
  "meta": null
}

Need more? See the Elastic Path guide for connection setup and behaviour shared by every action.

Get Stock For All Products — Elastic Path — Documentation