Commerce

List stock movements

A product's stock history.

Newest first.

Path Parameters

product*string

A product id. Anything that is not one is 404 resource_missing.

Formatuuid

Query Parameters

direction?string
Value in"IN""OUT"
period?string
Value in"today""yesterday""this_week""last_week""last_7_days""last_30_days""last_90_days""this_month""last_month""this_year""all_time"
from?string

The first day, in East Africa Time.

Formatdate
to?string

The last day, in East Africa Time.

Formatdate
start_date?stringDeprecated

Use from. An instant; one with no zone is UTC.

end_date?stringDeprecated

Use to. An instant; one with no zone is UTC.

limit?integer
Range1 <= value <= 100
Default25
cursor?string

The next_cursor of the previous page. Opaque; one that does not decode is 400 invalid_cursor.

Header Parameters

X-Request-Id?string

Your id for this request; it becomes the request_id of any error. Without it the server makes one.

curl -X GET 'https://v3.ghala.io/v1/commerce/shop/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/stock-movements'
{  "items": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "direction": "IN",      "quantity": 0,      "variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6",      "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",      "recorded_by_user_id": "string",      "recorded_by_name": "string",      "note": "string",      "created_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}