write:inventory

Adjust inventory

​

Change variants' available quantity by a delta.

Body·

required
application/json
  • The variants to adjust, applied independently. At most 10 items per request.

    Properties: 3

Responses

  • application/json
  • Inventory writes are not enabled for this account.

  • 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"
      ]
    }
  ]
}