Squarespace Developer Platform: APIs, Apps, and Docs
Commerce API

List inventory

GET
https://api.squarespace.com
/1.0/commerce/inventory

Retrieves real-time stock information for all product variants. Stock information is stored in an InventoryItem for each product variant. The response contains up to 50 InventoryItems and supports dynamic cursors for pagination.

List inventory › query Parameters

cursor
​string

Identifies where the next page of results should begin. Should be the value of pagination.nextPageCursor from a previous response. If not present or empty, the endpoint returns up to 50 InventoryItems.

List inventory › Headers

Authorization
​string · required

API key or OAuth access token

Default: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN
User-Agent
​string · required

User Agent

Default: YOUR_CUSTOM_APP_DESCRIPTION

List inventory › Responses

OK

​InventoryItem[]

Array of InventoryItem resources. If the merchant site doesn't have any physical or service product variants, this array is empty.

​object

Adjust stock quantities

POST
https://api.squarespace.com
/1.0/commerce/inventory/adjustments

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.

Adjust stock quantities › Headers

Idempotency-Key
​string · required

Required for idempotent requests. Refer to the idempotency key guide for requirements.

Authorization
​string · required

API key or OAuth access token

Default: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN
User-Agent
​string · required

User Agent

Default: YOUR_CUSTOM_APP_DESCRIPTION

Adjust stock quantities › Request Body

​InventoryQuantityExpression[]

Optional; array of objects. Subtracts stock quantity for InventoryItems.

​InventoryQuantityExpression[]

Optional; array of objects. Increments stock quantity for InventoryItems.

​InventoryQuantityExpression[]

Optional; array of objects. Sets the exact stock quantity for InventoryItems.

setUnlimitedOperations
​string[]

Optional; array of InventoryItem ids. Marks stock quantity as "unlimited" for the given InventoryItems.

Adjust stock quantities › Responses

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.

No data returned

Get inventory

GET
https://api.squarespace.com
/1.0/commerce/inventory/{variantIdCsvs}

Retrieves real-time stock information for specific product variants. Stock information is stored in an InventoryItem and up to 50 InventoryItems can be retrieved per request.

Get inventory › path Parameters

variantIdCsvs
​string · required

Specifies the InventoryItems to retrieve. Multiple InventoryItems can be retrieved by providing a comma-separated list: {id1},{id2}..., though the same sequence is not guaranteed in the response.

Get inventory › Headers

Authorization
​string · required

API key or OAuth access token

Default: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN
User-Agent
​string · required

User Agent

Default: YOUR_CUSTOM_APP_DESCRIPTION

Get inventory › Responses

OK

​InventoryItem[]

Array of InventoryItem resources. If the merchant site doesn't have any physical or service products, this array is empty.