Skip to Content
Bhakti BaazarDevelopers
API referenceStock and prices

Set stock

PUT
/inventory

Scope: inventory:write

Sets each variant's stock to an absolute number. Up to 100 lines. Each line succeeds or fails on its own, so the response is 200 even when some lines fail: check status on every line. Stock is reduced the moment an order is confirmed; send expectedStock so a stock count taken before an order came in cannot overwrite it.

Authorization

sellerApiKey
headerAuthorizationBearer <bbsk_live_…>

A Seller API key, bbsk_live_…

Request Body

application/json
  1. body
items*array<>
Items1 <= items <= 100

Response Body

application/json
  1. response
results*array<>
summary*
Example Request
curl -X PUT 'https://api.bhaktibaazar.com/seller-api/v1/inventory' \  -H 'Content-Type: application/json' \  -d '{  "items": [    {      "stock": 25    }  ]}'
Example Response
{  "results": [    {      "index": 0,      "variantId": "d53feca7-c65b-4741-aca7-827a42d686bf",      "sellerSku": "string",      "status": "updated",      "error": {        "code": "STALE_STOCK",        "message": "string",        "currentStock": 0      },      "stock": 0    }  ],  "summary": {    "updated": 0,    "unchanged": 0,    "failed": 0  }}