When your integration changes in stock quantity of product variation in a store pretty often, it becomes harder and harder to keep track of how many items are actually in stock. For example, when at one point of time you have 3 items in stock and 5 in the very next second, then using the specific values can result in incorrect stock quantity.
This method solves this very problem: you can increase or decrease the product variation's stock quantity by a delta quantity. For example, if you need to decrease quantity by 10 items, you can use this method.
This method is also available for product inventory
You can use the
checkLowStockNotification as a request parameter. If
true, makes Ecwid check whether the low stock email notification needs to be sent to merchant after request is sent.
|Authorization||string||oAuth token with mandatory |
A JSON object of type 'Inventory' with the following fields:
|quantityDelta||number||Delta value used to update product quantity. Negative value will decrease quantity, positive one will increase it.|
A JSON object of type 'InventoryAdjustmentStatus' with the following fields:
|updateCount||number||The number of updated products (|
|warning||string||Inventory update warning(optional). For example, the warning will display if the stock became negative|
In case of error, Ecwid responds with an error HTTP status code and, optionally, JSON-formatted body containing error description
|400||Request parameters are malformed: SKU for combination is not set, etc.|
|402||This functionality is not available on this plan|
|404||Product not found|
|415||Unsupported content-type: expected |
|500||Could not process the request, internal server error|