---
title: "Set inventory"
method: POST
path: "/inventory/set"
tags: ["Inventory"]
---

# Set inventory

`POST /inventory/set`

## Request

- Base URL: `https://api.whatnot.com/seller-api/rest/v2`
- URL: `https://api.whatnot.com/seller-api/rest/v2/inventory/set`
- Auth: OAuth 2
  - Authorization code: `https://api.whatnot.com/seller-api/rest/oauth/authorize`
  - Token URL: `https://api.whatnot.com/seller-api/rest/oauth/token`

Set variants' available quantity to an absolute value.

## Request body

- SetInventoryLevelsRequest
  - `items` SetInventoryItem[], required: The variants to set, applied independently. At most 10 items per request.
    - `variant_id` string, required: The variant's id.
    - `quantity` integer, required: The available quantity to set.
    - `idempotency_key` string, required: Caller-supplied key that makes this item idempotent: a retried item with the same key applies at most once and reports already_applied. Keys are scoped to the seller. Use a unique key for each distinct write, such as a V4 UUID.

## Response `207`

Per-item results, in input order.

- InventoryBatchResult
  - `results` InventoryResult[], required: Per-item results, in the same order as the input items.
    - `variant_id` string, required: The item's variant_id, echoed from input.
    - `idempotency_key` string, required: The item's idempotency_key, echoed from input.
    - `status` 'applied' | 'already_applied' | 'variant_not_found' | 'inventory_level_not_found' | 'inventory_not_supported', required: What happened to this item.
    - `previous_quantity` integer, nullable, required: The available quantity just before this item applied.
    - `new_quantity` integer, nullable, required: The available quantity after this item.
    - `warnings` string[], required: Non-fatal conditions observed while applying this item.

## Other responses

- `403`: Inventory writes are not enabled for this seller.
- `422`: The request failed validation.

---

[API](https://skmtc.dev/whatnot/apis/whatnot-seller-api.md) - [All operations](https://skmtc.dev/whatnot/apis/whatnot-seller-api/llms.txt) - [OpenAPI document](https://skmtc.dev/whatnot/apis/whatnot-seller-api/revisions/c274ab93abf2?raw)
