> For the complete documentation index, see [llms.txt](https://docs.getpurpledot.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getpurpledot.com/docs/purple-dot-apis/private-api/inventory.md).

# /inventory

## Set available inventory for a SKU

> Sets the total number of available units Purple Dot uses when exporting pre-orders. Each call sets an absolute count, not a change, so repeating a request produces the same result.

```json
{"openapi":"3.1.0","info":{"title":"Purple Dot Private API","version":"v1"},"tags":[{"name":"/inventory"}],"servers":[{"url":"https://www.purpledotprice.com/admin/api/v1","description":"Production"}],"security":[{"accessToken":[]}],"components":{"securitySchemes":{"accessToken":{"type":"apiKey","in":"header","name":"X-Purple-Dot-Access-Token","description":"Your store's private access token. It can also be sent as `Authorization: Bearer <token>`."}},"schemas":{"AuthErrorResponse":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}},"paths":{"/inventory":{"post":{"tags":["/inventory"],"summary":"Set available inventory for a SKU","description":"Sets the total number of available units Purple Dot uses when exporting pre-orders. Each call sets an absolute count, not a change, so repeating a request produces the same result.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sku":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"The SKU whose inventory level is being updated."},"available_units":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"array","items":{}}],"description":"Available units, parsed as a base-10 integer using the legacy parseInt behavior. Decimal values are truncated and strings may have trailing text."},"updated_at":{"type":"string","description":"When the level was measured, as an ISO 8601 date or timestamp. Defaults to now."}},"required":["sku","available_units"]}}}},"responses":{"201":{"description":"The update was received.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sku":{"type":"string"},"available_units":{"type":"integer"}},"required":["sku","available_units"]}},"required":["data"]}}}},"400":{"description":"Missing access token. A required attribute is missing or invalid.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AuthErrorResponse"},{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}]}}}},"401":{"description":"Access token not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthErrorResponse"}}}}}}}}}
```
