Search.../
  1. Home
  2. Getting Started
  3. Overview
Generate a test token to explore our APIs

Decrement Inventory

Subtracts a set number of items from inventory (atomic).
For use when the current inventory quantity is unknown or irrelevant (e.g., updating inventory when an order is fulfilled).

Authorization

This endpoint requires an authorization header - pass the access token from the OAuth installation flow.

Permissions

This endpoint requires the Manage Products permission scope.

POST

https://www.wixapis.com/stores/v2/inventoryItems/decrement

Body Params

NAME
TYPE
DESCRIPTION
decrementData

Array<object>

Response Object

Returns an empty object.

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Request

curl

Copy Code
1curl -X POST https://www.wixapis.com/stores/v2/inventoryItems/decrement \
2 -H 'Content-Type: application/json' \
3 -H 'Authorization: <AUTH>' \
4 --data-binary '
5 {
6 "decrementData": [
7 {
8 "externalId": "f007074f-d7a8-a68b-e6c1-7d7c3de021ff",
9 "variantId": "00000000-0000-0001-0005-9ccb19c4e6f0",
10 "quantity": 2
11 }
12 ]
13 }'

Response

json

1
2{}