Skip to main content
PUT

Update stock for a product

Scope:inventory:products.write
https://api.holded.com/api/v2/products/{productId}/stock

Adjusts 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

productIdstringrequired

Product 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 updated

Error responses

400Bad requestapplication/json
401Invalid or missing API keyapplication/json
403Insufficient permissionsapplication/json
404Product not foundapplication/json
429Rate limit exceededapplication/json