Admin — Inventory & Locations
Track stock levels across locations and record stock adjustments.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
limit?number24cursor?stringOK
application/json- response
items*array<>nextCursor*string|nullcurl -X GET 'https://api.devhelp.pk/admin/v1/locations'{ "items": [ { "id": "string", "name": "string", "isDefault": true, "createdAt": "2019-08-24T14:15:22Z" } ], "nextCursor": "string"}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
application/json- body
name*stringisDefault?booleanfalseOK
application/json- response
id*stringname*stringisDefault*booleancreatedAt*stringdate-timecurl -X POST 'https://api.devhelp.pk/admin/v1/locations' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "id": "string", "name": "string", "isDefault": true, "createdAt": "2019-08-24T14:15:22Z"}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
name?stringisDefault?booleanOK
application/json- response
id*stringname*stringisDefault*booleancreatedAt*stringdate-timecurl -X PATCH 'https://api.devhelp.pk/admin/v1/locations/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "name": "string", "isDefault": true, "createdAt": "2019-08-24T14:15:22Z"}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
limit?number24cursor?stringlocationId?stringstock?string"out""low""in"threshold?number5sort?string"oldest""oldest""quantity-asc""quantity-desc"variantId?stringproductId?stringq?stringOK
application/json- response
items*array<>nextCursor*string|nullcurl -X GET 'https://api.devhelp.pk/admin/v1/inventory'{ "items": [ { "variantId": "string", "productId": "string", "productTitle": "string", "variantTitle": "string", "sku": "string", "locationId": "string", "locationName": "string", "onHand": 0, "available": 0 } ], "nextCursor": "string"}Variants appear in GET /inventory once stock is first adjusted. These are the ones that have never been: a new product's variants, waiting for their first units.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
limit?number24cursor?stringq?stringOK
application/json- response
items*array<>nextCursor*string|nullcurl -X GET 'https://api.devhelp.pk/admin/v1/inventory/unstocked'{ "items": [ { "variantId": "string", "productId": "string", "productTitle": "string", "variantTitle": "string", "sku": "string" } ], "nextCursor": "string"}Writes a ledger entry and updates the level in one transaction. Use mode: "adjust" for a delta and mode: "set" for a stocktake — two people counting at once must not overwrite each other.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
application/json- body
variantId*stringlocationId?stringquantity*numbermode?string"adjust""adjust""set"reason*string"received""sold""returned""damaged""lost""recount""correction"note?stringOK
application/json- response
variantId*stringproductId*stringproductTitle*stringvariantTitle*string|nullsku*string|nulllocationId*stringlocationName*stringonHand*numberavailable*numbercurl -X POST 'https://api.devhelp.pk/admin/v1/inventory/adjust' \ -H 'Content-Type: application/json' \ -d '{ "variantId": "string", "quantity": 0, "reason": "received"}'{ "variantId": "string", "productId": "string", "productTitle": "string", "variantTitle": "string", "sku": "string", "locationId": "string", "locationName": "string", "onHand": 0, "available": 0}One transaction, one reason and note applied to every line — a stocktake across a whole product, or setting opening quantities. Locks level rows in the platform's standard order (variant, then location) so this cannot deadlock against a concurrent single adjustment or checkout.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
application/json- body
reason*string"received""sold""returned""damaged""lost""recount""correction"note?stringadjustments*array<>OK
application/json- response
levels*array<>curl -X POST 'https://api.devhelp.pk/admin/v1/inventory/adjust-many' \ -H 'Content-Type: application/json' \ -d '{ "reason": "received", "adjustments": [ { "variantId": "string", "quantity": 0 } ]}'{ "levels": [ { "variantId": "string", "productId": "string", "productTitle": "string", "variantTitle": "string", "sku": "string", "locationId": "string", "locationName": "string", "onHand": 0, "available": 0 } ]}The append-only ledger. Entries are never edited or removed.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
limit?number24cursor?stringvariantId?stringOK
application/json- response
items*array<>nextCursor*string|nullcurl -X GET 'https://api.devhelp.pk/admin/v1/inventory/adjustments'{ "items": [ { "id": "string", "variantId": "string", "locationId": "string", "delta": 0, "resultingOnHand": 0, "reason": "received", "note": "string", "actorId": "string", "actorName": "string", "createdAt": "2019-08-24T14:15:22Z" } ], "nextCursor": "string"}