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

List products

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

Retrieves information for products; products can be filtered within a date range and by product type. The response contains product information in a Product, up to 50 Products ordered by their modification date (modifiedOn), and supports dynamic cursors for pagination.

List products › query Parameters

modifiedAfter
​string

Time-boxes the request to Products that were modified after a given ISO 8601 UTC date and time string (YYYY-MM-DDThh:mm:ss.sZ). Required when modifiedBefore is passed; cannot be used with cursor.

modifiedBefore
​string

Time-boxes the request to Products that were modified before a given ISO 8601 UTC date and time string (YYYY-MM-DDThh:mm:ss.sZ). Required when modifiedAfter is passed; cannot be used with cursor.

cursor
​string

Identifies where the next page of results should begin. Should be the value of pagination.nextPageCursor from a previous response. Cannot be used with other parameters.

query
​string

Optional search query to filter products.

type
​string[]

Identifies the type(s) of products to retrieve. Should be a comma-delimited list of product types. Cannot be used with cursor.

List products › 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 products › Responses

A paginated list of products.

​object
​Product[]

Create product

POST
https://api.squarespace.com
/1.0/commerce/products

Creates a product with appropriate subresources based on product type. A successful request creates a Product with appropriate subresources based on product type.

Create product › 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

Create product › Request Body

storePageId
​string · required

Identifier of the product's Store Page.

type
​ProductType · enum · required

Product type indicator. Value may be: PHYSICAL or DIGITAL.

Enum values:
PHYSICAL
DIGITAL
​CreateProductVariantRequest[] · required

List of variants of the product. Array must contain at least one object but no more than 100 objects.

description
​string · maxLength: 102400

Long-form product description represented in HTML.

isVisible
​boolean

Indicates whether the product is available for purchase. If not specified, the new product is marked as Hidden.

name
​string · maxLength: 200

Product name.

​ProductPricing

Present for DIGITAL products only. Digital products don't have variants, so pricing is at the product level.

tags
​string[]

Keywords for search and organization purposes.

urlSlug
​string · maxLength: 200

URL slug for the new product. Value can only consist of alphanumeric characters and non-contiguous hyphens.

variantAttributes
​string[]

List of attributes to distinguish variants of the product. Supported for PHYSICAL products only.

Create product › Responses

The created product.

createdOn
​string · date-time

ISO 8601 UTC date and time string; represents when the Product was created.

description
​string

Long-form product description represented in HTML.

​DigitalGood

Present for DIGITAL products only.

id
​string

Unique Product id.

List of product images.

isVisible
​boolean

Indicates whether the product is available for purchase.

modifiedOn
​string · date-time

ISO 8601 UTC date and time string; represents when the Product was last modified.

name
​string

Product name.

​ProductPricing

Present for DIGITAL products only. Digital products don't have variants, so pricing is at the product level.

​SeoOptions

Options for search engine optimization.

storePageId
​string

Identifier of the product's Store Page.

tags
​string[]

Keywords for search and organization purposes.

type
​ProductType · enum

Product type indicator. Value may be: PHYSICAL or DIGITAL.

Enum values:
PHYSICAL
DIGITAL
url
​string

Absolute URL of the product details page.

urlSlug
​string

URL slug for the new product.

variantAttributes
​string[]

List of attributes to distinguish variants of the product. Present for PHYSICAL products only.

​ProductVariant[]

List of variants of the product. Present for PHYSICAL and GIFT_CARD products only.


Get products

GET
https://api.squarespace.com
/1.0/commerce/products/{productIdCsvs}

Retrieves information for specific products, including information for any variants or images. Up to 50 products can be retrieved per request.

Get products › path Parameters

productIdCsvs
​string · required

Specifies the Products to retrieve. Multiple Products can be retrieved by providing a comma-separated list: {id1},{id2}...

Get products › 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 products › Responses

The requested products.


Update product

POST
https://api.squarespace.com
/1.0/commerce/products/{productId}

Updates information for a product. The endpoint supports partial updates.

Update product › path Parameters

productId
​string · required

Specifies the Product to update.

Update product › 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

Update product › Request Body

​ChangeString

Optional; HTTPS URL to receive webhook notifications.

​ChangeBoolean

Optional; HTTPS URL to receive webhook notifications.

