Referencia APIv1InventarioProductosPor Producto
Adjust inventory by product
Apply a relative quantity adjustment to a product's stock. Positive values increase stock, negative values decrease it. Creates an audit trail entry in inventory_transactions.
X-API-Key<token>
Per-store API key created in the dashboard at Settings > Developer > API Keys.
In: header
Path Parameters
productId*string
Length
1 <= lengthRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X PATCH "https://api.whatalo.com/v1/inventory/products/472819365047" \ -H "Content-Type: application/json" \ -d '{ "quantity": 5, "reason": "restock" }'{
"data": {
"product_id": "472819365047",
"sku": "PROD-001",
"stock_quantity": 42,
"track_inventory": true,
"low_stock_threshold": 10,
"continue_selling_when_out_of_stock": false,
"variants": [
{
"variant_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"variant_type": "Color",
"variant_value": "Rojo",
"sku": "SKU-RED-001",
"stock_quantity": 25,
"track_inventory": true,
"low_stock_threshold": 5,
"continue_selling_when_out_of_stock": false
}
]
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request body",
"details": [
{
"field": "string",
"message": "string"
}
]
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request body",
"details": [
{
"field": "string",
"message": "string"
}
]
}
}