Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Set variant warehouse stock

Creates or updates the stock quantity for a variant in a specific warehouse. If the stock record exists, it will be updated; otherwise, a new record will be created.

PUT/api/v1/{team_slug}/{app_slug}/products/{product_id}/variants/{variant_id}/stock
Authorization
AuthorizationBearer token · headerrequired

Management API token, sent as Authorization: Bearer <token>.

Path parameters
product_idstringrequired

Product ID

variant_idstringrequired

Variant ID

app_slugstringrequired

App slug

team_slugstringrequired

Team slug

Request body
requiredapplication/json

Variant stock data

inventory_datestring

ISO 8601 date format with time zone e.g. 2024-12-12T09:13:31.039Z.

quantityinteger
warehouse_slugstringrequired
Responses
200

Warehouse stock for variant created or updated successfully

datagithub_com_enadhq_nabbit_internal_pkg_webserver_models.WarehouseVariantStockrequired
Show properties
available_onlineboolean
created_atstring
idstring
inventory_datestring | null
quantityinteger
updated_atstring | null
warehouse_namestring
warehouse_slugstring
detailsstring[]

Additional contextual information about the response. Used to provide supplementary details beyond the main data payload, such as validation warnings or processing notes

successbooleanrequired
400

Invalid request (e.g. bad UUID, validation error)

detailsstring[]
messagestring
successbooleanrequired
401

Unauthorized access

detailsstring[]
messagestring
successbooleanrequired
500

Internal server error

detailsstring[]
messagestring
successbooleanrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PUT 'https://api.enad.io/api/v1/string/string/products/string/variants/string/stock' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "inventory_date": "string",
  "quantity": 0,
  "warehouse_slug": "string"
}'
Response
{
  "data": {
    "available_online": true,
    "created_at": "string",
    "id": "string",
    "inventory_date": "string",
    "quantity": 0,
    "updated_at": "string",
    "warehouse_name": "string",
    "warehouse_slug": "string"
  },
  "details": [
    "string"
  ],
  "success": true
}