write:inventory
Adjust inventory
Change variants' available quantity by a delta.
Body·
required
application/json
- Type: array of AdjustInventoryItem 1…10itemsrequiredProperties: 3
The variants to adjust, applied independently. At most 10 items per request.
Responses
- application/json
- 403
Inventory writes are not enabled for this account.
- 422
The request failed validation.
Request Example for post/inventory/adjust
import os
from whatnot_seller_api import WhatnotSellerAPI
client = WhatnotSellerAPI(
o_auth2=os.environ.get("WHATNOT_O_AUTH2"),
)
inventory = client.inventory.adjust(
items=[{"variant_id": "", "delta": 0, "idempotency_key": "x"}],
)
print(inventory)
{
"results": [
{
"variant_id": "string",
"idempotency_key": "string",
"status": "applied",
"previous_quantity": 1,
"new_quantity": 1,
"warnings": [
"result_clamped_to_zero"
]
}
]
}