younifyd
Menu

Get Stock Transactions

Get Stock Transactions for Product

GET/inventories/{product_uuid}/transactions

Use it in a workflow

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

Request

Path parameters

product_uuidstringrequired

The unique identifier of the product.

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 {{getStockTransactions.response.data.<field>}}.

metaany
dataarray<object>
idstring

The unique identifier for the stock transaction.

typestringrequired

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

One ofstock-transactionDefault "stock-transaction"

actionstring

The type of action performed by this transaction. - **increment** - use this when you want to make products available for purchase, for example, when you have received stock from a supplier. - **decrement** - Use this when you want to remove stock from product inventory. - **allocate** - Use this when you want to allocate stock, normally to a reseller who sells on the stock. - **deallocate** - Use this when you want to deallocate any previously allocated stock.

One ofincrementdecrementallocatedeallocate

product_idstring

The product identifier that this stock transaction is for.

quantityinteger (int64)

The amount of stock affected by the stock transaction.

timestampsobject2 fields
json
{
  "meta": null,
  "data": [
    {
      "type": "stock-transaction",
      "id": "f976dace-450f-4a5d-8877-d119c5a550a1",
      "action": "allocate",
      "product_id": "86b84d3e-0a86-43d6-a347-78ba4adacca2",
      "quantity": 5,
      "timestamps": {
        "updated_at": "2017-01-10T11:41:19.244842Z",
        "created_at": "2017-01-10T11:41:19.244842Z"
      }
    }
  ]
}

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