Skip to main content
GET
/
api
/
v1
/
hub
/
shop
/
{shopId}
/
product
/
{productId}
/
stock-history
Get Stock History
curl --request GET \
  --url https://api.sabivendor.com/api/v1/hub/shop/{shopId}/product/{productId}/stock-history \
  --header 'X-Shop-API-Key: <x-shop-api-key>'
{
  "status": "success",
  "data": [
    {
      "id": 1,
      "quantityChange": -2,
      "actionType": "sale",
      "previousStock": 100,
      "newStock": 98,
      "createdAt": "2026-06-19T14:45:00.000Z"
    }
  ]
}
Retrieves history logs showing inventory adjustments (sales, manual stock updates, returns) for a specific product.

Authorizations

X-Shop-API-Key
string
required
Your Secret API Key (sk_live_... or sk_test_...) generated from the Developer dashboard. Must be kept secret.

Path Parameters

shopId
string
required
The unique UUID of the shop.
productId
number
required
The unique ID of the product.
{
  "status": "success",
  "data": [
    {
      "id": 1,
      "quantityChange": -2,
      "actionType": "sale",
      "previousStock": 100,
      "newStock": 98,
      "createdAt": "2026-06-19T14:45:00.000Z"
    }
  ]
}