Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Set Stock for Multiple Variants

Updates or creates stock quantities for multiple product variants across different warehouses in a single bulk operation. Each item in the request specifies a variant ID, warehouse slug, and the new stock quantity with an optional inventory date. Returns lists of successful and failed operations.

PUT/api/v1/{team_slug}/{app_slug}/variants/stock/bulk
Authorization
AuthorizationBearer token · headerrequired

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

Path parameters
team_slugstringrequired

Team slug

app_slugstringrequired

App slug

Request body
requiredapplication/json

Stock data to set

itemsinternal_pkg_webserver_v1.BulkSetStockItem[]required
max items 100
Show properties
Array of internal_pkg_webserver_v1.BulkSetStockItem
inventory_datestring
quantityinteger
variant_idstringrequired
warehouse_slugstringrequired
Responses
200

Stock set successfully

datainternal_pkg_webserver_v1.BulkSetStockResponserequired
Show properties
failed_setsinternal_pkg_webserver_v1.BulkStockFailedOp[] | null
Show properties
Array of internal_pkg_webserver_v1.BulkStockFailedOp
reasonstring
variant_idstring
warehouse_slugstring
successful_setsgithub_com_enadhq_nabbit_internal_pkg_webserver_models.WarehouseVariantStock[] | null
Show properties
Array of github_com_enadhq_nabbit_internal_pkg_webserver_models.WarehouseVariantStock
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

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/variants/stock/bulk' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "items": [
    {
      "inventory_date": "string",
      "quantity": 0,
      "variant_id": "string",
      "warehouse_slug": "string"
    }
  ]
}'
Response
{
  "data": {
    "failed_sets": [
      {
        "reason": "string",
        "variant_id": "string",
        "warehouse_slug": "string"
      }
    ],
    "successful_sets": [
      {
        "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
}