---
title: "Adjust stock quantities"
method: POST
path: "/1.0/commerce/inventory/adjustments"
tags: ["Inventory"]
---

# Adjust stock quantities

`POST /1.0/commerce/inventory/adjustments`

## Request

- Base URL: `https://api.squarespace.com`
- URL: `https://api.squarespace.com/1.0/commerce/inventory/adjustments`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/squarespace/apis/commerce-api/docs/1.0/commerce/inventory/adjustments/post.ts> (a function with typed inputs; its response is checked against the schema)

Adjusts stock quantities for product variants. Stock quantities can be added or subtracted, set with a given number, or marked as "unlimited". All quantity information is stored in InventoryItems.

## Headers

- `Idempotency-Key` string, required
- `Authorization` string, required
- `User-Agent` string, required

## Request body

- CreateInventoryAdjustmentRequest
  - `decrementOperations` InventoryQuantityExpression[]: Optional; array of objects. Subtracts stock quantity for InventoryItems.
    - `quantity` integer: Quantity value for the inventory operation.
    - `variantId` string: Unique id for the InventoryItem.
  - `incrementOperations` InventoryQuantityExpression[]: Optional; array of objects. Increments stock quantity for InventoryItems.
    - `quantity` integer: Quantity value for the inventory operation.
    - `variantId` string: Unique id for the InventoryItem.
  - `setFiniteOperations` InventoryQuantityExpression[]: Optional; array of objects. Sets the exact stock quantity for InventoryItems.
    - `quantity` integer: Quantity value for the inventory operation.
    - `variantId` string: Unique id for the InventoryItem.
  - `setUnlimitedOperations` string[]: Optional; array of InventoryItem ids. Marks stock quantity as "unlimited" for the given InventoryItems.

## Response `204`

No content. The request was successful. If this is a request with a previously used Idempotency-Key, the previous operation was successful and no new changes were made.

## Other responses

- `400`: Bad Request. Type: INVALID_REQUEST_ERROR. The request body is missing a required field or a field is an incorrect type; no operations were specified; greater than 50 operations were specified; one or more InventoryItems were not found; the same InventoryItem was referenced in more than one operation; a specified quantity is invalid; or the Idempotency-Key header is missing or invalid.
- `404`: Not found. The API version is not supported.
- `409`: Conflict. Type: CONFLICT. Possible subtypes: CONCURRENT_MODIFICATION (a request using the provided Idempotency-Key is already in progress, or a request modifying one or more of the specified InventoryItems could not be completed due to an overlapping request), INSUFFICIENT_STOCK (a decrement operation cannot be completed because the referenced InventoryItem does not have sufficient stock), STOCK_EXCEEDS_MAX (an increment operation cannot be completed because the referenced InventoryItem will exceed the maximum allowed stock), STOCK_NOT_TRACKED (an increment or decrement operation cannot be completed because the referenced InventoryItem has unlimited inventory).

---

[API](https://skmtc.dev/squarespace/apis/commerce-api.md) - [All operations](https://skmtc.dev/squarespace/apis/commerce-api/llms.txt) - [OpenAPI document](https://skmtc.dev/squarespace/apis/commerce-api/revisions/5dd4b1b7cd38?raw)
