Endpoint enables the quantity of product in stock (relative and absolute) to be changed. Within a call, the update
of multiple products at once can be requested (max. 300 products/variants).
In case an error occurs for one of the records, the correct records will be updated, the response will be 200 OK
and there will be records in the errors array for each failed record. If all records are incorrect, the response
code will be 400 BAD REQUEST instead.
Item productCode is mandatory. Then one of the three items has to be provided:
amountChangeto increase or decrease amount available for ordering/physically on stock (relative change)quantityto set amount available for ordering (absolute amount)realStockto set amount physically stored in a warehouse (absolute amount)
The difference between quantity and realStock is amount of goods requested by the pending orders (so called "claim").
amount for ordering = realStock - claim
The claim cannot be changed explicitly, it is updated when a new order is submitted or an order is sent out. Please note,
that the stock amount cannot be changed for product sets, where the amount is calculated dynamically from the individual
products in the set. Trying to change the amount of product set will result in an error.
- Mock serverhttps://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/stocks/{stockId}/movements
- https://api.myshoptet.comhttps://api.myshoptet.com/api/stocks/{stockId}/movements
- shoptetAccessToken
- shoptetPrivateApiToken
- object
- object (2)
- object (3)
curl -i -X PATCH \
https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/stocks/1/movements \
-H 'Content-Type: application/json' \
-H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
-d '{
"data": [
{
"productCode": "43/BIL",
"amountChange": 10
}
]
}'{ "errors": [ { … }, { … } ] }