Pricing data for the product.

​ChangeListString

Optional; list of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update.

Options for search engine optimization.

Optional; list of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update.

​ChangeString

Optional; HTTPS URL to receive webhook notifications.

Update product › Responses

The updated product.

createdOn
​string · date-time

ISO 8601 UTC date and time string; represents when the Product was created.

description
​string

Long-form product description represented in HTML.

​DigitalGood

Present for DIGITAL products only.

id
​string

Unique Product id.

List of product images.

isVisible
​boolean

Indicates whether the product is available for purchase.

modifiedOn
​string · date-time

ISO 8601 UTC date and time string; represents when the Product was last modified.

name
​string

Product name.

​ProductPricing

Present for DIGITAL products only. Digital products don't have variants, so pricing is at the product level.

​SeoOptions

Options for search engine optimization.

storePageId
​string

Identifier of the product's Store Page.

tags
​string[]

Keywords for search and organization purposes.

type
​ProductType · enum

Product type indicator. Value may be: PHYSICAL or DIGITAL.

Enum values:
PHYSICAL
DIGITAL
url
​string

Absolute URL of the product details page.

urlSlug
​string

URL slug for the new product.

variantAttributes
​string[]

List of attributes to distinguish variants of the product. Present for PHYSICAL products only.

​ProductVariant[]

List of variants of the product. Present for PHYSICAL and GIFT_CARD products only.


Delete product

DELETE
https://api.squarespace.com
/1.0/commerce/products/{productId}

Deletes the specified product.

Delete product › path Parameters

productId
​string · required

Specifies the Product to delete.

Delete product › 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

Delete product › Responses

No content. The product was deleted successfully.

No data returned

Upload product image

POST
https://api.squarespace.com
/1.0/commerce/products/{productId}/images

Uploads an image for a product. Uploading an image doesn't set the product's featured image. A successful request creates a ProductImage subresource of the Product.

Upload product image › path Parameters

productId
​string · required

Specifies the Product that will own the ProductImage.

Upload product image › 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

Upload product image › Responses

The request was accepted and the uploaded image is being processed.

imageId
​string

Unique ProductImage id.


Update product image

POST
https://api.squarespace.com
/1.0/commerce/products/{productId}/images/{imageId}

Updates information for a product image. Currently, the endpoint only supports updates to the alt text for an image.

Update product image › path Parameters

productId
​string · required

Specifies the Product that owns the ProductImage.

imageId
​string · required

Specifies the ProductImage to update.

Update product image › 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

Update product image › Request Body

​ChangeString

Optional; HTTPS URL to receive webhook notifications.

Update product image › Responses

The updated product image.

Product image assigned to the variant.
altText
​string

Alt text for the image; impacts SEO and appears in search results.

availableFormats
​string[]

Available image sizes. Use with images.url and a format query parameter to retrieve the image at a particular width.

id
​string

Unique ProductImage id.

orderIndex
​integer · int32

Position of the image in the product's image list.

originalSize
​object

Image size when first uploaded.

url
​string

Absolute URL of the image hosted on Squarespace.


Delete product image

DELETE
https://api.squarespace.com
/1.0/commerce/products/{productId}/images/{imageId}

Deletes the specified product image.

Delete product image › path Parameters

productId
​string · required

Specifies the Product that owns the ProductImage.

imageId
​string · required

Specifies the ProductImage to delete.

Delete product image › 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

Delete product image › Responses

No content. The product image was deleted successfully.

No data returned

Update product image order

POST
https://api.squarespace.com
/1.0/commerce/products/{productId}/images/{imageId}/order

Updates the ordering of a product image on the product details page.

Update product image order › path Parameters

productId
​string · required

Specifies the Product that owns the ProductImage.

imageId
​string · required

Specifies the ProductImage to reorder.

Update product image order › 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

Update product image order › Request Body

​ChangeString

Optional; HTTPS URL to receive webhook notifications.

Update product image order › Responses

No content. The image order was updated successfully.

No data returned

Get image processing status

GET
https://api.squarespace.com
/1.0/commerce/products/{productId}/images/{imageId}/status

Retrieves the processing status for an uploaded product image. A successful request indicates that a ProductImage is processing, ready, or in an error state.

