# /inventory

#### [`POST /inventory`](#update-the-available-inventory-used-by-purple-dot-for-exporting-pre-orders)

#### Update the available inventory used by Purple Dot for exporting pre-orders.

Request:

* `sku`  - Required. The SKU for which inventory level is being updated
* `available_units` - Required. The number of units of this SKU that are available

The request indicates the total number of units available, not the change since the last call, and is therefore idempotent.

Response:

* `201 Created` - Indicating the update has been received
* `sku` - The SKU for which the inventory level was updated
* `available_units` - The new number of units available

Examples:

```bash
curl --request POST \
     --url 'https://www.purpledotprice.com/admin/api/v1/inventory' \
     --header 'Content-Type: application/json'
     --header 'X-Purple-Dot-Access-Token: <access_token>'
     --data '{"sku": "foo", "available_units": 1}'
```

{% code overflow="wrap" %}

```json
{
  "data": {
    "sku": "foo",
    "available_units": 1
  }
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.getpurpledot.com/docs/purple-dot-apis/private-api/inventory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
