Adjust product variation stock

PUT https://app.ecwid.com/api/v3/{storeId}/products/{productId}/combinations/{combinationId}/inventory

Request and response example

Request:

PUT /api/v3/1003/products/692730761/combinations/422488528/inventory HTTP/1.1
Authorization: Bearer secret_token
Host: app.ecwid.com
Content-Type: application/json
Cache-Control: no-cache

{
    "quantityDelta": -10
}

Response:

{
    "updateCount": 1
}

Required access scopes

Your app must have the following access scopes to make this request: read_catalog, update_catalog

Path params

All path params are required.

Param
Type
Description

storeId

number

Ecwid store ID.

productId

number

Internal product ID.

combinationId

number

Internal product variation ID.

Query params

All query params are optional.

Field
Type
Description

checkLowStockNotification

boolean

Defines if Ecwid should check the quantity of product stock and send the low stock email notification to the store owner.

Headers

The Authorization header is required. Request works with any access token, though the public token receives limited data.

Header
Format
Description

Authorization

Bearer secret_ab***cd

Access token of the application.

Request JSON

A JSON object with the following fields:

Field
Type
Description

quantityDelta

number

The quantity value for updating product quantity. Positive value increases product stock, a negative one decreases it. For example, 5 adds 5 to the product stock, and -10 decreases it for 10.

Response JSON

A JSON object with the following fields:

Field
Type
Description

updateCount

number

The number of updated items that defines if the request was successful. One of:

1 if the item was updated,

0 if the item was not updated.

warning

string

Inventory update warning displayed if the product variation stock became negative after the request.

Last updated

Was this helpful?

OSZAR »