Get image processing status › path Parameters

productId
​string · required

Specifies the Product that owns the ProductImage.

imageId
​string · required

Specifies the ProductImage to check the status for.

Get image processing status › 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 image processing status › Responses

The processing status for the product image.

id
​string
status
​ImageProcessingStatus · enum
Enum values:
QUEUED
PROCESSING
READY
ERROR

Create product variant

POST
https://api.squarespace.com
/1.0/commerce/products/{productId}/variants

Creates a variant of a product. Creating a variant for a physical or service product requires that the product already has at least one attribute.

Create product variant › path Parameters

productId
​string · required

Specifies the Product that will own the ProductVariant.

Create product variant › 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

Create product variant › Request Body

​ProductPricing · required

Present for DIGITAL products only. Digital products don't have variants, so pricing is at the product level.

sku
​string · maxLength: 60 · required

Merchant-defined code that identifies the product variant. Value must be unique among variants. Leading and trailing whitespace is removed.

​object

Specifies attribute-value pairs for the variant. 100 char limit per key and per value with no more than six key-value pairs. Supported for PHYSICAL products only.

​ProductMeasurements

Measurements of the variant when it's shipped. Present for PHYSICAL products only.

​ProductStock

Available stock for the variant. Present for PHYSICAL products only.

Create product variant › Responses

The created product variant.

List of variants of the product. Present for PHYSICAL and GIFT_CARD products only.
attributes
​object

Specifies attribute-value pairs for the variant. Present for PHYSICAL products only.

id
​string

Unique ProductVariant id.

​ProductImage

Product image assigned to the variant.

​ProductPricing

Present for DIGITAL products only. Digital products don't have variants, so pricing is at the product level.

​ProductMeasurements

Measurements of the variant when it's shipped. Present for PHYSICAL products only.

sku
​string

Merchant-defined code that identifies the product variant.

​ProductStock

Available stock for the variant. Present for PHYSICAL products only.


Update product variant

POST
https://api.squarespace.com
/1.0/commerce/products/{productId}/variants/{variantId}

Updates a variant of a product. The endpoint supports partial updates.

Update product variant › path Parameters

productId
​string · required

Specifies the Product that owns the ProductVariant.

variantId
​string · required

Specifies the ProductVariant to update.

Update product variant › 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

Update product variant › Request Body

Specifies attribute-value pairs for the variant. Supported for PHYSICAL products only.

Pricing data for the product.

​ChangeUpdateProductMeasurements

Measurements of the variant when it's shipped. Supported for PHYSICAL products only.

Optional; HTTPS URL to receive webhook notifications.

Update product variant › Responses

The updated product variant.

List of variants of the product. Present for PHYSICAL and GIFT_CARD products only.
attributes
​object

Specifies attribute-value pairs for the variant. Present for PHYSICAL products only.

id
​string

Unique ProductVariant id.

​ProductImage

Product image assigned to the variant.

​ProductPricing

Present for DIGITAL products only. Digital products don't have variants, so pricing is at the product level.

​ProductMeasurements

Measurements of the variant when it's shipped. Present for PHYSICAL products only.

sku
​string

Merchant-defined code that identifies the product variant.

​ProductStock

Available stock for the variant. Present for PHYSICAL products only.


Delete product variant

DELETE
https://api.squarespace.com
/1.0/commerce/products/{productId}/variants/{variantId}

Deletes the specified product variant.

Delete product variant › path Parameters

productId
​string · required

Specifies the Product that owns the ProductVariant.

variantId
​string · required

Specifies the ProductVariant to delete.

Delete product variant › 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

Delete product variant › Responses

No content. The product variant was deleted successfully.

No data returned

Associate variant image

POST
https://api.squarespace.com
/1.0/commerce/products/{productId}/variants/{variantId}/image

Assigns a product image to a product variant. Specifying imageId of null will delete the association.

Associate variant image › path Parameters

productId
​string · required

Specifies the Product that owns the ProductVariant.

variantId
​string · required

Specifies the ProductVariant to assign the image to.

Associate variant image › 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

Associate variant image › Request Body

​ChangeString · required

Optional; HTTPS URL to receive webhook notifications.

Associate variant image › Responses

No content. The image was associated successfully.

No data returned