PUT
Update stock for a product
Scope:
inventory:products.writehttps://api.holded.com/api/v2/products/{productId}/stockAdjusts the stock level of a product in a specific warehouse. You can set an absolute value or apply a relative adjustment. Stock changes are recorded as movements for traceability. If the product has variants, you must specify the variant ID.
Parameters
Path parameters
productId
stringrequiredProduct ID (24-char hex ObjectId)
Request body
object
warehouse_idstringrequired
Warehouse ID
variant_idstring | nulloptional
Variant ID (null for simple products)
stock_variationnumber<float>required
Stock quantity to add (positive) or remove (negative)
descriptionstring | nulloptional
Reason for stock change
Request
python
import requests
url = "https://api.holded.com/api/v2/products/{productId}/stock"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"warehouse_id": "string",
"variant_id": "string",
"stock_variation": 0,
"description": "string"
}
response = requests.put(url, headers=headers, json=payload)
print(response.json())Responses
Success responses
200Stock updatedError responses
400Bad requestapplication/json401Invalid or missing API keyapplication/json403Insufficient permissionsapplication/json404Product not foundapplication/json429Rate limit exceededapplication/json