Products API overview
Current version: 1.1
For versioning details, read the Upgrade guide.
Use the Products API to manage product information on a Squarespace merchant site, including variants of a product and product images. This API allows products to be retrieved, added, deleted, or modified with information such as a name or URL slug, a variant’s color, size, or weight, or a new product image.
What information isn't available?
- Information for products that are not physical goods or downloads, e.g. services or gift cards
- Categories used by a Store Page to group products
Product visibility for purchase
Read the How Squarespace organizes products knowledge base article to better understand how merchants organize and display products on their site.
In general, a Store Page is a collection of products, and every product details page is a child page of a Store Page. Consequently, a product details page may not belong to more than one Store Page.
Characteristics of Store Pages and product details pages directly impacts if a product is visible for purchase. A product is unavailable for purchase if a product’s Store Page is "Disabled" and/or if the status on a product details page is "Hidden". How a merchant configures their site navigation for visitors (i.e., "Not linking" the Store Page, grouping products under a category etc.) has no effect on product visibility for purchases.
Characteristics
Enabled or disabled page setting
Squarespace UI > Pages > any Store Page > gear icon > Store Settings editor > General
A newly added Store Page in the Squarespace UI is enabled by default. Enabled Store Pages are immediately available on the merchant site and can be indexed by search engines. A disabled Store Page can’t be accessed by site visitors. This applies to all product details pages within the Store Page.
Status on the product details page
Squarespace UI > Pages > any Store Page > any product card > product editor
OR
Squarespace UI > Commerce > Inventory > any product row > product editor
Each product has a "Visible" or "Hidden" status, where "Hidden" makes a product details page unavailable to customers while browsing products on a Store Page or via its direct URL.
API resources
The Products API is responsible for the resources below. All resource fields are described under Response example in the listed endpoints.
Store pages
StorePage
represents information for a Store Page on a merchant site.
Each Product
on a merchant site belongs to a single StorePage
.
Products
Product
represents information for a product on a merchant site.
Products can be a variety of types, but not all types are currently accessible through the Products API.
Regardless of type, product information always includes name, description, type, URL, SEO options, tags
and whether the product is visible for purchase.
A Product
may include up to 100 ProductImage
subresources as well.
A Product
without a ProductImage
is still a valid Product
.
Physical Products
Physical product information always includes at least one ProductVariant
subresource.
It can also include attributes, if used for multiple variants.
Physical products can be accessed and modified as-of version 1.0.
Download Products
Download product information can include at most one DigitalGood
subresource.
Though typically a DigitalGood
will be included, it is possible for a download product to not include one
due to the product being improperly created or edited.
Download products can be accessed but not modified as-of version 1.1.
Trying to access or modify a download with any other endpoint will result in an error.
Product variants
ProductVariant
represents information for a variant of a physical product on a merchant site.
Each variant contains information like a unique SKU, pricing, stock quantity,
product dimensions, values for product attributes (if listed), etc.
Product images
ProductImage
represents information for an image in a product’s collection of images.
If desired, a ProductImage
can be assigned to any ProductVariant
of a Product
— even if it's the same ProductImage
.
However, a ProductVariant
can reference one ProductImage
at most.
- Upload a product image
- Check the status of a product image upload
- Update a product image
- Reorder a product image
- Assign a product image to a variant
- Delete a product image
Digital goods
DigitalGood
represents information for the purchasable file of the product.
A DigitalGood
can not yet be accessed or modified separately from the owning Product
.
Further reading
- Learn more about product attributes, and their relationship to a product's variants
- Become familiar with common commerce terms and how they're related to the API
- Obtain an API key or use OAuth
- Read the FAQ guide for answers to common questions