# Table of Contents - [Home — Squarespace Developers](#home-squarespace-developers) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Unknown](#unknown) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) - [Developer Portal](#developer-portal) --- # Home — Squarespace Developers Build Anything ============== The Squarespace Developer Platform enables developers to create fully custom sites and integrate with 3rd party tools. Start with a template, or build your site from scratch. [Get Started](https://developers.squarespace.com/quick-start) ![](https://static1.squarespace.com/static/ta/5863f6faf7e0abc3cf95ce3a/372/assets/images/home/hero_bg2-1500w.jpg) [Use our new **Contacts API** to read profiles for customers, subscribers, and website users →](https://developers.squarespace.com/commerce-apis/contacts-overview) [Web Platform\ ============\ \ Access the template files behind your Squarespace website. Edit markup, styles, and scripts using the tools you prefer to create a custom Squarespace-hosted template or website.\ \ Get Started](https://developers.squarespace.com/quick-start) [Commerce APIs\ =============\ \ APIs enabling you to build applications to manage the commerce features of your site. Connect your Squarespace store with other services, automate key tasks like shipping and tax filing, and more.\ \ Learn More](https://developers.squarespace.com/commerce-apis/overview) Focus on building your site. We'll take care of the rest. ========================================================= Build your site using the tools we use to create Squarespace templates. With the Squarespace Developer Platform, your site will be backed by the same infrastructure that powers millions of Squarespace websites. Full Code Control ================= Change anything from the doctype to the footer. With Developer Mode enabled, you have access to all the template files that make up your Squarespace website. Local Development ================= Use the Squarespace Development Server to develop your site locally while working with your preferred native build tools. Git Built-in ============ All Squarespace template repositories are exposed via Git automatically, so you can work with a team and easily roll back. JSON Data Store =============== Query any page as JSON to access your site's data in a structured way. Your website content is an API. JSON-Template ============= Our familiar template language has very few language constructs to learn, yet offers the power and expressiveness needed to implement any design. Infrastructure ============== Whether you have 10 or 10,000 visitors a day, your site will remain online. We host Squarespace.com on the same servers, so we're in this together. Content Delivery Network ======================== Our built-in CDN reduces load times using geographically distributed servers. Your assets will be delivered quickly to any place on Earth. Site Manager ============ Manage your client's content using the same robust backend that powers millions of sites on our consumer platform. --- # Developer Portal Menu On this page \[Deprecation\] .ProductItem-additional Class is going away[](https://developers.squarespace.com/changes/upcoming-changes#deprecation-productitem-additional-class-is-going-away) ================================================================================================================================================================================== **Date:** April 2, 2026 **What's Changing:** We've recently launched an improved editing system to make your product detail pages more customizable and effective. These pages are the heart of your storefront — and we've upgraded them so you can build more audience trust and drive conversions. Key features include: * **Adding New Sections:** You can now add up to 10 new custom sections below the main product information (e.g. price, title, and "add to cart" button). These sections can be used for extra details, testimonials, or videos, and can be created using either the classic editor or the Fluid Engine editor * **Personalized Design:** You can now use block animations, device-specific edits, and distinct backgrounds to make each product feel unique to your brand. * **Saving and Reusing:** To make your workflow more efficient, you can now save a specific section (like an FAQ or Terms & Conditions) and instantly apply it to other product pages without having to recreate anything manually. Custom code impact[](https://developers.squarespace.com/changes/upcoming-changes#custom-code-impact) ----------------------------------------------------------------------------------------------------- The Additional Info editor is being retired. Content in this field will be migrated to a classic editor section, shifting from a _product-specific class_ structure to the _standard_ structure used by other classic editor sections. To support this transition, we've temporarily included a backward-compatible CSS class. **The ProductItem-additional class is being removed from the DOM permanently on June 5, 2026.** As a preview, this is what the final state will look like when the _ProductItem-additional_ class is sunset: Code `
` The updated layout uses generic classes such as `.region` and `.page-section`. Selectors that depend on the current product details page hierarchy (`.product-detail` is the parent of `.ProductItem-additional`.) will no longer be supported. [Standalone pages DOM changes](https://developers.squarespace.com/changes/standalone-pages-dom-changes) --- # Developer Portal Menu Custom Code Specification[](https://developers.squarespace.com/custom-code/about#custom-code-specification) ============================================================================================================ The Custom Code Specification is a set of persistent HTML and CSS properties that you can rely on when [adding custom code](https://support.squarespace.com/hc/en-us/articles/205815928-Adding-custom-code-to-your-site) to a Squarespace website. Squarespace is constantly evolving and releasing new features for our websites. This can cause the HTML, CSS, and JavaScript powering Squarespace websites to change unexpectedly, which may affect how your custom code works. To maximize the stability of your custom code, use only the properties outlined in this Specification. **HTML attributes, DOM structure, CSS selectors, CSS variables, and JavaScript variables that are not in the Custom Code Specification are more likely to change in ways that could break custom code.** [HTML Attributes](https://developers.squarespace.com/custom-code/html) --- # Developer Portal Menu On this page Quick Start[](https://developers.squarespace.com/quick-start#quick-start) ========================================================================== The Squarespace Developer Platform enables web developers to access Squarespace template files (as provided to the consumer) and customize those files to create something unique. The advanced developer can go even further and create his or her own custom template from scratch. _Notice: Use of the Squarespace Developer Platform is subject to our [Developer Terms of Use](https://www.squarespace.com/developer-terms) ._ Choose a Starting Point[](https://developers.squarespace.com/quick-start#choose-a-starting-point) -------------------------------------------------------------------------------------------------- First, you can start with one of the consumer level templates created by Squarespace's designers. These templates have loads of style options built-in, allowing you to achieve a high quality design quickly. _If you've already started a Squarespace site and you want to enable Developer Mode, jump to step two._ [Start With a Consumer Template](https://www.squarespace.com/templates/browse/v7) **Or** optionally, you can start with the developer Base Template, which features very minimal styles and markup used to create a completely custom template. [Start With Developer Base Template](https://www.squarespace.com/templates/base-template) **NOTE:** _Trial sites with Developer Mode enabled do not expire, giving you as much time as you need to build your custom Squarespace site._ Enable Developer Mode[](https://developers.squarespace.com/quick-start#enable-developer-mode) ---------------------------------------------------------------------------------------------- Enabling Developer Mode will give you access to a copy of the template repository for your site, allowing you to make changes to the template and add custom code using Git. > _Note: Your site will not receive template updates from Squarespace when Developer Mode is enabled, and you will not be able to switch templates. Additionally, note that using Git will not allow you to run server-side code._ Before enabling Developer Mode, it’s important to note that disabling Developer Mode (or disconnecting GitHub Repository) is an irreversible action. You can expect the following if you disable it in the future: * Any changes to the template repository including custom collections, new or modified layouts and regions, new or modified scripts and styles, uploaded assets and custom types will be lost. * All tweaks in the Site Styles panel will revert to their original settings before Developer Mode was enabled. * All content in block fields such as sidebars, headers and footers will be lost. * Existing content items based on custom types will still be editable as their base content items but without the custom fields. * The site's existing navigation structure will revert to the original navigation structure. Pages from the existing navigation structure will be moved to the Not Linked section of the Pages panel. * Existing custom collections will become uneditable. If you’ve decided to move forward with turning on Developer Mode, in the Site Manager, navigate to **Settings -> Developer Tools -> Developer Mode**. At the top right corner of the settings panel, there is a toggle that is set to off. Click the toggle to turn on Developer Mode. For new Developer Mode sites, the steps to connect to Git are: 1. Click Connect to GitHub 2. Authorize connection 3. Name repository To migrate an existing site to GitHub you will click a link in the banner of the Developer Mode panel and follow the same steps > _Contact [Customer Care](https://support.squarespace.com/hc/requests/new) > for help and troubleshooting Git connection._ [Beginner Tutorial](https://developers.squarespace.com/beginner-tutorial) --- # Developer Portal Menu On this page Overview of Commerce APIs[](https://developers.squarespace.com/commerce-apis/overview#overview-of-commerce-apis) ================================================================================================================= With Squarespace Commerce APIs, you can build applications to manage the commerce features of a Squarespace merchant site. **Analytics API:** Retrieve aggregated commerce data (order counts, totals, donations) for contacts in bulk. **Contacts API:** Manage the people associated with a site — customers, subscribers, donors — including their address books and marketing preferences. **Discounts API:** Manage discounts for a site, including their eligibility criteria, discount amount, and activation trigger. **Inventory API:** Read and adjust stock information for product variants. **Orders API:** Access order history for one-time purchases and subscription orders or import orders from third-party sales channels. **Products API:** Manage physical, service, gift card, and download products, including their images and variants (if supported). **Profiles API:** Read customers, mailing list subscribers, and donors. Now in maintenance mode — new integrations should use the [Contacts API](https://developers.squarespace.com/commerce-apis/contacts-overview) . **Transactions API:** Access financial transactions for orders and donations. **Webhook Subscriptions API:** Subscribe to notifications from a site, like when an order was created, by configuring a webhook endpoint. Structure and design[](https://developers.squarespace.com/commerce-apis/overview#structure-and-design) ------------------------------------------------------------------------------------------------------- All Commerce APIs are built on HTTPS and designed with REST principles in mind. Every endpoint uses HTTPS features such as authentication, standard verbs, and standard response status codes. In addition, APIs that support resource updates via POST allow partial updates. Authentication for Commerce APIs also provides permissions to keep Squarespace merchant site data private and secure. Next steps[](https://developers.squarespace.com/commerce-apis/overview#next-steps) ----------------------------------------------------------------------------------- * Become familiar with [commerce terms](https://developers.squarespace.com/commerce-apis/glossary) and how they're related to the APIs * Learn how to [send authenticated requests](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) * Read the [FAQ](https://developers.squarespace.com/commerce-apis/faq) for answers to common questions * Read our [brand guidelines](https://www.squarespace.com/brand-guidelines) [Authentication and permissions](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) --- # Developer Portal Menu On this page Contacts API overview[](https://developers.squarespace.com/commerce-apis/contacts-overview#contacts-api-overview) ================================================================================================================== **Current version: v1** _For versioning details, read the [Versioning](https://developers.squarespace.com/commerce-apis/versioning) guide._ Use the Contacts API to manage the people associated with a Squarespace merchant site — customers, mailing list subscribers, donors, and anyone else who has interacted with the site. The Contacts API provides full create, read, update, and delete (CRUD) access to contact records, their address books, and their marketing preferences. > _Note: The Contacts API is the modern replacement for the read-only [Profiles API](https://developers.squarespace.com/commerce-apis/profiles-overview) > . While both surfaces represent the same underlying site users, the Contacts API adds write operations, address book management, query filtering, and webhook support. New integrations should use the Contacts API._ Contacts and Profiles[](https://developers.squarespace.com/commerce-apis/contacts-overview#contacts-and-profiles) ------------------------------------------------------------------------------------------------------------------ A **Contact** and a **Profile** both represent the same concept: a person associated with a Squarespace site. Under the hood, they share the same identity — a contact's `id` corresponds to a profile's `id` and to the `customerId` field on an Order. The key differences: * The **Profiles API** is read-only and returns a flattened view of the user, including an inline `TransactionsSummary` and an approximate address derived from order history. * The **Contacts API** is read-write and provides a richer, structured model: a primary email with explicit marketing opt-in/out tracking, a full address book (up to 50 entries), and separate endpoints for managing each concern. A site visitor becomes a contact when they perform one of the following actions: * Register an account with the site * Complete a guest checkout or make a donation * Subscribe to a newsletter or marketing mailing list * Are created via the Contacts API or an extension API resources[](https://developers.squarespace.com/commerce-apis/contacts-overview#api-resources) -------------------------------------------------------------------------------------------------- The Contacts API manages the resources below. All resource fields are described under **Response example** in the listed endpoints. ### Contacts[](https://developers.squarespace.com/commerce-apis/contacts-overview#contacts) `Contact` represents a person associated with a merchant site. Every contact has a unique `id` (read-only), a `createdOn` timestamp, and an optional `firstName`, `lastName`, and `locale`. A contact also includes a nested `primaryEmail` object and, if one has been designated, a `defaultShippingAddress` from the contact's address book. A contact is uniquely identified within a site by their email address — no two contacts on the same site can share the same email. Attempting to create a contact with a duplicate email returns a **409 Conflict** response. A contact can exist without any address book entries. Addresses are managed separately through the address book sub-resource. ### Primary email and marketing preferences[](https://developers.squarespace.com/commerce-apis/contacts-overview#primary-email-and-marketing-preferences) Every contact has a `primaryEmail` containing the email address itself and an `acceptsMarketing` object that tracks whether the contact has opted in to marketing communications. The `acceptsMarketing` object includes: * `acceptsMarketing` — whether the contact currently accepts marketing emails * `joinedOn` — when the contact opted in * `leftOn` — when the contact opted out (if applicable) When creating a contact, `primaryEmail` is required. The `acceptsMarketing` flag defaults to `false` if not specified. ### Address book entries[](https://developers.squarespace.com/commerce-apis/contacts-overview#address-book-entries) `AddressBookEntry` represents a saved address in a contact's address book. Each entry contains a `ContactAddress` (with fields for name, address lines, city, region, country code, postal code, and phone number) and a `defaultShipping` flag indicating whether it is the contact's default shipping address. A contact's address book can hold up to **50 entries**. The `countryCode` field is required on every address. One entry can be marked as the default shipping address, and it will appear as `defaultShippingAddress` on the parent `Contact` resource. Address book entries are managed through sub-resource endpoints under a specific contact: * Create an address book entry * Retrieve all address book entries * Retrieve a specific address book entry * Update an address book entry * Delete an address book entry Cross-API resource relationships[](https://developers.squarespace.com/commerce-apis/contacts-overview#cross-api-resource-relationships) ---------------------------------------------------------------------------------------------------------------------------------------- The contact `id` is the shared identifier that links a person across multiple Commerce APIs: | API | Field | Relationship | | --- | --- | --- | | **Orders** | `customerId` | The `customerId` on an Order is the same value as the contact's `id`. Use it to look up the contact who placed an order. | | **Profiles** | `id` | A profile's `id` is the same value as the contact's `id`. The Profiles API is a read-only, legacy view of the same underlying record. | | **[Analytics](https://developers.squarespace.com/commerce-apis/analytics-overview)
** | `contactId` | The Analytics API groups transaction summaries by `contactId`, returning order and donation aggregates for one or more contacts. | | **Webhook Subscriptions** | `contact.create`, `contact.update`, `contact.delete`, `address.create`, `address.update`, `address.delete` | Contact and address book lifecycle events can be delivered to webhook endpoints, cross-referencing `contactId` | Analytics[](https://developers.squarespace.com/commerce-apis/contacts-overview#analytics) ------------------------------------------------------------------------------------------ Aggregated commerce data for contacts — order counts, totals, refund amounts, donation metrics — is available through the [Analytics API](https://developers.squarespace.com/commerce-apis/analytics-overview) . Unlike the Profiles API, which embeds a `TransactionsSummary` inline on each profile, the Contacts API keeps contact records and analytics separate: retrieve contacts here, then pass their IDs to the Analytics API for commerce summaries in bulk (up to 1,000 per request). Inorganic contacts[](https://developers.squarespace.com/commerce-apis/contacts-overview#inorganic-contacts) ------------------------------------------------------------------------------------------------------------ Contacts created through the API (as opposed to organic actions like checkout, account registration, or mailing list sign-up) are classified as **inorganic** for marketing attribution purposes. This distinction applies specifically to marketing opt-in tracking: * When a contact is created via the API with `acceptsMarketing: true`, their mailing list membership is attributed as `INORGANIC_MAILINGLIST_PUBLICAPI`. * Contacts who opted in organically (e.g. through a site form) carry organic attribution types. This classification helps merchants and marketing tools distinguish between contacts who actively opted in on the site and those imported or created programmatically. The inorganic/organic distinction is not exposed as a field on the `Contact` resource — it is an internal attribution that affects how the contact appears in mailing list and marketing analytics within Squarespace. Query and filtering[](https://developers.squarespace.com/commerce-apis/contacts-overview#query-and-filtering) -------------------------------------------------------------------------------------------------------------- The Contacts API includes a dedicated query endpoint (`POST /v1/contacts/query`) that supports filtering and sorting contacts by multiple criteria: * **Text search** — search across contact names and email addresses * **Marketing status** — filter by `acceptsMarketing` with date range on `joinedOn` * **Order activity** — filter by first/last order date, order count, and total order amount * **Donation activity** — filter by first/last donation date, donation count, and total donation amount * **Sorting** — sort results by supported fields in ascending or descending order * **Pagination** — cursor-based pagination with configurable page size (up to 1,000 per page) Webhooks[](https://developers.squarespace.com/commerce-apis/contacts-overview#webhooks) ---------------------------------------------------------------------------------------- The Contacts API supports six webhook topics for real-time notifications — three for contact lifecycle events and three for address book changes: | Topic | Triggered when | Payload | | --- | --- | --- | | `contact.create` | A new contact is created | Full `Contact` resource | | `contact.update` | An existing contact is updated | Full `Contact` resource (post-update state) | | `contact.delete` | A contact is deleted | `contactId` and `deletedOn` timestamp | | `address.create` | An address book entry is added | `contactId` and the new `addressBookEntry` | | `address.update` | An address book entry is changed | `contactId` and the updated `addressBookEntry` | | `address.delete` | An address book entry is removed | `contactId` and the deleted `addressBookEntryId` | To receive contact webhooks, create a [Webhook Subscription](https://developers.squarespace.com/commerce-apis/webhook-subscriptions-overview) with the relevant topic(s). Common workflows[](https://developers.squarespace.com/commerce-apis/contacts-overview#common-workflows) -------------------------------------------------------------------------------------------------------- **Sync contacts from an external CRM** Create contacts via the API, optionally setting `acceptsMarketing` to enrol them in marketing. Then add shipping addresses to their address books as needed. Use `contact.update` webhooks to keep the external system in sync when contacts are modified in Squarespace. **Build a marketing segment** Use the query endpoint to filter contacts by marketing opt-in status and order history (e.g. contacts who accept marketing and have placed at least one order). Retrieve transaction summaries via the Analytics API for deeper segmentation by spend. **Enrich contact data after an order** Listen for order webhooks, extract the `customerId`, then use the Contacts API to retrieve or update the contact's record — for example, adding a shipping address to their address book based on the order's delivery address. Further reading[](https://developers.squarespace.com/commerce-apis/contacts-overview#further-reading) ------------------------------------------------------------------------------------------------------ * Become familiar with [common commerce terms](https://developers.squarespace.com/commerce-apis/glossary) and how they're related to the API * [Obtain an API key or use OAuth](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) * Read the [FAQ](https://developers.squarespace.com/commerce-apis/faq) guide for answers to common questions [Contacts](https://developers.squarespace.com/commerce-apis/contacts) [Analytics](https://developers.squarespace.com/commerce-apis/analytics) --- # Developer Portal Menu On this page Webhooks overview[](https://developers.squarespace.com/webhooks/overview#webhooks-overview) ============================================================================================ Instead of making repeated API calls, a client may subscribe to notifications from Squarespace for supported system events. To receive notifications from Squarespace for a merchant site, create a webhook subscription using the [Webhook Subscriptions API](https://developers.squarespace.com/commerce-apis/webhook-subscriptions-overview) . You can use the [send test notification](https://developers.squarespace.com/commerce-apis/send-test-notification) endpoint to test your subscriptions. When will a subscription expire?[](https://developers.squarespace.com/webhooks/overview#when-will-a-subscription-expire) ------------------------------------------------------------------------------------------------------------------------- Subscriptions never expire. Which events can I subscribe to?[](https://developers.squarespace.com/webhooks/overview#which-events-can-i-subscribe-to) ------------------------------------------------------------------------------------------------------------------------- See "Event notifications" below for a full list. How can I verify a notification is from Squarespace?[](https://developers.squarespace.com/webhooks/overview#how-can-i-verify-a-notification-is-from-squarespace) ----------------------------------------------------------------------------------------------------------------------------------------------------------------- Every Squarespace notification includes a `Squarespace-Signature` header. To verify this header, you must have access to the `secret` from a returned `Webhook Subscription`. `secret` is only returned when [creating a subscription](https://developers.squarespace.com/commerce-apis/create-webhook-subscription) or when [rotating a secret](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret) . Read the [Verifying notifications](https://developers.squarespace.com/webhooks/verifying-notifications) guide for further details about verifying notifications. Structure of a Squarespace notification[](https://developers.squarespace.com/webhooks/overview#structure-of-a-squarespace-notification) ---------------------------------------------------------------------------------------------------------------------------------------- Squarespace webhook notifications are sent as a request to a subscribed webhook endpoint. The request always contains headers, including a signature, and a JSON payload. _Note: Squarespace reserves the right to add properties and fields without a version change. Version changes are reserved for breaking changes only._ ### Headers[](https://developers.squarespace.com/webhooks/overview#headers) `User-Agent`: "Squarespace/1.0" `Content-Type`: "application/json" `Squarespace-Signature`: "" ### Payload[](https://developers.squarespace.com/webhooks/overview#payload) JavascriptCode `{ // String; unique notification id "id": "5c2ba184b63ed3cb411ce2b1", // String; Squarespace website id that triggered the notification. "websiteId": "5f3c3d55ac435e1a051f77b3", // String; unique Webhook Subscription id "subscriptionId": "5f3c2155d947844beedda991", // String; description of the event that triggered the notification. "topic": "extension.uninstall", // ISO 8601 UTC date and time string; represents when the notification was created. "createdOn": "2020-04-22T22:18+00:00", // Object; data associated with the event. "data": {...} }` Event notifications[](https://developers.squarespace.com/webhooks/overview#event-notifications) ------------------------------------------------------------------------------------------------ Below is a list of events that trigger notifications. Read the [Notification delivery](https://developers.squarespace.com/webhooks/notification-delivery) guide to learn about the notification lifecycle. ### Extension events[](https://developers.squarespace.com/webhooks/overview#extension-events) * [Extension uninstall](https://developers.squarespace.com/webhooks/events/extension-uninstall) ### Commerce order events[](https://developers.squarespace.com/webhooks/overview#commerce-order-events) Commerce order notifications require OAuth access permissions for the Commerce Orders API. See the Commerce [Authentication and permissions](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) guide for details. * [Order create](https://developers.squarespace.com/webhooks/events/order-create) * [Order update](https://developers.squarespace.com/webhooks/events/order-update) ### Contact events[](https://developers.squarespace.com/webhooks/overview#contact-events) Contact notifications cover **contact** lifecycle (`contact.*`) and **address book** changes (`address.*`). A **contact** is a person associated with a Squarespace site — such as a customer, subscriber, or donor — as described in the [Contacts API overview](https://developers.squarespace.com/commerce-apis/contacts-overview) . Subscribing to these events requires permissions — see [Authentication and permissions](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) . **Contact** * [Contact create](https://developers.squarespace.com/webhooks/events/contact-create) * [Contact update](https://developers.squarespace.com/webhooks/events/contact-update) * [Contact delete](https://developers.squarespace.com/webhooks/events/contact-delete) **Address** * [Address create](https://developers.squarespace.com/webhooks/events/address-create) * [Address update](https://developers.squarespace.com/webhooks/events/address-update) * [Address delete](https://developers.squarespace.com/webhooks/events/address-delete) [Verifying notifications](https://developers.squarespace.com/webhooks/verifying-notifications) --- # Developer Portal Menu \[Deprecation\] .ProductItem-additional Class is going away[](https://developers.squarespace.com/changes/productItem-additional-deprecation#deprecation-productitem-additional-class-is-going-away) ==================================================================================================================================================================================================== **Date:** April 2, 2026 **What's Changing:** We've recently launched an improved editing system to make your product detail pages more customizable and effective. These pages are the heart of your storefront — and we've upgraded them so you can build more audience trust and drive conversions. Key features include: * **Adding New Sections:** You can now add up to 10 new custom sections below the main product information (e.g. price, title, and "add to cart" button). These sections can be used for extra details, testimonials, or videos, and can be created using either the classic editor or the Fluid Engine editor * **Personalized Design:** You can now use block animations, device-specific edits, and distinct backgrounds to make each product feel unique to your brand. * **Saving and Reusing:** To make your workflow more efficient, you can now save a specific section (like an FAQ or Terms & Conditions) and instantly apply it to other product pages without having to recreate anything manually. Custom code impact[](https://developers.squarespace.com/changes/productItem-additional-deprecation#custom-code-impact) ----------------------------------------------------------------------------------------------------------------------- The Additional Info editor is being retired. Content in this field will be migrated to a classic editor section, shifting from a _product-specific class_ structure to the _standard_ structure used by other classic editor sections. To support this transition, we've temporarily included a backward-compatible CSS class. **The ProductItem-additional class is being removed from the DOM permanently on June 5, 2026.** As a preview, this is what the final state will look like when the _ProductItem-additional_ class is sunset: Code `
` The updated layout uses generic classes such as `.region` and `.page-section`. Selectors that depend on the current product details page hierarchy (`.product-detail` is the parent of `.ProductItem-additional`.) will no longer be supported. [Standalone pages DOM changes](https://developers.squarespace.com/changes/standalone-pages-dom-changes) --- # Developer Portal Menu Verifying notifications[](https://developers.squarespace.com/webhooks/verifying-notifications#verifying-notifications) ======================================================================================================================= Because webhook endpoints are accessible to the public, they're prone to malicious attacks. That's why it's a best practice to verify webhook notifications to determine if they're from Squarespace. Structure of a Squarespace notification[](https://developers.squarespace.com/webhooks/verifying-notifications#structure-of-a-squarespace-notification) ------------------------------------------------------------------------------------------------------------------------------------------------------- Read the [Webhook overview](https://developers.squarespace.com/webhooks/overview) to see how a Squarepsace notification is structured. 1\. Retrieve the webhook subscription's secret from its secure location[](https://developers.squarespace.com/webhooks/verifying-notifications#1-retrieve-the-webhook-subscriptions-secret-from-its-secure-location) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Every Squarespace notification includes a `Squarespace-Signature` header. To verify this header, you must have access to the `secret` from the appropriate `Webhook Subscription`. **A `secret` is only returned when [creating a subscription](https://developers.squarespace.com/commerce-apis/create-webhook-subscription) or [rotating a secret](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret) , and is always a hexadecimal value.** 2\. Generate the expected Squarespace-Signature[](https://developers.squarespace.com/webhooks/verifying-notifications#2-generate-the-expected-squarespace-signature) --------------------------------------------------------------------------------------------------------------------------------------------------------------------- Squarespace generates the `Squarespace-Signature` header using HMAC with SHA-256. Compute the expected signature by signing the payload with the `secret` from the `Webhook Subscription` as the key: Expected signature = HMAC-SHA256(hexToBytes(`secret`), request payload) > _Note: The hex-encoded secret should be decoded to raw bytes when constructing the HMAC otherwise the expected signature won't match. The request payload is the raw HTTP request body as a UTF-8 string without any formatting applied._ 3\. Compare the signatures[](https://developers.squarespace.com/webhooks/verifying-notifications#3-compare-the-signatures) --------------------------------------------------------------------------------------------------------------------------- Compare the expected signature with the `Squarespace-Signature` header in the notification. If the signatures match, then the notification was sent from Squarespace. > _Note: Use a constant-time comparison function when checking if two signatures match to protect against [timing attacks](https://en.wikipedia.org/wiki/Timing_attack) > ._ ### Examples[](https://developers.squarespace.com/webhooks/verifying-notifications#examples) _Node_ JavascriptCode `const crypto = require('crypto'); const expectedSignature = crypto.createHmac('sha256', Buffer.from(secret, 'hex')) .update(payload) .digest('hex'); const isFromSquarespace = crypto.timingSafeEqual(Buffer.from(expectedSignature), Buffer.from(headerSignature))` _OpenSSL_ TerminalCode `echo -n $PAYLOAD | openssl sha256 -mac hmac -macopt hexkey:$SECRET` [Overview](https://developers.squarespace.com/webhooks/overview) [Notification delivery](https://developers.squarespace.com/webhooks/notification-delivery) --- # Developer Portal Menu \[Upcoming Change\] DOM structure changes for 7.1 standalone pages[](https://developers.squarespace.com/changes/standalone-pages-dom-changes#upcoming-change-dom-structure-changes-for-71-standalone-pages) ============================================================================================================================================================================================================ **Date:** July 2026 **What's Changing:** We're changing the HTML structure of standalone pages for 7.1 websites in a way that may affect custom CSS. These changes are scheduled to begin rolling out to websites starting in mid-July. What's a "standalone page"?[](https://developers.squarespace.com/changes/standalone-pages-dom-changes#whats-a-standalone-page) ------------------------------------------------------------------------------------------------------------------------------- A standalone page is any page that isn't a collection page (i.e. not Stores, Blogs, Portfolios, or Events). What's changing[](https://developers.squarespace.com/changes/standalone-pages-dom-changes#whats-changing) ---------------------------------------------------------------------------------------------------------- ### Current legacy DOM structure[](https://developers.squarespace.com/changes/standalone-pages-dom-changes#current-legacy-dom-structure) Code `
...
...
` ### New DOM structure[](https://developers.squarespace.com/changes/standalone-pages-dom-changes#new-dom-structure) The new DOM structure wraps page sections in an additional `
` tag. On standalone pages, all user sections are grouped inside a single region: Code `
...
...
` Custom code impact[](https://developers.squarespace.com/changes/standalone-pages-dom-changes#custom-code-impact) ----------------------------------------------------------------------------------------------------------------- The changes will apply to all standalone pages on all 7.1 sites. As shown in the examples above, page sections on standalone pages will be nested one level deeper in the DOM, so you may need to update custom CSS targeting the current page structure to ensure it works as expected. The most likely selectors that will need updating are those that depend on the current section hierarchy, including: * **Direct child selectors** like `.sections > .page-section`, `#sections > .page-section`, and `article > section` * **Pseudo-elements applied broadly to `section`**, like `section::before` and `section::after` * **Selectors that rely on a section being the first, last, or nth child** in the current structure. More details: * `article > *:first-child` will break * `section:first-child` won't break but will also apply to the new `section.region` element (likely unintended) * `section.page-section:first-child` will work as expected What's next[](https://developers.squarespace.com/changes/standalone-pages-dom-changes#whats-next) -------------------------------------------------------------------------------------------------- If you manage sites with custom CSS on standalone pages, we recommend that you audit any custom CSS targeting page sections by DOM structure and update it. Keep in mind that only custom code that is written to our [official spec](https://developers.squarespace.com/custom-code/about) should be considered stable and insulated from changes like the one described here. [ProductItem-additional deprecation](https://developers.squarespace.com/changes/productItem-additional-deprecation) --- # Developer Portal Menu Authentication and permissions[](https://developers.squarespace.com/commerce-apis/authentication-and-permissions#authentication-and-permissions) ================================================================================================================================================= To keep Squarespace merchant site data private and secure, every request to Commerce APIs must be authenticated and have _minimum_ permissions. However, authenticated requests automatically have access to public site data, such as site name, identifier, language, currency, time zone, and location. Read the permission levels for each Commerce API below. Then, depending on your development needs, authenticate requests by using an API key or OAuth access token. > _Remember: Requests only have access to data for the website that owns the API key or OAuth access token._ API permission levels[](https://developers.squarespace.com/commerce-apis/authentication-and-permissions#api-permission-levels) ------------------------------------------------------------------------------------------------------------------------------- **Forms API** * **Read Only**: View form submission data; for Zapier integration only **Inventory API** * **Read Only**: View inventory stock levels * **Read and Write**: Manage inventory stock levels **Orders API** * **Read Only**: View order, fulfillment, and customer information (name, email, address, and more) * **Read and Write**: View customer information (name, email, address, and more); manage order and fulfillment information **Products API** * **Read Only**: View product information, including information for any images and variants; view Store Page information * **Read and Write**: Manage product information, including information for any images and variants; view Store Page information **Contacts API** * **Read Only**: View contact records, address books, and marketing preferences * **Read and Write**: Manage contact records, address books, and marketing preferences **Discounts API** * **Read Only**: View discount records * **Read and Write**: Manage discount records **Webhook Subscriptions API** _(OAuth only)_ * **Read and Write**: Create, update, delete, and test webhook subscriptions **Profiles API** _(maintenance mode — new integrations should use the [Contacts API](https://developers.squarespace.com/commerce-apis/contacts-overview) )_ * **Read Only**: View the name, address, email, marketing preferences, and other profile information of customers, subscribers, and other website users **Transactions API** * **Read Only**: View transactional order, donation data, and customer information (email) Authenticating requests[](https://developers.squarespace.com/commerce-apis/authentication-and-permissions#authenticating-requests) ----------------------------------------------------------------------------------------------------------------------------------- Depending on your development needs, you can use a generated API key or start the OAuth process with Squarespace to become a registered OAuth client. A Squarespace merchant site can use both API keys and OAuth for data access, but Squarespace Extensions are required to use OAuth. ### Custom applications[](https://developers.squarespace.com/commerce-apis/authentication-and-permissions#custom-applications) With [Squarespace's Commerce Advanced](https://www.squarespace.com/pricing) plan, you can develop a custom application for a Squarespace merchant site. Follow the steps below to generate an API key for a custom application. 1. Log in to a Squarespace site. 2. In the left nav, click **Settings**; scroll down and click **Advanced**. 3. Click **Developer API Keys**. 4. Click the **GENERATE KEY** button. 5. In the dialog, add a key name under "KEY NAME", and select one or more Commerce APIs under "PERMISSIONS" and permission level. 6. Record the generated key in a safe and secure place. For security reasons, this is the only time the API key is visible. API keys will never expire as long as the merchant site remains active. ### Commercial development[](https://developers.squarespace.com/commerce-apis/authentication-and-permissions#commercial-development) Squarespace Extensions allow customers on any plan to optimize and expand their site in a few clicks. If you'd like to develop a new Extension, start the OAuth client process by filling out [this form](https://support.squarespace.com/hc/en-us/requests/new?ticket_form_id=28554433855373) . Once you've obtained OAuth credentials, you can use our [OAuth 2.0 Guide](https://developers.squarespace.com/oauth) to learn how to authorize your application to integrate with Squarespace and use Squarespace APIs. Next steps[](https://developers.squarespace.com/commerce-apis/authentication-and-permissions#next-steps) --------------------------------------------------------------------------------------------------------- * [Make requests to Commerce APIs](https://developers.squarespace.com/commerce-apis/making-requests) * Read the [FAQ](https://developers.squarespace.com/commerce-apis/faq) for answers to common questions * Read our [brand guidelines](https://www.squarespace.com/brand-guidelines) [Overview](https://developers.squarespace.com/commerce-apis/overview) [OAuth](https://developers.squarespace.com/commerce-apis/oauth) --- # Developer Portal Menu Accessing Squarespace APIs using OAuth 2.0[](https://developers.squarespace.com/commerce-apis/oauth#accessing-squarespace-apis-using-oauth-20) =============================================================================================================================================== Squarespace uses [OAuth 2.0](https://tools.ietf.org/html/rfc6749) to authorize third-party applications to integrate with Squarespace and consume Squarespace APIs. Terms[](https://developers.squarespace.com/commerce-apis/oauth#terms) ---------------------------------------------------------------------- | | | | --- | --- | | **Client** | Third-party application that needs to make Squarespace API calls. | | **User** | Squarespace customer who wants to integrate their site with a client. | | **Confirmation page** | Page created by Squarespace for the user to authorize (**Allow** or **Deny**) client access to their Squarespace account. | | **Access token** | Short-term token to make authenticated API requests. | | **Refresh token** | Long-term token to obtain new access tokens. | Instructions[](https://developers.squarespace.com/commerce-apis/oauth#instructions) ------------------------------------------------------------------------------------ ### 1\. Register the client and obtain OAuth 2.0 credentials[](https://developers.squarespace.com/commerce-apis/oauth#1-register-the-client-and-obtain-oauth-20-credentials) Before a client can make Squarespace API calls, the client must be registered with Squarespace as an OAuth client. Submit the following information via [this form](https://support.squarespace.com/hc/en-us/requests/new?ticket_form_id=28554433855373) . * Client name * Icon image (.png or .svg format, max size 200kb, 1:1 ratio) * Redirect URI(s) - For example, `https://thirdpartyapp.com/oauth/connect` * Initiate URL\* - For example, `https://thirdpartyapp.com/oauth/initiate`. * Link to Client's Terms and Conditions * Link to Client's Privacy Policy \*Applies only to Squarespace partner apps. These will be linked from inside Squarespace. We will review your registration and respond with `your_client_id` and `your_client_secret` as soon as possible. These credentials are used in the subsequent steps. ### 2\. Prompt the user to authorize client access[](https://developers.squarespace.com/commerce-apis/oauth#2-prompt-the-user-to-authorize-client-access) The `/authorize` URL prompts the user to authorize client access to their Squarespace data and serves as the confirmation page. If a user selects **Allow**, OAuth 2.0 authentication is started between the client and Squarespace APIs. Append required and any optional parameters to the `GET /authorize` endpoint; **all parameter values should be URL-encoded**. Code `GET https://login.squarespace.com/api/1/login/oauth/provider/authorize` Query parameterRequirementValue`client_id`Required Alphanumeric value for your\_client\_id that was supplied by Squarespace in [Step 1](https://developers.squarespace.com/commerce-apis/oauth#1-register-the-client-and-obtain-oauth-20-credentials) . `redirect_uri`RequiredString; the full redirect URI sent to Squarespace in [Step 1](https://developers.squarespace.com/commerce-apis/oauth#1-register-the-client-and-obtain-oauth-20-credentials) .`scope`Required String; comma-separated list of client permission values (see below) for API access. The confirmation page always displays website(s) for user selection for `scope=website.*` | | | | --- | --- | | `website.orders` | Send order data and mark orders as fulfilled. | | `website.orders.read` | View order and fulfillment information. | | `website.transactions.read` | Access transactional order and donation data. | | `website.inventory` | View and update inventory stock levels. | | `website.inventory.read` | View inventory stock levels. | | `website.products` | View product information and modify products. | | `website.products.read` | View product information. | | `website.contacts` | View customer contact information and address book entries; create, update, and delete contacts and address book entries. | | `website.contacts.read` | View customer contact information and address book entries. | | `website.discounts` | View and manage discounts. | | `website.discounts.read` | View discounts. | **Example:** `&scope=website.inventory,website.orders` `state`Required Alphanumeric random value generated by client. You'll use it in Step 3, [Implement redirect URI](https://developers.squarespace.com/commerce-apis/oauth#3-implement-redirect-uri) , to prevent CSRF attacks. `website_id`Conditionally Required Alphanumeric value for a Squarespace site ID. When a logged-in user initiates an OAuth connection from Squarespace, this value is appended as a query parameter on the provided initiate URL. Partners must pass this parameter back to the `GET /authorize` endpoint. If an OAuth connection is initiated by a logged-out user, Squarespace will not include a website\_id parameter on the initiate URL. Partners should not pass any `website_id` parameter back to the `GET /authorize` endpoint in these cases. Instead, the user will be prompted to select a website on the confirmation page. `access_type`Optional String; use `offline` for long-term API access. For more information, see [Token expiration and long-term access](https://developers.squarespace.com/commerce-apis/oauth#token-expiration-and-long-term-access) . Omit parameter for short-term API access. **Authorize URL example with parameters** _Note: Parameter values are in plain text and not URL-encoded for example purposes._ Code `https://login.squarespace.com/api/1/login/oauth/provider/authorize?client_id=fGBjMDBaUHli&redirect_uri=http://localhost:8090/oauth/callback&scope=website.inventory,website.orders&state=2BsmGS9AAzFppUmcoIagOLj4iKII` ### 3\. Implement redirect URI[](https://developers.squarespace.com/commerce-apis/oauth#3-implement-redirect-uri) Both **Allow** or **Deny** on the confirmation page directs the user to the client redirect URI (i.e., the `redirect_uri` specified in [Step 2](https://developers.squarespace.com/commerce-apis/oauth#2-prompt-the-user-to-authorize-client-access) ) with query parameters appended by Squarespace. For **Allow**, the redirect URI should verify the `state` parameter and match it against `state` value that was appended for the `/authorize` endpoint. This verification prevents CSRF attacks. Squarespace doesn't provide guidelines for **Deny** implementation. | Parameter | Value | | --- | --- | | `error` | String; `access_denied` if user selects **Deny** on confirmation page. Parameter isn't appended if user selects **Allow**. | | `state` | Alphanumeric value; not present if user selects **Deny**. | | `code` | Alphanumeric value used in [step 4. Request access token](https://developers.squarespace.com/commerce-apis/oauth#4-request-access-token)
. Value is initially URL-encoded and should be decoded prior to sending in the access token request. Valid for two minutes and only for one-time use. Not present if user selects **Deny**. | ### 4\. Request access token[](https://developers.squarespace.com/commerce-apis/oauth#4-request-access-token) Code `POST https://login.squarespace.com/api/1/login/oauth/provider/tokens` The client makes a `POST /tokens` call with required and any optional parameters for an access token from Squarespace. Access tokens in the response are only valid for 30 minutes. For more information, see [Token expiration and long-term access](https://developers.squarespace.com/commerce-apis/oauth#token-expiration-and-long-term-access) . **Parameters** | Body | Requirement | Value | | --- | --- | --- | | `grant_type` | Optional | String; default is `authorization_code`; use `authorization_code` for your first request. For [long-term API access](https://developers.squarespace.com/commerce-apis/oauth#token-expiration-and-long-term-access)
, use `refresh_token` for all subsequent requests. | | `code` | Required if `grant_type=authorization_code` | Alphanumeric value of code passed to redirect URI. | | `redirect_uri` | Required if `grant_type=authorization_code` | String; redirect\_uri used for the `/authorize` endpoint. | | `refresh_token` | Required if `grant_type=refresh_token` | String; use application/json or application/x-www-form-urlencoded | | Header | | | | --- | --- | --- | | `Authorization` | Required | Follow the steps below to build the header value:



1. [Use your Squarespace OAuth 2.0 credentials](https://developers.squarespace.com/commerce-apis/oauth#1-register-the-client-and-obtain-oauth-20-credentials)
to construct a string in the format: `your_client_id:your_client_secret`

2. Encode the string from Step 1 into base-64



3. Add Basic as a prefix to the encoded string from Step 2



**Example**

your\_client\_id: abc123



your\_client\_secret: 12secret345



**Authorization after base-64**

Basic YWJjMTIzOjEyc2VjcmV0MzQ1 | | `Content-Type` | Required | String; use application/json or application/x-www-form-urlencoded | | `User-Agent` | Required | String; If you see an error referencing SEC-43, a User-Agent header is missing | **Example Response** JavascriptCode `{ "token_type": "bearer", "access_token": "T1|Rr0Wc95uu3cSeBh06yB...", // expires 30 minutes after it's created ... "access_token_expires_at": "1553532363.542", }` ### 5\. Make API requests[](https://developers.squarespace.com/commerce-apis/oauth#5-make-api-requests) After you obtain an access token, you can make API requests. **Endpoint:** `https://api.squarespace.com/...` **Authorization format:** `Bearer` Using the sample response from Step 4, `Authorization` would have the value: `Bearer T1|Rr0Wc95uu3cSeBh06yB...` Token expiration and long-term access[](https://developers.squarespace.com/commerce-apis/oauth#token-expiration-and-long-term-access) -------------------------------------------------------------------------------------------------------------------------------------- When a response from `POST /tokens` is received, `access_token` is only valid for 30 minutes. For long-term Squarespace API access, the client has to prompt the user to reauthorize using the `GET /authorize` endpoint or use refresh tokens. ### Refresh tokens[](https://developers.squarespace.com/commerce-apis/oauth#refresh-tokens) To get a refresh token, add `access_type=offline` as a parameter to the `GET /authorize` request. When the client makes a `POST /tokens` call, the response includes `refresh_token`. Use the refresh token to get new tokens by making another `POST /tokens` call with the parameters below. The refresh token expires after seven days. * `grant_type=refresh_token` * `refresh_token=` _**Note**: Each `POST /tokens` call with a `refresh_token` parameter results in a new `refresh_token` and `access_token`. Refresh tokens are effectively one-time use—the original refresh token is invalidated as soon as the new access token is used. If long-term API access is required, the client should replace the stored refresh token with the most recent `refresh_token`. Note that obtaining new tokens doesn't revoke existing access tokens._ **Sample response from `/tokens`:** Code `{ "token": "T1|Rr0Wc95uu3cSeBh06yB...", "token_type": "bearer", // expires 30 mins after creation "access_token": "T1|Rr0Wc95uu3cSeBh06yB...", "access_token_expires_at": "1553532363.542", // expires 7 days after creation "refresh_token": "1|KYUYh35zcwzx4Zt/oty3...", "refresh_token_expires_at": "1554135363.542" }` **Sample use case with refresh tokens** Client has to poll orders from a user site indefinitely and needs to call the Squarespace API once per minute. 1. User authorizes client access to Squarespace APIs via confirmation page; client makes a `POST /tokens` call and obtains access and refresh tokens in response. 2. Client secures and stores the values below for current record (`CR`): * `access_token=` * `access_token_expires_at=` * `refresh_token=` 3. Prior to each API call, client checks if: `CR.access_token_expires_at - currentTime > 10 seconds` If true, client makes an API call with `CR.access_token`. If false, client makes a `POST /tokens` call with `refresh_token=CR.refresh_token` as a parameter for new access and refreshntokens; client stores new token values in CR: * `access_token=` * `access_token_expires_at=` * `refresh_token=` 4. Client repeats Steps 2 and 3 indefinitely. ### Invalid tokens and revoking access[](https://developers.squarespace.com/commerce-apis/oauth#invalid-tokens-and-revoking-access) Tokens become invalid in two ways: the tokens expire or the user revokes client access from the Squarespace UI. In either case, the user has to reauthorize client access to get new access tokens. When an access token is invalid, Squarespace responds to API requests with `401 Unauthorized`. If a client receives a 401, they should notify the user that their Squarespace integration requires reauthorization. [Authentication and permissions](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) [Making requests](https://developers.squarespace.com/commerce-apis/making-requests) --- # Developer Portal Menu Commerce API [Commerce API](https://developers.squarespace.com/commerce-apis) Contacts ======== [Download schema](https://developers.squarespace.com/commerce-apis/latest/schema-processor-version-version-latest.json) Manage customer contacts and address book entries for a website: create, read, update, delete, and query contacts; maintain addresses for shipping and fulfillment. * * * List contacts[](https://developers.squarespace.com/commerce-apis#list-contacts) -------------------------------------------------------------------------------- GET https://api.squarespace.com /v1/contacts Returns a paginated list of contacts for the website. Requires OAuth website scope website.contacts.read or website.contacts, or API key scope CONTACT\_READONLY or CONTACT, or OAuth website scope website.profiles.read or website.profiles (OAuth only). ### List contacts › query Parameters[](https://developers.squarespace.com/commerce-apis#list-contacts/query-parameters) `pageSize` ​integer · int32 · min: 0 · max: 1000 number of contacts to retrieve per request Default: 50 `cursor` ​string where next page of results begins. should be {pagination.nextPageCursor} from previous response. ### List contacts › Headers[](https://developers.squarespace.com/commerce-apis#list-contacts/header-parameters) `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 contacts › Responses[](https://developers.squarespace.com/commerce-apis#list-contacts/responses) 200400403429 A paginated list of contacts. [PaginatedGetContactsResponse](https://developers.squarespace.com/commerce-apis/~schemas#paginatedgetcontactsresponse) `contacts` ​[Contact\[\]](https://developers.squarespace.com/commerce-apis/~schemas#contact) paginated list of contacts retrieved `pagination` ​object * * * Create contact[](https://developers.squarespace.com/commerce-apis#create-contact) ---------------------------------------------------------------------------------- POST https://api.squarespace.com /v1/contacts Creates a new contact. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only). ### Create contact › Headers[](https://developers.squarespace.com/commerce-apis#create-contact/header-parameters) `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 contact › Request Body[](https://developers.squarespace.com/commerce-apis#create-contact/request-body) [CreateContactRequest](https://developers.squarespace.com/commerce-apis/~schemas#createcontactrequest) `firstName` ​string · required Contact's first name Example: john `lastName` ​string · required Contact's last name Example: doe `locale` ​string · required Contact's locale Example: en-US `primaryEmail` ​[CreateEmail](https://developers.squarespace.com/commerce-apis/~schemas#createemail)  · required Primary email supplied when creating a contact. ### Create contact › Responses[](https://developers.squarespace.com/commerce-apis#create-contact/responses) 201400403409429 The created contact. [CreateContactResponse](https://developers.squarespace.com/commerce-apis/~schemas#createcontactresponse) `contact` ​[Contact](https://developers.squarespace.com/commerce-apis/~schemas#contact) A contact. * * * Query contacts[](https://developers.squarespace.com/commerce-apis#query-contacts) ---------------------------------------------------------------------------------- POST https://api.squarespace.com /v1/contacts/query Returns a paginated list of contacts matching filters and sort options in the request body. Requires OAuth website scope website.contacts.read or website.contacts, or API key scope CONTACT\_READONLY or CONTACT, or OAuth website scope website.profiles.read or website.profiles (OAuth only). ### Query contacts › Headers[](https://developers.squarespace.com/commerce-apis#query-contacts/header-parameters) `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 ### Query contacts › Request Body[](https://developers.squarespace.com/commerce-apis#query-contacts/request-body) [QueryContactsRequest](https://developers.squarespace.com/commerce-apis/~schemas#querycontactsrequest) `acceptsMarketingWithDate` ​[AcceptsMarketingWithDate](https://developers.squarespace.com/commerce-apis/~schemas#acceptsmarketingwithdate) Contact's marketing settings with joined on date `cursor` ​string The cursor for the next page of results. Use the value of `pagination.nextPageCursor` from the previous response. `donationAmount` ​[IntegerFilter](https://developers.squarespace.com/commerce-apis/~schemas#integerfilter) Object for filtering by a min and max integer `donationCount` ​[IntegerFilter](https://developers.squarespace.com/commerce-apis/~schemas#integerfilter) Object for filtering by a min and max integer `firstDonationOn` ​[DateFilter](https://developers.squarespace.com/commerce-apis/~schemas#datefilter) Object for filtering by before and after dates `firstOrderOn` ​[DateFilter](https://developers.squarespace.com/commerce-apis/~schemas#datefilter) Object for filtering by before and after dates `lastDonationOn` ​[DateFilter](https://developers.squarespace.com/commerce-apis/~schemas#datefilter) Object for filtering by before and after dates `lastOrderOn` ​[DateFilter](https://developers.squarespace.com/commerce-apis/~schemas#datefilter) Object for filtering by before and after dates `orderAmount` ​[IntegerFilter](https://developers.squarespace.com/commerce-apis/~schemas#integerfilter) Object for filtering by a min and max integer `orderCount` ​[IntegerFilter](https://developers.squarespace.com/commerce-apis/~schemas#integerfilter) Object for filtering by a min and max integer `pageSize` ​integer · int32 · min: 1 · max: 1000 The number of contacts to return per request. Default: 50 `searchString` ​string Search string for Name and Email address `sortDirection` ​string · enum Direction to sort results, ASCENDING or DESCENDING Enum values: ASCENDING DESCENDING `sortField` ​string · enum Field to sort results by Enum values: ID CREATED\_ON EMAIL ACCEPTS\_MARKETING\_JOINED\_ON FIRST\_NAME LAST\_NAME ORDER\_COUNT LAST\_ORDER\_ON show 4 more ### Query contacts › Responses[](https://developers.squarespace.com/commerce-apis#query-contacts/responses) 200400403429 A paginated list of contacts matching the query. [PaginatedQueryContactsResponse](https://developers.squarespace.com/commerce-apis/~schemas#paginatedquerycontactsresponse) `contacts` ​[Contact\[\]](https://developers.squarespace.com/commerce-apis/~schemas#contact) paginated list of contacts retrieved `pagination` ​object * * * Get contact[](https://developers.squarespace.com/commerce-apis#get-contact) ---------------------------------------------------------------------------- GET https://api.squarespace.com /v1/contacts/{contactId} Returns the contact for the given contact ID. Requires OAuth website scope website.contacts.read or website.contacts, or API key scope CONTACT\_READONLY or CONTACT, or OAuth website scope website.profiles.read or website.profiles (OAuth only). ### Get contact › path Parameters[](https://developers.squarespace.com/commerce-apis#get-contact/path-parameters) `contactId` ​string · required The contact's ID. ### Get contact › Headers[](https://developers.squarespace.com/commerce-apis#get-contact/header-parameters) `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 contact › Responses[](https://developers.squarespace.com/commerce-apis#get-contact/responses) 200403404429 The requested contact. [GetContactResponse](https://developers.squarespace.com/commerce-apis/~schemas#getcontactresponse) `contact` ​[Contact](https://developers.squarespace.com/commerce-apis/~schemas#contact) A contact. * * * Delete contact[](https://developers.squarespace.com/commerce-apis#delete-contact) ---------------------------------------------------------------------------------- DELETE https://api.squarespace.com /v1/contacts/{contactId} Deletes the contact for the given contact ID. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only). ### Delete contact › path Parameters[](https://developers.squarespace.com/commerce-apis#delete-contact/path-parameters) `contactId` ​string · required The contact's ID. ### Delete contact › Headers[](https://developers.squarespace.com/commerce-apis#delete-contact/header-parameters) `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 contact › Responses[](https://developers.squarespace.com/commerce-apis#delete-contact/responses) 204403404429 No content. No data returned * * * Update contact[](https://developers.squarespace.com/commerce-apis#update-contact) ---------------------------------------------------------------------------------- PATCH https://api.squarespace.com /v1/contacts/{contactId} Updates a contact using JSON merge patch. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only). ### Update contact › path Parameters[](https://developers.squarespace.com/commerce-apis#update-contact/path-parameters) `contactId` ​string · required The contact's ID. ### Update contact › Headers[](https://developers.squarespace.com/commerce-apis#update-contact/header-parameters) `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 contact › Request Body[](https://developers.squarespace.com/commerce-apis#update-contact/request-body) [PatchContactRequest](https://developers.squarespace.com/commerce-apis/~schemas#patchcontactrequest) `firstName` ​string The contact's first name. Example: John `lastName` ​string The contact's last name. Example: Smith `locale` ​string The contact's locale. Example: en-US `primaryEmail` ​[PatchEmail](https://developers.squarespace.com/commerce-apis/~schemas#patchemail) Primary email fields for an update request. Example: {"email":"johnsmith@mail.com","acceptsMarketing":true} ### Update contact › Responses[](https://developers.squarespace.com/commerce-apis#update-contact/responses) 200400403404409429 The updated contact. [PatchContactResponse](https://developers.squarespace.com/commerce-apis/~schemas#patchcontactresponse) `contact` ​[Contact](https://developers.squarespace.com/commerce-apis/~schemas#contact) A contact. * * * Get address book[](https://developers.squarespace.com/commerce-apis#get-address-book) -------------------------------------------------------------------------------------- GET https://api.squarespace.com /v1/contacts/{contactId}/address-book Returns paginated addresses for the contact. When there is at least one entry, exactly one is the default shipping address (defaultShippingAddressId and each entry's defaultShipping reflect this). The default shipping address (when present) is always included on the first page of results. Requires OAuth website scope website.contacts.read or website.contacts, or API key scope CONTACT\_READONLY or CONTACT, or OAuth website scope website.profiles.read or website.profiles (OAuth only). ### Get address book › path Parameters[](https://developers.squarespace.com/commerce-apis#get-address-book/path-parameters) `contactId` ​string · required The contact's ID. ### Get address book › query Parameters[](https://developers.squarespace.com/commerce-apis#get-address-book/query-parameters) `pageSize` ​integer · int32 · min: 0 · max: 1000 number of contacts to retrieve per request Default: 50 `cursor` ​string where next page of results begins. should be {pagination.nextPageCursor} from previous response. ### Get address book › Headers[](https://developers.squarespace.com/commerce-apis#get-address-book/header-parameters) `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 address book › Responses[](https://developers.squarespace.com/commerce-apis#get-address-book/responses) 200403404429 Paginated list of the contact's addresses. When there is at least one entry, the first page always includes the default shipping address, and defaultShippingAddressId identifies it. On later pages, addressBookEntries is the next slice only; defaultShippingAddressId is present only when the default shipping entry appears in that slice. [GetAddressBookResponse](https://developers.squarespace.com/commerce-apis/~schemas#getaddressbookresponse) `addressBook` ​[AddressBook](https://developers.squarespace.com/commerce-apis/~schemas#addressbook) Address settings for a contact. When there is at least one address book entry, exactly one is the default shipping address; default shipping address is always returned on the first page of paginated results). `pagination` ​[PaginationDetails](https://developers.squarespace.com/commerce-apis/~schemas#paginationdetails) * * * Create address book entry[](https://developers.squarespace.com/commerce-apis#create-address-book-entry) -------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /v1/contacts/{contactId}/address-book Creates a new address book entry for the contact. If this is the contact's only address book entry after creation, it becomes the default shipping address even when defaultShipping is false. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only). ### Create address book entry › path Parameters[](https://developers.squarespace.com/commerce-apis#create-address-book-entry/path-parameters) `contactId` ​string · required The contact's ID. ### Create address book entry › Headers[](https://developers.squarespace.com/commerce-apis#create-address-book-entry/header-parameters) `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 address book entry › Request Body[](https://developers.squarespace.com/commerce-apis#create-address-book-entry/request-body) [CreateAddressBookEntryRequest](https://developers.squarespace.com/commerce-apis/~schemas#createaddressbookentryrequest) `address` ​[ContactAddress](https://developers.squarespace.com/commerce-apis/~schemas#contactaddress)  · required Address properties for a contact. `defaultShipping` ​boolean Whether this entry should be the default shipping address. If this is the only address book entry for the contact after creation, it becomes the default even when set to false. ### Create address book entry › Responses[](https://developers.squarespace.com/commerce-apis#create-address-book-entry/responses) 201400403404429 The created address book entry. [CreateAddressBookEntryResponse](https://developers.squarespace.com/commerce-apis/~schemas#createaddressbookentryresponse) `addressBookEntry` ​[AddressBookEntry](https://developers.squarespace.com/commerce-apis/~schemas#addressbookentry) An address book entry for a contact. * * * Get address book entry[](https://developers.squarespace.com/commerce-apis#get-address-book-entry) -------------------------------------------------------------------------------------------------- GET https://api.squarespace.com /v1/contacts/{contactId}/address-book/{addressBookEntryId} Returns a single address book entry for the contact. Requires OAuth website scope website.contacts.read or website.contacts, or API key scope CONTACT\_READONLY or CONTACT, or OAuth website scope website.profiles.read or website.profiles (OAuth only). ### Get address book entry › path Parameters[](https://developers.squarespace.com/commerce-apis#get-address-book-entry/path-parameters) `contactId` ​string · required The contact's ID. `addressBookEntryId` ​string · required The address book entry's ID. ### Get address book entry › Headers[](https://developers.squarespace.com/commerce-apis#get-address-book-entry/header-parameters) `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 address book entry › Responses[](https://developers.squarespace.com/commerce-apis#get-address-book-entry/responses) 200403404429 The requested address book entry. [GetAddressBookEntryResponse](https://developers.squarespace.com/commerce-apis/~schemas#getaddressbookentryresponse) `addressBookEntry` ​[AddressBookEntry](https://developers.squarespace.com/commerce-apis/~schemas#addressbookentry) An address book entry for a contact. * * * Replace address book entry[](https://developers.squarespace.com/commerce-apis#replace-address-book-entry) ---------------------------------------------------------------------------------------------------------- PUT https://api.squarespace.com /v1/contacts/{contactId}/address-book/{addressBookEntryId} Replaces an address book entry for the contact with a full JSON body. When updating the entry that is currently the default, setting "defaultShipping" from true to false has no effect. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only). ### Replace address book entry › path Parameters[](https://developers.squarespace.com/commerce-apis#replace-address-book-entry/path-parameters) `contactId` ​string · required The contact's ID. `addressBookEntryId` ​string · required The address book entry's ID. ### Replace address book entry › Headers[](https://developers.squarespace.com/commerce-apis#replace-address-book-entry/header-parameters) `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 ### Replace address book entry › Request Body[](https://developers.squarespace.com/commerce-apis#replace-address-book-entry/request-body) [UpdateAddressBookEntryRequest](https://developers.squarespace.com/commerce-apis/~schemas#updateaddressbookentryrequest) `address` ​[ContactAddress](https://developers.squarespace.com/commerce-apis/~schemas#contactaddress)  · required Address properties for a contact. `defaultShipping` ​boolean Whether this entry should be the default shipping address. When updating the entry that is currently the default, changing this value from true to false has no effect. ### Replace address book entry › Responses[](https://developers.squarespace.com/commerce-apis#replace-address-book-entry/responses) 200400403404429 The updated address book entry. [UpdateAddressBookEntryResponse](https://developers.squarespace.com/commerce-apis/~schemas#updateaddressbookentryresponse) `addressBookEntry` ​[AddressBookEntry](https://developers.squarespace.com/commerce-apis/~schemas#addressbookentry) An address book entry for a contact. * * * Delete address book entry[](https://developers.squarespace.com/commerce-apis#delete-address-book-entry) -------------------------------------------------------------------------------------------------------- DELETE https://api.squarespace.com /v1/contacts/{contactId}/address-book/{addressBookEntryId} Deletes the address book entry for the contact. If the deleted entry was the default shipping address, another entry is assigned as the default. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only). ### Delete address book entry › path Parameters[](https://developers.squarespace.com/commerce-apis#delete-address-book-entry/path-parameters) `contactId` ​string · required The contact's ID. `addressBookEntryId` ​string · required The address book entry's ID. ### Delete address book entry › Headers[](https://developers.squarespace.com/commerce-apis#delete-address-book-entry/header-parameters) `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 address book entry › Responses[](https://developers.squarespace.com/commerce-apis#delete-address-book-entry/responses) 204403404429 No content. No data returned * * * [FAQ](https://developers.squarespace.com/commerce-apis/faq) [Analytics](https://developers.squarespace.com/commerce-apis/analytics) --- # Developer Portal Menu HTML Attributes[](https://developers.squarespace.com/custom-code/html#html-attributes) ======================================================================================= _Note: code examples are included for illustration purposes, and may not reflect the exact DOM structure on a Squarespace website._ General[](https://developers.squarespace.com/custom-code/html#general) ----------------------------------------------------------------------- ### `id={value}` (sections)[](https://developers.squarespace.com/custom-code/html#idvalue-sections) The value specified as the anchor link slug for supported page sections in version 7.1 will appear as the `id` attribute of the section. See [Creating anchor links](https://support.squarespace.com/hc/articles/207135178-Creating-anchor-links) for more details. _Only anchor link slugs that are manually created using the editing UI are persistent. Automatically generated `id` values may change._ Code `
...
` ### `data-sqsp-section={type}`[](https://developers.squarespace.com/custom-code/html#data-sqsp-sectiontype) The outer wrapper of a page [Section](https://support.squarespace.com/hc/articles/360027987711-Page-sections) in version 7.1. Here is the list of currently supported sections, and their `{type}` value: * Classic Editor: `classic-editor` * Fluid Engine: `fluid-engine` * Auto Layout: `auto-layout` * Gallery: `gallery` * Blog List: `blog-list` * Blog Item: `blog-item` * Events List: `events-list` * Events Item: `events-item` * Portfolio List: `portfolio-list` * Product List: `product-list` * Product Detail: `product-detail` * Product Reviews: `product-reviews` * Related Products: `related-products` * Course List: `course-list` * Course Item: `course-item` * Videos List: `videos-list` * Videos Item: `videos-item` Code `
...
` ### `data-sqsp-block={type}`[](https://developers.squarespace.com/custom-code/html#data-sqsp-blocktype) The outer wrapper of a [Block](https://support.squarespace.com/hc/en-us/articles/206543757-Adding-content-with-blocks) . Here is the list of currently supported Blocks, and their `{type}` value: * Text Block: `text` * Button Block: `button` * Image Block ([Fluid Engine](https://support.squarespace.com/hc/en-us/articles/6421525446541-Editing-your-site-with-Fluid-Engine) only): `image` * Image Block ([Classic Editor](https://support.squarespace.com/hc/en-us/articles/6421525446541-Editing-your-site-with-Fluid-Engine#h_01HDHP7Y491CD0W58JXMFW21Y2) only): `image-classic` * Shape Block: `shape` * Form Block: `form` * Zola Block: `zola` * Code Block: `code` * Embed Block: `embed` * OpenTable Block: `opentable` * Scrolling Block: `scrolling` * Quote Block: `quote` * Summary Block: `summary` * Video Block: `video` * Social Links Block: `social-links` * Search Block: `search` * Scheduling Block: `scheduling` * Audio Block: `audio` * Archive Block: `archive` * Gallery Block: `gallery` * Line Block: `line` * Accordion Block: `accordion` Button Block[](https://developers.squarespace.com/custom-code/html#button-block) --------------------------------------------------------------------------------- Code `
...
` ### `data-sqsp-button`[](https://developers.squarespace.com/custom-code/html#data-sqsp-button) An interactive button. Currently used to identify the Button Block and Form Block buttons. Code ` ... ` Text Block[](https://developers.squarespace.com/custom-code/html#text-block) ----------------------------------------------------------------------------- ### `data-sqsp-text-block-content`[](https://developers.squarespace.com/custom-code/html#data-sqsp-text-block-content) A container enclosing the rich text content of a Text Block. Code `

My Heading

Lorem ipsum dolor sit amet.

` Image Block ([Fluid Engine](https://support.squarespace.com/hc/en-us/articles/6421525446541-Editing-your-site-with-Fluid-Engine) only)[](https://developers.squarespace.com/custom-code/html#image-block-fluid-engine-only) ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### `data-sqsp-image-block-image-container`[](https://developers.squarespace.com/custom-code/html#data-sqsp-image-block-image-container) A container enclosing the image of an Image Block. _Note: this element may not be the direct parent of the `img` element._ Code `
` ### `data-sqsp-image-block-image`[](https://developers.squarespace.com/custom-code/html#data-sqsp-image-block-image) The `img` element of an Image Block. Code `` ### `data-sqsp-image-block-link`[](https://developers.squarespace.com/custom-code/html#data-sqsp-image-block-link) The `a` element of an Image Block, if it has a link attached. Code ` ` ### `data-sqsp-image-block-lightbox-button`[](https://developers.squarespace.com/custom-code/html#data-sqsp-image-block-lightbox-button) The element that triggers the Image Block lightbox, if it is set to open a lightbox. Code `` Image Block ([Classic Editor](https://support.squarespace.com/hc/en-us/articles/6421525446541-Editing-your-site-with-Fluid-Engine#h_01HDHP7Y491CD0W58JXMFW21Y2) only)[](https://developers.squarespace.com/custom-code/html#image-block-classic-editor-only) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### `data-sqsp-image-classic-block-image-container`[](https://developers.squarespace.com/custom-code/html#data-sqsp-image-classic-block-image-container) A container enclosing the image of the classic editor Image Block. _Note: this element may not be the direct parent of the `img` element._ Code `
` ### `data-sqsp-image-classic-block-image`[](https://developers.squarespace.com/custom-code/html#data-sqsp-image-classic-block-image) The `img` element of a classic editor Image Block. Code `` ### `data-sqsp-image-classic-block-image-link`[](https://developers.squarespace.com/custom-code/html#data-sqsp-image-classic-block-image-link) The `a` element of a classic editor Image Block, if it has a link attached to the image. Code ` ` ### `data-sqsp-image-classic-block-lightbox-button`[](https://developers.squarespace.com/custom-code/html#data-sqsp-image-classic-block-lightbox-button) The element that triggers the classic editor Image Block lightbox, if it is set to open a lightbox. Code `` ### `data-sqsp-image-classic-block-layout={value}`[](https://developers.squarespace.com/custom-code/html#data-sqsp-image-classic-block-layoutvalue) Identifies the design layout selected for the classic editor Image Block. Occurs on an element containing the image, text, and button of the classic editor Image Block. Possible values: `inline`, `poster`, `card`, `overlap`, `collage`, `stack`. Code `
...
` ### `data-sqsp-image-classic-block-content-container`[](https://developers.squarespace.com/custom-code/html#data-sqsp-image-classic-block-content-container) A container enclosing Title, Subtitle, and Button of the classic editor Image Block in non-Inline layouts. Code `
...
` ### `data-sqsp-image-classic-block-caption-container`[](https://developers.squarespace.com/custom-code/html#data-sqsp-image-classic-block-caption-container) A container enclosing the caption of a classic editor Image Block in the Inline layout. _Note: this element may not be the direct container of the caption text._ Code `
...
` ### `data-sqsp-image-classic-block-title`[](https://developers.squarespace.com/custom-code/html#data-sqsp-image-classic-block-title) A container enclosing the title of a classic editor Image Block in non-Inline layouts. _Note: this element may not be the direct parent of the title `h1`/`h2`/`h3`/`h4` element._ Code `
...

Title

...
` ### `data-sqsp-image-classic-block-subtitle`[](https://developers.squarespace.com/custom-code/html#data-sqsp-image-classic-block-subtitle) A container enclosing the subtitle of a classic editor Image Block in non-Inline layouts. _Note: this element may not be the direct parent of the subtitle `p` element._ Code `
...

Subtitle

...
` ### `data-sqsp-image-classic-block-link-button`[](https://developers.squarespace.com/custom-code/html#data-sqsp-image-classic-block-link-button) The `a` element of a classic editor Image Block in non-Inline layouts, the link is set to appear on a button. Code `Learn more` Shape Block[](https://developers.squarespace.com/custom-code/html#shape-block) ------------------------------------------------------------------------------- ### `data-sqsp-shape-block-shape`[](https://developers.squarespace.com/custom-code/html#data-sqsp-shape-block-shape) The shape element of a Shape Block. Code ` ... ` Accordion Block[](https://developers.squarespace.com/custom-code/html#accordion-block) --------------------------------------------------------------------------------------- ### `data-sqsp-accordion-block-divider`[](https://developers.squarespace.com/custom-code/html#data-sqsp-accordion-block-divider) A divider element separating the Accordion Block items. Code `
  • My heading

    My paragraph text
  • ` ### `data-sqsp-accordion-block-item-title`[](https://developers.squarespace.com/custom-code/html#data-sqsp-accordion-block-item-title) A container enclosing the title text of the Accordion Block item. Code `
  • My heading

    My paragraph text
  • ` ### `data-sqsp-accordion-block-item-description`[](https://developers.squarespace.com/custom-code/html#data-sqsp-accordion-block-item-description) A container enclosing the description text of the Accordion Block item. Code `
  • My heading

    My paragraph text
  • ` [About](https://developers.squarespace.com/custom-code/about) --- # Developer Portal Menu Notification delivery[](https://developers.squarespace.com/webhooks/notification-delivery#notification-delivery) ================================================================================================================= Notifications are sent as `POST` requests to subscribed webhook endpoints. To ensure successful delivery of notifications, it's important for receiving endpoints to respond quickly. Squarespace guarantees "at least once delivery" of notifications on a best effort basis. Successful vs. unsuccessful delivery[](https://developers.squarespace.com/webhooks/notification-delivery#successful-vs-unsuccessful-delivery) ---------------------------------------------------------------------------------------------------------------------------------------------- A notification delivery attempt is **successful** if Squarespace receives a `2xx` status code from the webhook endpoint. If the request times out or receives a status code _other_ than `2xx`, the delivery is unsuccessful and is retried. Squarespace attempts delivery several times for up to 48 hours. > _Note: Squarespace may delete a webhook subscription if multiple requests are unsuccessful._ Duplicate notifications[](https://developers.squarespace.com/webhooks/notification-delivery#duplicate-notifications) --------------------------------------------------------------------------------------------------------------------- In rare circumstances, webhook endpoints may receive a notification more than once. To gracefully handle duplicates, it is important for webhook endpoints to take this into account by tracking which notification `id`s have already been processed. Order of notifications[](https://developers.squarespace.com/webhooks/notification-delivery#order-of-notifications) ------------------------------------------------------------------------------------------------------------------- Squarespace does not guarantee delivery in the order the events occurred, nor when the notifications were generated, as indicated by their `createdOn` field. Webhook endpoints should expect to receive notifications out of order, and handle them accordingly. [Verifying notifications](https://developers.squarespace.com/webhooks/verifying-notifications) [Order create](https://developers.squarespace.com/webhooks/events/order-create) --- # Developer Portal Menu Commerce API [Commerce API](https://developers.squarespace.com/commerce-apis) Analytics ========= [Download schema](https://developers.squarespace.com/commerce-apis/latest/schema-processor-version-version-latest.json) Query analytics for a website * * * Retrieve transaction summaries grouped by contact[](https://developers.squarespace.com/commerce-apis/analytics#retrieve-transaction-summaries-grouped-by-contact) ------------------------------------------------------------------------------------------------------------------------------------------------------------------ POST https://api.squarespace.com /v1/analytics/transaction-summaries ### Retrieve transaction summaries grouped by contact › Headers[](https://developers.squarespace.com/commerce-apis/analytics#retrieve-transaction-summaries-grouped-by-contact/header-parameters) `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 ### Retrieve transaction summaries grouped by contact › Request Body[](https://developers.squarespace.com/commerce-apis/analytics#retrieve-transaction-summaries-grouped-by-contact/request-body) [RetrieveTransactionsSummariesRequest](https://developers.squarespace.com/commerce-apis/~schemas#retrievetransactionssummariesrequest) `contactIds` ​string\[\] · minItems: 1 · maxItems: 1000 · required `groupBy` ​string · enum · minLength: 1 · required Field to group results by, should be a contactId Enum values: contactId Example: contactId ### Retrieve transaction summaries grouped by contact › Responses[](https://developers.squarespace.com/commerce-apis/analytics#retrieve-transaction-summaries-grouped-by-contact/responses) 200400 Transaction summaries retrieved [RetrieveTransactionsSummariesResponse](https://developers.squarespace.com/commerce-apis/~schemas#retrievetransactionssummariesresponse) `transactionsSummaryWrappers` ​[TransactionsSummaryWrapper\[\]](https://developers.squarespace.com/commerce-apis/~schemas#transactionssummarywrapper) List of transaction summary wrappers * * * [Contacts](https://developers.squarespace.com/commerce-apis/contacts) [Discounts](https://developers.squarespace.com/commerce-apis/discounts) --- # Developer Portal Menu Webhook Subscriptions API overview[](https://developers.squarespace.com/commerce-apis/webhook-subscriptions-overview#webhook-subscriptions-api-overview) ========================================================================================================================================================= **Current version: 1.0** _For versioning details, read the [Versioning](https://developers.squarespace.com/commerce-apis/versioning) guide._ Subscribe to notifications from Squarespace websites by configuring a webhook endpoint with the Webhooks Subscriptions API. But before using this API, read the [Webhooks overview](https://developers.squarespace.com/webhooks/overview) for details on subscriptions and notifications. > _Note: Requests to the Webhook Subscriptions API must authenticate using an OAuth token. See the [Authentication and permissions](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) > guide for details. In addition, the token must have appropriate permissions for certain event types._ API resources[](https://developers.squarespace.com/commerce-apis/webhook-subscriptions-overview#api-resources) --------------------------------------------------------------------------------------------------------------- The Webhooks Subscriptions API returns information in `Webhook Subscription` resource objects. The resource includes information like the subscribed webhook endpoint and events the endpoint is subscribed to. Resource fields are described under **Response example** for each Webhook Subscriptions API endpoint. Further reading[](https://developers.squarespace.com/commerce-apis/webhook-subscriptions-overview#further-reading) ------------------------------------------------------------------------------------------------------------------- * Become familiar with [common commerce terms](https://developers.squarespace.com/commerce-apis/glossary) and how they're related to the API * Read the [FAQ](https://developers.squarespace.com/commerce-apis/faq) guide for answers to common questions [WebhookSubscriptions](https://developers.squarespace.com/commerce-apis/webhooksubscriptions) --- # Developer Portal Menu Retrieve basic site information[](https://developers.squarespace.com/commerce-apis/retrieve-basic-site-info#retrieve-basic-site-information) ============================================================================================================================================= Code `GET https://api.squarespace.com/{api-version}/authorization/website` Websites on Squarespace can have many API keys or OAuth tokens, though a given API key or OAuth token can only belong to one website. Use the Authorization API endpoint to identify which website is associated with an API key or OAuth token. The response provides basic site information to aid in development when using Commerce APIs. **Parameters** `{api-version}` string **required** The current version for the Authorization API is **1.0**. **Request example** TerminalCode `curl "https://api.squarespace.com/1.0/authorization/website" \ -i \ -H "Authorization: Bearer YOUR_SECRET_API_KEY" \ -H "User-Agent: YOUR_PRODUCT / YOUR_PRODUCT_VERSION" \ -H "Content-Type: application/json"` If you're new to Commerce APIs, read the [Making requests](https://developers.squarespace.com/commerce-apis/making-requests) guide to learn more about how to access this endpoint. **Response example** A successful request generates a response in JSON. JavascriptCode `{ // Id of the website that owns the API key or OAuth. "id": "5863f6faf7e0abc3cf95ce3a", // Identifier, or subdomain, of the website within squarespace.com. "siteId": "developers", // The website's title. "title": "Squarespace Developers", // The website's canonical URL, which specifies the website's custom domain when available. "url": "https://developers.squarespace.com", // The currency the website uses for commerce needs. // Configured in "Commerce > Payments". "currency": "USD", // The measurement standard the website uses for commerce needs, such as product dimensions. // Possible values are 'IMPERIAL' and 'METRIC'. // Configured in "Settings > Language & Region" in the Squarespace UI. "measurementStandard": "METRIC", // An ISO language and country code associated with the website. // This doesn't reflect the language shown to users in the Squarespace UI. // Configured in "Settings > Language & Region" in the Squarespace UI. "language": "en-US", // The time zone associated with the website. // Configured in "Settings > Language & Region" in the Squarespace UI. "timeZone": "America/New_York", // Physical business location information associated with the website; // object doesn't include street address nor name of the business. // Configured in "Settings > Business Information" in the Squarespace UI. "location": { "region": "New York, NY, 10014", "country": "United States" } }` [Making requests](https://developers.squarespace.com/commerce-apis/making-requests) [Idempotency-Key header](https://developers.squarespace.com/commerce-apis/idempotency-key) --- # Developer Portal Menu Commerce API [Commerce API](https://developers.squarespace.com/commerce-apis) Contacts ======== [Download schema](https://developers.squarespace.com/commerce-apis/latest/schema-processor-version-version-latest.json) Manage customer contacts and address book entries for a website: create, read, update, delete, and query contacts; maintain addresses for shipping and fulfillment. * * * List contacts[](https://developers.squarespace.com/commerce-apis/contacts#list-contacts) ----------------------------------------------------------------------------------------- GET https://api.squarespace.com /v1/contacts Returns a paginated list of contacts for the website. Requires OAuth website scope website.contacts.read or website.contacts, or API key scope CONTACT\_READONLY or CONTACT, or OAuth website scope website.profiles.read or website.profiles (OAuth only). ### List contacts › query Parameters[](https://developers.squarespace.com/commerce-apis/contacts#list-contacts/query-parameters) `pageSize` ​integer · int32 · min: 0 · max: 1000 number of contacts to retrieve per request Default: 50 `cursor` ​string where next page of results begins. should be {pagination.nextPageCursor} from previous response. ### List contacts › Headers[](https://developers.squarespace.com/commerce-apis/contacts#list-contacts/header-parameters) `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 contacts › Responses[](https://developers.squarespace.com/commerce-apis/contacts#list-contacts/responses) 200400403429 A paginated list of contacts. [PaginatedGetContactsResponse](https://developers.squarespace.com/commerce-apis/~schemas#paginatedgetcontactsresponse) `contacts` ​[Contact\[\]](https://developers.squarespace.com/commerce-apis/~schemas#contact) paginated list of contacts retrieved `pagination` ​object * * * Create contact[](https://developers.squarespace.com/commerce-apis/contacts#create-contact) ------------------------------------------------------------------------------------------- POST https://api.squarespace.com /v1/contacts Creates a new contact. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only). ### Create contact › Headers[](https://developers.squarespace.com/commerce-apis/contacts#create-contact/header-parameters) `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 contact › Request Body[](https://developers.squarespace.com/commerce-apis/contacts#create-contact/request-body) [CreateContactRequest](https://developers.squarespace.com/commerce-apis/~schemas#createcontactrequest) `firstName` ​string · required Contact's first name Example: john `lastName` ​string · required Contact's last name Example: doe `locale` ​string · required Contact's locale Example: en-US `primaryEmail` ​[CreateEmail](https://developers.squarespace.com/commerce-apis/~schemas#createemail)  · required Primary email supplied when creating a contact. ### Create contact › Responses[](https://developers.squarespace.com/commerce-apis/contacts#create-contact/responses) 201400403409429 The created contact. [CreateContactResponse](https://developers.squarespace.com/commerce-apis/~schemas#createcontactresponse) `contact` ​[Contact](https://developers.squarespace.com/commerce-apis/~schemas#contact) A contact. * * * Query contacts[](https://developers.squarespace.com/commerce-apis/contacts#query-contacts) ------------------------------------------------------------------------------------------- POST https://api.squarespace.com /v1/contacts/query Returns a paginated list of contacts matching filters and sort options in the request body. Requires OAuth website scope website.contacts.read or website.contacts, or API key scope CONTACT\_READONLY or CONTACT, or OAuth website scope website.profiles.read or website.profiles (OAuth only). ### Query contacts › Headers[](https://developers.squarespace.com/commerce-apis/contacts#query-contacts/header-parameters) `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 ### Query contacts › Request Body[](https://developers.squarespace.com/commerce-apis/contacts#query-contacts/request-body) [QueryContactsRequest](https://developers.squarespace.com/commerce-apis/~schemas#querycontactsrequest) `acceptsMarketingWithDate` ​[AcceptsMarketingWithDate](https://developers.squarespace.com/commerce-apis/~schemas#acceptsmarketingwithdate) Contact's marketing settings with joined on date `cursor` ​string The cursor for the next page of results. Use the value of `pagination.nextPageCursor` from the previous response. `donationAmount` ​[IntegerFilter](https://developers.squarespace.com/commerce-apis/~schemas#integerfilter) Object for filtering by a min and max integer `donationCount` ​[IntegerFilter](https://developers.squarespace.com/commerce-apis/~schemas#integerfilter) Object for filtering by a min and max integer `firstDonationOn` ​[DateFilter](https://developers.squarespace.com/commerce-apis/~schemas#datefilter) Object for filtering by before and after dates `firstOrderOn` ​[DateFilter](https://developers.squarespace.com/commerce-apis/~schemas#datefilter) Object for filtering by before and after dates `lastDonationOn` ​[DateFilter](https://developers.squarespace.com/commerce-apis/~schemas#datefilter) Object for filtering by before and after dates `lastOrderOn` ​[DateFilter](https://developers.squarespace.com/commerce-apis/~schemas#datefilter) Object for filtering by before and after dates `orderAmount` ​[IntegerFilter](https://developers.squarespace.com/commerce-apis/~schemas#integerfilter) Object for filtering by a min and max integer `orderCount` ​[IntegerFilter](https://developers.squarespace.com/commerce-apis/~schemas#integerfilter) Object for filtering by a min and max integer `pageSize` ​integer · int32 · min: 1 · max: 1000 The number of contacts to return per request. Default: 50 `searchString` ​string Search string for Name and Email address `sortDirection` ​string · enum Direction to sort results, ASCENDING or DESCENDING Enum values: ASCENDING DESCENDING `sortField` ​string · enum Field to sort results by Enum values: ID CREATED\_ON EMAIL ACCEPTS\_MARKETING\_JOINED\_ON FIRST\_NAME LAST\_NAME ORDER\_COUNT LAST\_ORDER\_ON show 4 more ### Query contacts › Responses[](https://developers.squarespace.com/commerce-apis/contacts#query-contacts/responses) 200400403429 A paginated list of contacts matching the query. [PaginatedQueryContactsResponse](https://developers.squarespace.com/commerce-apis/~schemas#paginatedquerycontactsresponse) `contacts` ​[Contact\[\]](https://developers.squarespace.com/commerce-apis/~schemas#contact) paginated list of contacts retrieved `pagination` ​object * * * Get contact[](https://developers.squarespace.com/commerce-apis/contacts#get-contact) ------------------------------------------------------------------------------------- GET https://api.squarespace.com /v1/contacts/{contactId} Returns the contact for the given contact ID. Requires OAuth website scope website.contacts.read or website.contacts, or API key scope CONTACT\_READONLY or CONTACT, or OAuth website scope website.profiles.read or website.profiles (OAuth only). ### Get contact › path Parameters[](https://developers.squarespace.com/commerce-apis/contacts#get-contact/path-parameters) `contactId` ​string · required The contact's ID. ### Get contact › Headers[](https://developers.squarespace.com/commerce-apis/contacts#get-contact/header-parameters) `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 contact › Responses[](https://developers.squarespace.com/commerce-apis/contacts#get-contact/responses) 200403404429 The requested contact. [GetContactResponse](https://developers.squarespace.com/commerce-apis/~schemas#getcontactresponse) `contact` ​[Contact](https://developers.squarespace.com/commerce-apis/~schemas#contact) A contact. * * * Delete contact[](https://developers.squarespace.com/commerce-apis/contacts#delete-contact) ------------------------------------------------------------------------------------------- DELETE https://api.squarespace.com /v1/contacts/{contactId} Deletes the contact for the given contact ID. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only). ### Delete contact › path Parameters[](https://developers.squarespace.com/commerce-apis/contacts#delete-contact/path-parameters) `contactId` ​string · required The contact's ID. ### Delete contact › Headers[](https://developers.squarespace.com/commerce-apis/contacts#delete-contact/header-parameters) `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 contact › Responses[](https://developers.squarespace.com/commerce-apis/contacts#delete-contact/responses) 204403404429 No content. No data returned * * * Update contact[](https://developers.squarespace.com/commerce-apis/contacts#update-contact) ------------------------------------------------------------------------------------------- PATCH https://api.squarespace.com /v1/contacts/{contactId} Updates a contact using JSON merge patch. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only). ### Update contact › path Parameters[](https://developers.squarespace.com/commerce-apis/contacts#update-contact/path-parameters) `contactId` ​string · required The contact's ID. ### Update contact › Headers[](https://developers.squarespace.com/commerce-apis/contacts#update-contact/header-parameters) `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 contact › Request Body[](https://developers.squarespace.com/commerce-apis/contacts#update-contact/request-body) [PatchContactRequest](https://developers.squarespace.com/commerce-apis/~schemas#patchcontactrequest) `firstName` ​string The contact's first name. Example: John `lastName` ​string The contact's last name. Example: Smith `locale` ​string The contact's locale. Example: en-US `primaryEmail` ​[PatchEmail](https://developers.squarespace.com/commerce-apis/~schemas#patchemail) Primary email fields for an update request. Example: {"email":"johnsmith@mail.com","acceptsMarketing":true} ### Update contact › Responses[](https://developers.squarespace.com/commerce-apis/contacts#update-contact/responses) 200400403404409429 The updated contact. [PatchContactResponse](https://developers.squarespace.com/commerce-apis/~schemas#patchcontactresponse) `contact` ​[Contact](https://developers.squarespace.com/commerce-apis/~schemas#contact) A contact. * * * Get address book[](https://developers.squarespace.com/commerce-apis/contacts#get-address-book) ----------------------------------------------------------------------------------------------- GET https://api.squarespace.com /v1/contacts/{contactId}/address-book Returns paginated addresses for the contact. When there is at least one entry, exactly one is the default shipping address (defaultShippingAddressId and each entry's defaultShipping reflect this). The default shipping address (when present) is always included on the first page of results. Requires OAuth website scope website.contacts.read or website.contacts, or API key scope CONTACT\_READONLY or CONTACT, or OAuth website scope website.profiles.read or website.profiles (OAuth only). ### Get address book › path Parameters[](https://developers.squarespace.com/commerce-apis/contacts#get-address-book/path-parameters) `contactId` ​string · required The contact's ID. ### Get address book › query Parameters[](https://developers.squarespace.com/commerce-apis/contacts#get-address-book/query-parameters) `pageSize` ​integer · int32 · min: 0 · max: 1000 number of contacts to retrieve per request Default: 50 `cursor` ​string where next page of results begins. should be {pagination.nextPageCursor} from previous response. ### Get address book › Headers[](https://developers.squarespace.com/commerce-apis/contacts#get-address-book/header-parameters) `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 address book › Responses[](https://developers.squarespace.com/commerce-apis/contacts#get-address-book/responses) 200403404429 Paginated list of the contact's addresses. When there is at least one entry, the first page always includes the default shipping address, and defaultShippingAddressId identifies it. On later pages, addressBookEntries is the next slice only; defaultShippingAddressId is present only when the default shipping entry appears in that slice. [GetAddressBookResponse](https://developers.squarespace.com/commerce-apis/~schemas#getaddressbookresponse) `addressBook` ​[AddressBook](https://developers.squarespace.com/commerce-apis/~schemas#addressbook) Address settings for a contact. When there is at least one address book entry, exactly one is the default shipping address; default shipping address is always returned on the first page of paginated results). `pagination` ​[PaginationDetails](https://developers.squarespace.com/commerce-apis/~schemas#paginationdetails) * * * Create address book entry[](https://developers.squarespace.com/commerce-apis/contacts#create-address-book-entry) ----------------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /v1/contacts/{contactId}/address-book Creates a new address book entry for the contact. If this is the contact's only address book entry after creation, it becomes the default shipping address even when defaultShipping is false. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only). ### Create address book entry › path Parameters[](https://developers.squarespace.com/commerce-apis/contacts#create-address-book-entry/path-parameters) `contactId` ​string · required The contact's ID. ### Create address book entry › Headers[](https://developers.squarespace.com/commerce-apis/contacts#create-address-book-entry/header-parameters) `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 address book entry › Request Body[](https://developers.squarespace.com/commerce-apis/contacts#create-address-book-entry/request-body) [CreateAddressBookEntryRequest](https://developers.squarespace.com/commerce-apis/~schemas#createaddressbookentryrequest) `address` ​[ContactAddress](https://developers.squarespace.com/commerce-apis/~schemas#contactaddress)  · required Address properties for a contact. `defaultShipping` ​boolean Whether this entry should be the default shipping address. If this is the only address book entry for the contact after creation, it becomes the default even when set to false. ### Create address book entry › Responses[](https://developers.squarespace.com/commerce-apis/contacts#create-address-book-entry/responses) 201400403404429 The created address book entry. [CreateAddressBookEntryResponse](https://developers.squarespace.com/commerce-apis/~schemas#createaddressbookentryresponse) `addressBookEntry` ​[AddressBookEntry](https://developers.squarespace.com/commerce-apis/~schemas#addressbookentry) An address book entry for a contact. * * * Get address book entry[](https://developers.squarespace.com/commerce-apis/contacts#get-address-book-entry) ----------------------------------------------------------------------------------------------------------- GET https://api.squarespace.com /v1/contacts/{contactId}/address-book/{addressBookEntryId} Returns a single address book entry for the contact. Requires OAuth website scope website.contacts.read or website.contacts, or API key scope CONTACT\_READONLY or CONTACT, or OAuth website scope website.profiles.read or website.profiles (OAuth only). ### Get address book entry › path Parameters[](https://developers.squarespace.com/commerce-apis/contacts#get-address-book-entry/path-parameters) `contactId` ​string · required The contact's ID. `addressBookEntryId` ​string · required The address book entry's ID. ### Get address book entry › Headers[](https://developers.squarespace.com/commerce-apis/contacts#get-address-book-entry/header-parameters) `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 address book entry › Responses[](https://developers.squarespace.com/commerce-apis/contacts#get-address-book-entry/responses) 200403404429 The requested address book entry. [GetAddressBookEntryResponse](https://developers.squarespace.com/commerce-apis/~schemas#getaddressbookentryresponse) `addressBookEntry` ​[AddressBookEntry](https://developers.squarespace.com/commerce-apis/~schemas#addressbookentry) An address book entry for a contact. * * * Replace address book entry[](https://developers.squarespace.com/commerce-apis/contacts#replace-address-book-entry) ------------------------------------------------------------------------------------------------------------------- PUT https://api.squarespace.com /v1/contacts/{contactId}/address-book/{addressBookEntryId} Replaces an address book entry for the contact with a full JSON body. When updating the entry that is currently the default, setting "defaultShipping" from true to false has no effect. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only). ### Replace address book entry › path Parameters[](https://developers.squarespace.com/commerce-apis/contacts#replace-address-book-entry/path-parameters) `contactId` ​string · required The contact's ID. `addressBookEntryId` ​string · required The address book entry's ID. ### Replace address book entry › Headers[](https://developers.squarespace.com/commerce-apis/contacts#replace-address-book-entry/header-parameters) `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 ### Replace address book entry › Request Body[](https://developers.squarespace.com/commerce-apis/contacts#replace-address-book-entry/request-body) [UpdateAddressBookEntryRequest](https://developers.squarespace.com/commerce-apis/~schemas#updateaddressbookentryrequest) `address` ​[ContactAddress](https://developers.squarespace.com/commerce-apis/~schemas#contactaddress)  · required Address properties for a contact. `defaultShipping` ​boolean Whether this entry should be the default shipping address. When updating the entry that is currently the default, changing this value from true to false has no effect. ### Replace address book entry › Responses[](https://developers.squarespace.com/commerce-apis/contacts#replace-address-book-entry/responses) 200400403404429 The updated address book entry. [UpdateAddressBookEntryResponse](https://developers.squarespace.com/commerce-apis/~schemas#updateaddressbookentryresponse) `addressBookEntry` ​[AddressBookEntry](https://developers.squarespace.com/commerce-apis/~schemas#addressbookentry) An address book entry for a contact. * * * Delete address book entry[](https://developers.squarespace.com/commerce-apis/contacts#delete-address-book-entry) ----------------------------------------------------------------------------------------------------------------- DELETE https://api.squarespace.com /v1/contacts/{contactId}/address-book/{addressBookEntryId} Deletes the address book entry for the contact. If the deleted entry was the default shipping address, another entry is assigned as the default. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only). ### Delete address book entry › path Parameters[](https://developers.squarespace.com/commerce-apis/contacts#delete-address-book-entry/path-parameters) `contactId` ​string · required The contact's ID. `addressBookEntryId` ​string · required The address book entry's ID. ### Delete address book entry › Headers[](https://developers.squarespace.com/commerce-apis/contacts#delete-address-book-entry/header-parameters) `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 address book entry › Responses[](https://developers.squarespace.com/commerce-apis/contacts#delete-address-book-entry/responses) 204403404429 No content. No data returned * * * [FAQ](https://developers.squarespace.com/commerce-apis/faq) [Analytics](https://developers.squarespace.com/commerce-apis/analytics) --- # Developer Portal Menu Beginner Tutorial[](https://developers.squarespace.com/beginner-tutorial#beginner-tutorial) ============================================================================================ This tutorial will help newcomers to the Squarespace Developer Platform learn by doing. Check out this guide for more information on Squarespace Developer Platform functionality to see if it fits your needs. Introduction[](https://developers.squarespace.com/beginner-tutorial#introduction) ---------------------------------------------------------------------------------- Let's get started working on the Squarespace Developer Platform. In this tutorial, we'll be enabling the Developer Platform on your website, setting up your development workflow using Git, and making your first edits to the template code! To follow this tutorial, you should understand the fundamentals of HTML, CSS, JavaScript, and Git. If you aren't familiar with writing code, here's a list of [recommended learning resources](https://support.squarespace.com/hc/en-us/articles/205815928-Adding-custom-code-to-your-site#toc-coding-resources) . Check out [this guide](https://support.squarespace.com/hc/articles/206545717) for more information on the Developer Platform's functionality and to see if it fits your needs. [Getting Started](https://developers.squarespace.com/beginner-tutorial#getting-started) [Template File Structure](https://developers.squarespace.com/beginner-tutorial#template-file-structure-overviews) [Part 1 - Making Changes](https://developers.squarespace.com/beginner-tutorial#part-1---making-changes) [Part 2 - Displaying Dynamic Content](https://developers.squarespace.com/beginner-tutorial#part-2---displaying-dynamic-content) [Part 3 - Adding Pages](https://developers.squarespace.com/beginner-tutorial#part-3---adding-pages) [Part 4 - Making a Navigation](https://developers.squarespace.com/beginner-tutorial#part-4---making-a-navigation) [Part 5 - Collection Overview](https://developers.squarespace.com/beginner-tutorial#part-5---collection-overview) [Part 6 - Creating a Blog Collection](https://developers.squarespace.com/beginner-tutorial#part-6---creating-a-blog-collection) * * * Getting Started[](https://developers.squarespace.com/beginner-tutorial#getting-started) ---------------------------------------------------------------------------------------- In this tutorial, you'll be using Git to publish your template code to the Squarespace servers. Squarespace creates a hosted Git repository for each website, so that you can publish your code with `git push`. To get started with a Squarespace website using git, follow these steps: ### Create a site from the Beginner Tutorial Template[](https://developers.squarespace.com/beginner-tutorial#create-a-site-from-the-beginner-tutorial-template) Now that the background for this tutorial is established, start by visiting the [Beginner Tutorial Template demo site](https://beginner-tutorial.squarespace.com/) and clicking **Create a Site Like This**. This demo will explore the process of creating a template on the Developer Platform. ### Enable Developer Mode[](https://developers.squarespace.com/beginner-tutorial#enable-developer-mode) Now that you have a site, the next step is to enable Developer Mode. 1. In the Home Menu, click Settings, click Advanced, and then click Developer Mode. 2. Switch the toggle in the panel to On. 3. Read the warning message and click Yes, I understand to confirm. _Note: When you enable Developer Mode, Squarespace forks your template to create an identical codebase that you can edit. You'll still see all content and Style Editor options while in Developer Mode. Read more about what changes you can expect while using the Developer Platform [here](https://support.squarespace.com/hc/articles/206545717) ._ ![Developer Toggle](https://developers.squarespace.com/assets/images/toggle.png) ### Accessing your template files[](https://developers.squarespace.com/beginner-tutorial#accessing-your-template-files) Once Developer Mode is enabled, clone your template files via Git. Access your site's template files on the repository connected to your GitHub account. Below is an example of what the Git clone command will look like: TerminalCode `git clone https://github.com/{{ your_org }}/{{ your_repo }}.git` After cloning the template files, open the 'template' folder in a code editor you like. Template File Structure Overviews[](https://developers.squarespace.com/beginner-tutorial#template-file-structure-overviews) ---------------------------------------------------------------------------------------------------------------------------- Each Squarespace template is made up of several template files. Every template must have, at a minimum, a region file (usually named `site.region`) and a template configuration file named `template.conf`. ### The .region File[](https://developers.squarespace.com/beginner-tutorial#the-region-file) A region file defines the layout of template pages. Typically, this file is used as the global site wrapper template, containing the site header, footer, and sidebars. Every template must have at least one .region file. More advanced templates can have multiple .region files describing the different layouts and layout sections (header, footer, sidebar etc.). Typically the 'site.region' file is used as the default layout. Region files are composed of standard HTML and JSON-T to render dynamic content. ### The `template.conf` File[](https://developers.squarespace.com/beginner-tutorial#the-templateconf-file) The `template.conf` file uses JSON to define the configuration of essential elements within the template. This is where you can: * Name your template * Specify layouts * Add navigation sections * Specify stylesheets to be rolled up into `site.css` and more. ### Other Template Files[](https://developers.squarespace.com/beginner-tutorial#other-template-files) Depending on how a particular template was designed, it may or may not include all the folders listed below. Our tutorial template will begin with just a `template.conf`, `site.region` and some basic styles in a `base.less` file. Missing folders can be added using Git: * **/assets** static design assets — _example: images, fonts and icons_ * **/blocks** block files — JSON-T "partials" — reusable code that can be included elsewhere in your JSON-T. _Example navigation.block_ * **/collections** collection files — _\[collection\].list, \[collection\].item, \[collection\].conf_ * **/pages** static page files — _\[static\].page, \[static\].page.conf_ * **/scripts** JavaScript files — _site.js_ * **/styles** stylesheet files — _styles.css, styles.less_ * **\[root\]** site-wide files — _site.region, template.conf_ For a more in-depth explanation of these template directories and their purpose, take a look at our full [Template Overview](https://developers.squarespace.com/template-overview) . Once you've accessed and downloaded your template files, the next step is to make a first change to template code. Part 1 - Making Changes[](https://developers.squarespace.com/beginner-tutorial#part-1---making-changes) -------------------------------------------------------------------------------------------------------- Before we get to the fun stuff, let's make a small change to the `site.region` file. This will show you how to publish code to Squarespace, and familiarize you with the workflow. Locate the tag within the `site.region` file and insert the following snippet directly after the opening of your body tag: Code `

    Hello, World!

    ` Next, `git commit` and `git push` it to your live site. Once you've pushed these changes, refresh your browser to see the change on your live site. It should look something like this: ![Hello World](https://developers.squarespace.com/assets/images/helloworld.png) Now that we've successfully made our first modification with the Developer Platform, we'll apply this new knowledge in more advanced ways in Part 2. Part 2 - Displaying Dynamic Content[](https://developers.squarespace.com/beginner-tutorial#part-2---displaying-dynamic-content) -------------------------------------------------------------------------------------------------------------------------------- In part 1 you made a simple change to your website's HTML. You can add any static HTML, CSS or JavaScript code to your Squarespace website. However, the power of the Squarespace Developer Platform is it's ability to display dynamic content. In other words, content from the Squarespace online editor. To display dynamic content, you'll need to use [JSON-T](https://developers.squarespace.com/what-is-json-t) , the template language used on the Squarespace platform. Let's try adding some JSON-T to your template. To begin, locate your site header in the `site.region` file. It should look like this: Code `

    Developer Platform Beginner Tutorial

    ` Replace your current header with this new snippet: Code `

    {website.siteTitle}

    ` In this new snippet, we're using JSON-T to insert the site title from the Squarespace Content Management System (CMS). The JSON-T within the HTML code is denoted by curly braces. (`{}`) Now that we've updated the code for our site title, let's replace the title text with content from the Squarespace online editor. ![Logo and Title](https://developers.squarespace.com/assets/images/logo-title.png) Notice that as you edit the site title, the new title will update on your website. JSON-T can be used to insert several different data values from the CMS, such as the text of a blog post a business' address, or images from a gallery. This is called the context. To view the context for a page, add ?format=json-pretty to the end of the URL. For example: `http://your-website.squarespace.com/?format=json-pretty` This will output the context using JavaScript Object Notation (JSON). You can see that the `siteTitle` is in the `website` section of the JSON data: JavascriptCode `"website": { ... "siteTitle" : "Developer Platform Beginner Tutorial", ... }` _Note: For more information about the JSON context, visit [this guide](https://developers.squarespace.com/what-is-json) . For more information on JSON-T variables and directives, visit [this guide](https://developers.squarespace.com/json-t-directives) . To learn how to add a site title via the CMS, visit the [Adding a site title](https://support.squarespace.com/hc/articles/205815838) help guide._ Part 3 - Adding Pages[](https://developers.squarespace.com/beginner-tutorial#part-3---adding-pages) ---------------------------------------------------------------------------------------------------- So far you've made a change to your template with git, and added some dynamic content to your website with JSON-T. However, this website is still very basic. Let's add some pages! To start, create a Regular Page. You can do this through the Pages panel in the online editor, click the + icon to create a Regular Page on your site. To learn more, visit [Adding pages to your navigation](https://support.squarespace.com/hc/articles/205814778-Adding-pages-to-your-navigation) . Unfortunately, adding a page doesn't do much yet. That's because we haven't yet added the JSON-T necessary to make the page editable. In order to do this, an update to the `site.region` file is required. Just like in Part 2, you can use JSON-T to insert content from the CMS, making the page dynamic. To do this, replace the `
    ` tags with the following snippet: Code `
    {squarespace.main-content}
    ` After you've made this change, commit and push your code to the live site. Now when you refresh your home page in the Squarespace editor, you should be able to add images and text to the page. _Deep Dive: In the above snippet you've added the JSON-T variable `{squarespace.main-content}` that displays the page content from the CMS. Squarespace also needs load an editor interface, letting users drag-and-drop text and images onto the page. The `
    ` tag tells Squarespace where to put the editor interface._ Part 4 - Making a Navigation[](https://developers.squarespace.com/beginner-tutorial#part-4---making-a-navigation) ------------------------------------------------------------------------------------------------------------------ Let's say you've added a few pages to your website. How will visitors find those pages? In this section we'll add a navigation so visitors can discover and navigate through your site. This requires three parts: 1. Changes to your `template.conf` file to configure the navigation, 2. A `navigation.block` file that contains the JSON-T for rendering the navigation menu, and 3. A `` tag in your `site.region` file to place the navigation onto the page. ### Configuring your Navigation[](https://developers.squarespace.com/beginner-tutorial#configuring-your-navigation) Navigation sections are defined in the `template.conf` file. The navigations key in the `template.conf` file defines the Navigation areas available in the Pages panel of the interface. Currently, you can only add pages to the Not Linked section. Let's create a new navigation section by editing the `template.conf` file. To do so, replace the contents of your `template.conf` with the snippet below: JavascriptCode `{ "name" : "Developer Platform Beginner Tutorial", "author" : "Squarespace", "navigations" : [ { "title" : "Main Navigation", "name" : "mainNav" }], "layouts" : { "default" : { "name" : "Default", "regions" : [ "site" ] } }, "stylesheets": [] }` This snippet adds a new navigation titled "Main Navigation". Once you push this update to your `template.conf`, you'll see that the Pages panel now has a "Main Navigation" section for pages and collections. ### Rendering the Navigation[](https://developers.squarespace.com/beginner-tutorial#rendering-the-navigation) Once you add a page to your new navigation area in the Pages panel, you may notice that this navigation doesn't render anywhere on your site. This is because you haven't added the JSON-T required to display the Main Navigation menu on the page. To do this, you need to create a template for the navigation using a .block file. If you're familiar with other templating languages, you can think of a .block file like a "partial". A .block file can contain any kind of code used elsewhere in your template, most commonly HTML and JSON-T. For an in-depth explanation of .block files, visit this Developer Platform documentation [article](https://developers.squarespace.com/template-partials) . To display the Main Navigation on your site create a file titled "navigation.block" and place it in your /blocks directory. If you don't see a blocks directory, you can create one now. Once you've created your `navigation.block` file, drop in the following snippet of HTML and JSON-T: Code `` This snippet contains more advanced JSON-T than we've seen so far in this tutorial. It iterates over a list of items using a repeated section. It also uses .sections to optionally display HTML if a given key is present in the context. For a more complete discussion, see our documentation on [JSON-T directives](https://developers.squarespace.com/json-t-directives) . ### Placing the Navigation[](https://developers.squarespace.com/beginner-tutorial#placing-the-navigation) You still need to insert the `navigation.block` into your `site.region`. This requires the use of a new kind of tag, Squarespace navigation tag: Code `` The Squarespace navigation tag tells the Squarespace platform which navigation ID corresponds with which navigation .block file. The navigation ID must match the "name" of one of the navigations defined in `template.conf`. The template must match the filename of a .block template in the /blocks folder. _Deep Dive: Squarespace navigation tags use a different syntax than the rest of JSON-T. They use a custom HTML tag with a "squarespace:" prefix. Squarespace tags are used to access data that's not part of the current page's context. For example, the list of links from a navigation. Another example is the `` tag, which lets you access search results. See more in the Squarespace Tags section of the [Developer Documentation](https://developers.squarespace.com/open-block-field) ._ Add the Squarespace navigation tag just above the `
    ` in your `site.region` file. Once you've done this, push your new `navigation.block` file and your updated `site.region` file to your site. Refresh your site and drag a page into the Main Navigation section of the Pages panel. You should now see your page listed in the navigation menu at the top of your site. When you add new pages, they should also show up in your site's navigation menu. **Congratulations! You now have a multi-page website that you can edit in the with the Squarespace editor!** In the remaining parts of this tutorial you'll be adding a blog to your website. Part 5 - Collection Overview[](https://developers.squarespace.com/beginner-tutorial#part-5---collection-overview) ------------------------------------------------------------------------------------------------------------------ Before we add a blog to your website, let's step back and talk about how blogs, galleries and other sets of data in Squarespace are implemented. Squarespace exposes a single data structure that powers most of the content on a website: the collection. Collections are lists of data that you can display on your website in various ways. For example, you can present a collection all on a single page, or show each item on its own page. All collections in Squarespace are defined in the template by adding three files; a .conf, .list and .item file within the /collections directory. While collection filenames can have any title, a collection must use the same name for all its files. For example, `foo.conf`, `foo.list`, and `foo.item` would correspond to the "foo" collection. ### The Collection .conf File[](https://developers.squarespace.com/beginner-tutorial#the-collection-conf-file) The .conf file tells the Squarespace platform how each collection is configured. It's a JSON file containing several keys and values that configure the type of collection that you'd like to create. **title**: The name of the collection as it will appear in the "Add New Page" dialog. **ordering**: The method of ordering for the collection. Available options: chronological, user-orderable, calendar. **addText**: Specifies the text used in the "add" button in the Squarespace interface. It is also used in empty collection message when a collection does not contain any items. **acceptTypes**: Specifies the post types allowed in this collection. Available: text, image, video. For a full explanation of collections, visit the [Collections guide](https://developers.squarespace.com/collections) in the Developer Platform Documentation. ### Collection .list and .item Files[](https://developers.squarespace.com/beginner-tutorial#collection-list-and-item-files) While a collection's .conf file uses JSON, the .list file is written with HTML and JSON-T. The .list file defines the default view of your collection and shows all posts in that collection. For example, `blog.list` will display all posts as a chronological list on a single page. Like the .list file, the .item file is written using HTML and JSON-T and sets up the structure for how a single post will look. When you create a collection, it adds a new interface to the editor that you can use to add and edit items. Collections can be used to manage and display any kind of structured data on your website. Part 6 - Creating a Blog Collection[](https://developers.squarespace.com/beginner-tutorial#part-6---creating-a-blog-collection) -------------------------------------------------------------------------------------------------------------------------------- To begin, create a folder called "collections" in your root directory. Now, create a file within that folder and name it "blog.conf." Add the following code snippet to that file: Code `{ "title" : "Blog", "ordering" : "chronological", "addText" : "Add Post", "acceptTypes" : [ "text" ] }` Now that you have defined the configuration, create .list and .item files to define the structure. Create a file called "blog.list" and add the following code snippet: Code `{.repeated section items} {.or} No blog posts yet. {.end}` And finally, create a file titled "blog.item" and add this code to it: Code `{.section item} {.end}` There's a lot of new JSON-T here, which you can investigate on your own. Refer to the Template Language section of the Squarespace Developer Platform documentation for reference. Now when you go to add a page, you'll see the option to add a blog collection: ![Collection Option](https://developers.squarespace.com/assets/images/CollectionOption.gif) Try adding a blog, and then adding a new post. When you're done, the Blog collection should look like this: ![Blog Collection](https://developers.squarespace.com/assets/images/Blogcollection.png) What's Next?[](https://developers.squarespace.com/beginner-tutorial#whats-next) -------------------------------------------------------------------------------- In this tutorial, you accessed your template code, made your first modifications, used JSON-T to dynamically change your site title, made a navigation and created a blog. Now that you've learned the basics of the Developer Platform, you can take a closer look at our full **[Developer Platform Documentation](https://developers.squarespace.com/template-overview) ** and customize your template further. If you have questions, try posting them in the [forum](https://forum.squarespace.com/) where other members of the Squarespace community can help you. [Quick Start](https://developers.squarespace.com/quick-start) [Template Overview](https://developers.squarespace.com/template-overview) --- # Developer Portal Menu Making requests to Commerce APIs[](https://developers.squarespace.com/commerce-apis/making-requests#making-requests-to-commerce-apis) ====================================================================================================================================== In three steps, you can send a successful request to any Commerce API to manage numerous commerce features of any Squarespace merchant site. [**Discounts**](https://developers.squarespace.com/commerce-apis/discounts-overview) : Manage discounts for a site, including their eligibility criteria, discount amount, and activation trigger. [**Contacts**](https://developers.squarespace.com/commerce-apis/contacts-overview) : Manage the people associated with a site — customers, subscribers, donors — including their address books and marketing preferences. [**Analytics**](https://developers.squarespace.com/commerce-apis/analytics-overview) : Retrieve aggregated commerce data (order counts, totals, donations) for contacts in bulk. [**Inventory**](https://developers.squarespace.com/commerce-apis/inventory-overview) : Read and adjust stock information for product variants. [**Orders**](https://developers.squarespace.com/commerce-apis/orders-overview) : Access order history for one-time purchases and subscription orders or import orders from third-party sales channels. [**Products**](https://developers.squarespace.com/commerce-apis/products-overview) : Manage physical products, including their variants and images. [**Profiles**](https://developers.squarespace.com/commerce-apis/profiles-overview) : Read customers, mailing list subscribers, and donors. Now in maintenance mode — new integrations should use the [Contacts API](https://developers.squarespace.com/commerce-apis/contacts-overview) . [**Transactions**](https://developers.squarespace.com/commerce-apis/transactions-overview) : Access financial transactions for orders and donations. [**Webhook Subscriptions API**](https://developers.squarespace.com/commerce-apis/webhook-subscriptions-overview) : Subscribe to notifications from a site, like when an order was created, by configuring a webhook endpoint. 1\. Generate an API key or start the OAuth process[](https://developers.squarespace.com/commerce-apis/making-requests#1-generate-an-api-key-or-start-the-oauth-process) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ If you don't have an API key or are a registered OAuth client already, read the [Authentication and permissions](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) guide. 2\. Format your request headers[](https://developers.squarespace.com/commerce-apis/making-requests#2-format-your-request-headers) ---------------------------------------------------------------------------------------------------------------------------------- For a successful request, every Commerce API request must use the headers and URL format shown below. The current version number for each API is located on the API's overview page. To learn more about versioning, read the [Versioning](https://developers.squarespace.com/commerce-apis/versioning) guide. > _Caution: All requests sent over HTTP instead of HTTPS are rejected._ TerminalCode `curl "https://api.squarespace.com/{api-version}/{resource-path}" \ -H "Authorization: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" \ -H "User-Agent: YOUR_CUSTOM_APP_DESCRIPTION" \ // Add a Content-Type header when making requests with a body. -H "Content-Type: application/json"` ### Recommendations[](https://developers.squarespace.com/commerce-apis/making-requests#recommendations) **Accept header: it's okay to use one, but not necessary** Although an `Accept` header is conventional in HTTPS requests, it's not necessary as Commerce APIs support JSON responses only. **User-Agent header: it's okay to use default values for testing, but not recommended** Default values for `User-Agent` are often injected by HTTP client applications (e.g.`"User-Agent: curl/7.54.0"`). Although they're okay to use, doing so may be subject to stricter [rate limiting](https://developers.squarespace.com/commerce-apis/rate-limits) . Requests without a `User-Agent` header are rejected. 3\. Start making requests[](https://developers.squarespace.com/commerce-apis/making-requests#3-start-making-requests) ---------------------------------------------------------------------------------------------------------------------- Read the endpoint documentation for any APIs you want to use and then start to make requests! But, ensure all requests abide by Squarespace [rate limits](https://developers.squarespace.com/commerce-apis/rate-limits) . All APIs responses are formatted in JSON and use standard status and error codes. Response codes are listed for every endpoint. Next steps[](https://developers.squarespace.com/commerce-apis/making-requests#next-steps) ------------------------------------------------------------------------------------------ * Learn how Commerce APIs handle [responses and errors](https://developers.squarespace.com/commerce-apis/responses-error-handling) * Read the [FAQ](https://developers.squarespace.com/commerce-apis/faq) for answers to common questions * Read our [brand guidelines](https://www.squarespace.com/brand-guidelines) [OAuth](https://developers.squarespace.com/commerce-apis/oauth) [Retrieve basic site information](https://developers.squarespace.com/commerce-apis/retrieve-basic-site-info) --- # Developer Portal Menu Commerce API [Commerce API](https://developers.squarespace.com/commerce-apis) Discounts ========= [Download schema](https://developers.squarespace.com/commerce-apis/latest/schema-processor-version-version-latest.json) Manage discounts for a website. * * * List discounts[](https://developers.squarespace.com/commerce-apis/discounts#list-discounts) -------------------------------------------------------------------------------------------- GET https://api.squarespace.com /v1/commerce/discounts Returns a paginated list of discounts for the website associated with the access token. Requires website.discounts.read or website.discounts (OAuth or API key). ### List discounts › query Parameters[](https://developers.squarespace.com/commerce-apis/discounts#list-discounts/query-parameters) `sortBy` ​string · enum Sort field for the result set. Enum values: CREATED\_ON PROMO\_CODE USES\_COUNT Default: CREATED\_ON `sortDirection` ​string · enum Sort direction. Enum values: ASCENDING DESCENDING Default: DESCENDING `search` ​string Free-text search across a discount's name and promo code. `status` ​string · enum Filter by discount lifecycle status. Enum values: ALL ACTIVE EXPIRED SCHEDULED Default: ALL `criteria` ​string\[\] Filter by one or more criteria types (comma-separated). When omitted, defaults to all allowable values. Enum values: ANY\_ORDER CART\_TOTAL PRODUCT Default: \["ANY\_ORDER","CART\_TOTAL","PRODUCT"\] `template` ​string\[\] Filter by one or more template types (comma-separated). When omitted, defaults to all allowable values. Enum values: FIXED\_AMOUNT PERCENTAGE Default: \["FIXED\_AMOUNT","PERCENTAGE"\] `trigger` ​string\[\] · enum Filter by one or more trigger types (comma-separated): AUTO (auto-applied) or CODE (promo code). When omitted, or when all allowable values are supplied, defaults to all allowable values. Enum values: AUTO CODE `limitedUseOnly` ​boolean When true, only discounts with limited-use semantics (per product rules) are returned. Default: false `offset` ​integer · int32 · min: 0 Zero-based offset into the result set. Must be non-negative. Default 0. Default: 0 `limit` ​integer · int32 · min: 1 · max: 1000 Page size (1–1000; default 50). Default: 50 ### List discounts › Headers[](https://developers.squarespace.com/commerce-apis/discounts#list-discounts/header-parameters) `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 discounts › Responses[](https://developers.squarespace.com/commerce-apis/discounts#list-discounts/responses) 200400403429 Paginated discounts for the website (empty page is a successful response). [PaginatedDiscountListResponse](https://developers.squarespace.com/commerce-apis/~schemas#paginateddiscountlistresponse) `discounts` ​[Discount\[\]](https://developers.squarespace.com/commerce-apis/~schemas#discount)  · required Discounts for this page. `hasNextPage` ​boolean True when more results exist after the current window. `hasPreviousPage` ​boolean True when a page of results exists before the current window. * * * Create discount[](https://developers.squarespace.com/commerce-apis/discounts#create-discount) ---------------------------------------------------------------------------------------------- POST https://api.squarespace.com /v1/commerce/discounts Creates a discount. A successful request returns the created Discount resource. ### Create discount › Headers[](https://developers.squarespace.com/commerce-apis/discounts#create-discount/header-parameters) `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 discount › Request Body[](https://developers.squarespace.com/commerce-apis/discounts#create-discount/request-body) [CreateDiscountRequest](https://developers.squarespace.com/commerce-apis/~schemas#creatediscountrequest) `criteria` ​required `name` ​string · required Display name for the discount. `template` ​required `trigger` ​required `validFrom` ​string · date-time · required When the discount becomes active. `isLimitedUses` ​boolean If true, the discount can only be used `maxUsesAllowed` times site-wide. `isOncePerCustomer` ​boolean If true, a given customer can only use this discount once. `maxUsesAllowed` ​integer · int32 Maximum site-wide redemptions. Required when isLimitedUses=true; null otherwise. `paymentPlanOptions` ​[PaymentPlanOptions](https://developers.squarespace.com/commerce-apis/~schemas#paymentplanoptions) Payment-plan applicability settings for this discount. When omitted from a create or update request, defaults to NONE. `subscriptionOptions` ​[SubscriptionOptions](https://developers.squarespace.com/commerce-apis/~schemas#subscriptionoptions) Subscription applicability settings for this discount. When omitted from a create or update request, defaults to EXCLUDED. `validTo` ​string · date-time When the discount expires. Null = no expiry. ### Create discount › Responses[](https://developers.squarespace.com/commerce-apis/discounts#create-discount/responses) 201400403409429 The created discount. [DiscountResponse](https://developers.squarespace.com/commerce-apis/~schemas#discountresponse) `discount` ​[Discount](https://developers.squarespace.com/commerce-apis/~schemas#discount)  · required Discount configured for a Commerce store. * * * Get discount[](https://developers.squarespace.com/commerce-apis/discounts#get-discount) ---------------------------------------------------------------------------------------- GET https://api.squarespace.com /v1/commerce/discounts/{discountId} Returns the discount for the given discount ID for the website associated with the access token. Requires website.discounts.read or website.discounts (OAuth or API key). ### Get discount › path Parameters[](https://developers.squarespace.com/commerce-apis/discounts#get-discount/path-parameters) `discountId` ​string · required The discount's ID ### Get discount › Headers[](https://developers.squarespace.com/commerce-apis/discounts#get-discount/header-parameters) `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 discount › Responses[](https://developers.squarespace.com/commerce-apis/discounts#get-discount/responses) 200403404429 Discount found. [DiscountResponse](https://developers.squarespace.com/commerce-apis/~schemas#discountresponse) `discount` ​[Discount](https://developers.squarespace.com/commerce-apis/~schemas#discount)  · required Discount configured for a Commerce store. * * * Update discount[](https://developers.squarespace.com/commerce-apis/discounts#update-discount) ---------------------------------------------------------------------------------------------- PUT https://api.squarespace.com /v1/commerce/discounts/{discountId} Replaces the discount for the given discount ID for the website associated with the access token. ### Update discount › path Parameters[](https://developers.squarespace.com/commerce-apis/discounts#update-discount/path-parameters) `discountId` ​string · required The discount's unique identifier. ### Update discount › Headers[](https://developers.squarespace.com/commerce-apis/discounts#update-discount/header-parameters) `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 discount › Request Body[](https://developers.squarespace.com/commerce-apis/discounts#update-discount/request-body) [Discount](https://developers.squarespace.com/commerce-apis/~schemas#discount) `criteria` ​required `name` ​string · required Display name for the discount. `template` ​required `trigger` ​required `validFrom` ​string · date-time · required When the discount becomes active. `id` ​string · readOnly Discount id. `isLimitedUses` ​boolean If true, the discount can only be used `maxUsesAllowed` times site-wide. `isOncePerCustomer` ​boolean If true, a given customer can only use this discount once. `lastRedeemedAt` ​string · date-time · readOnly Timestamp of the most recent redemption. Null if never redeemed. `maxUsesAllowed` ​integer · int32 Maximum site-wide redemptions. Required when isLimitedUses=true; null otherwise. `numberOfUses` ​integer · int32 · readOnly Number of times this discount has been redeemed. `paymentPlanOptions` ​[PaymentPlanOptions](https://developers.squarespace.com/commerce-apis/~schemas#paymentplanoptions) Payment-plan applicability settings for this discount. When omitted from a create or update request, defaults to NONE. `status` ​string · enum · readOnly Defines the lifecycle status of a discount. Enum values: ACTIVE SCHEDULED EXPIRED `subscriptionOptions` ​[SubscriptionOptions](https://developers.squarespace.com/commerce-apis/~schemas#subscriptionoptions) Subscription applicability settings for this discount. When omitted from a create or update request, defaults to EXCLUDED. `validTo` ​string · date-time When the discount expires. Null = no expiry. `websiteId` ​string · readOnly 24-char website id. ### Update discount › Responses[](https://developers.squarespace.com/commerce-apis/discounts#update-discount/responses) 200400403404409429 The updated discount. [DiscountResponse](https://developers.squarespace.com/commerce-apis/~schemas#discountresponse) `discount` ​[Discount](https://developers.squarespace.com/commerce-apis/~schemas#discount)  · required Discount configured for a Commerce store. * * * Delete discount[](https://developers.squarespace.com/commerce-apis/discounts#delete-discount) ---------------------------------------------------------------------------------------------- DELETE https://api.squarespace.com /v1/commerce/discounts/{discountId} Deletes the discount for the given discount ID. Deletion is permitted for any discount owned by the website, including discounts whose criteria, template, or trigger types are not supported by this API version; no type validation is performed. ### Delete discount › path Parameters[](https://developers.squarespace.com/commerce-apis/discounts#delete-discount/path-parameters) `discountId` ​string · required The discount's ID. ### Delete discount › Headers[](https://developers.squarespace.com/commerce-apis/discounts#delete-discount/header-parameters) `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 discount › Responses[](https://developers.squarespace.com/commerce-apis/discounts#delete-discount/responses) 204403404429 No content. The discount was deleted successfully. No data returned * * * [Analytics](https://developers.squarespace.com/commerce-apis/analytics) [Products](https://developers.squarespace.com/commerce-apis/products) --- # Developer Portal Menu Commerce API [Commerce API](https://developers.squarespace.com/commerce-apis) WebhookSubscriptions ==================== [Download schema](https://developers.squarespace.com/commerce-apis/latest/schema-processor-version-version-latest.json) * * * List webhook subscriptions[](https://developers.squarespace.com/commerce-apis/send-test-notification#list-webhook-subscriptions) --------------------------------------------------------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/webhook\_subscriptions Retrieves information for all webhook subscriptions. The response contains up to 25 Webhook Subscriptions. Requires an OAuth access token; API keys are not supported. ### List webhook subscriptions › Headers[](https://developers.squarespace.com/commerce-apis/send-test-notification#list-webhook-subscriptions/header-parameters) `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 webhook subscriptions › Responses[](https://developers.squarespace.com/commerce-apis/send-test-notification#list-webhook-subscriptions/responses) 200404 OK [ExternalWebhookSubscriptionListResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionlistresponse) `webhookSubscriptions` ​[ExternalWebhookSubscriptionResponse\[\]](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionresponse) Array of Webhook Subscription resources. If the merchant site doesn't have any webhook subscriptions, this array is empty. * * * Create webhook subscription[](https://developers.squarespace.com/commerce-apis/send-test-notification#create-webhook-subscription) ----------------------------------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/webhook\_subscriptions Creates a webhook subscription. A successful request returns the created Webhook Subscription resource. Requires an OAuth access token; API keys are not supported. The OAuth token must hold scopes appropriate for each subscribed event topic: order.create and order.update require website.orders or website.orders.read; contact.create, contact.update, contact.delete, address.create, address.update, and address.delete require website.contacts; extension.uninstall requires no event-specific scope. ### Create webhook subscription › Headers[](https://developers.squarespace.com/commerce-apis/send-test-notification#create-webhook-subscription/header-parameters) `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 webhook subscription › Request Body[](https://developers.squarespace.com/commerce-apis/send-test-notification#create-webhook-subscription/request-body) [ExternalCreateWebhookSubscriptionRequest](https://developers.squarespace.com/commerce-apis/~schemas#externalcreatewebhooksubscriptionrequest) `endpointUrl` ​string · required HTTPS URL to POST webhook notifications. Example: https://example-extension.com/uninstall `topics` ​string\[\] List of event topics that trigger a webhook notification. Enum values: order.create order.update extension.uninstall contact.create contact.update contact.delete address.create address.update show 1 more ### Create webhook subscription › Responses[](https://developers.squarespace.com/commerce-apis/send-test-notification#create-webhook-subscription/responses) 201400404409 The created webhook subscription. [ExternalCreateWebhookSubscriptionResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalcreatewebhooksubscriptionresponse) `clientId` ​string · readOnly · required Third-party client id. Example: A125dfPqdKJDqPAcJQgLo3A5mwcKIq2G `createdOn` ​string · date-time · readOnly · required ISO 8601 UTC date and time string; represents when the webhook subscription was created. Example: 2020-04-22T22:18:00Z `endpointUrl` ​string · required HTTPS URL to POST webhook notifications. Example: https://example-extension.com/uninstall `id` ​string · readOnly · required Unique Webhook Subscription id. Example: 7aff04bb-90e0-4002-96c2-69d8162c8dae `secret` ​string · readOnly · required Hexadecimal value used to generate a signature for a webhook notification; field is only returned when creating a new subscription or rotating a secret. Store the secret in a safe location to verify notifications from Squarespace. See the 'Verifying notifications' guide under Webhooks for details. Example: F3F9B981C78E7A6187E42853F6CE2804177E98206164779423B02DEC981ACD6B `updatedOn` ​string · date-time · readOnly · required ISO 8601 UTC date and time string; represents when the webhook subscription was last modified. Example: 2020-04-22T22:18:00Z `websiteId` ​string · readOnly · required Unique Webhook Subscription id. Example: 7aff04bb-90e0-4002-96c2-69d8162c8dae `topics` ​string\[\] List of event topics that trigger a webhook notification. Enum values: order.create order.update extension.uninstall contact.create contact.update contact.delete address.create address.update show 1 more * * * Get webhook subscription[](https://developers.squarespace.com/commerce-apis/send-test-notification#get-webhook-subscription) ----------------------------------------------------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId} Retrieves information for a specific webhook subscription. Requires an OAuth access token; API keys are not supported. ### Get webhook subscription › path Parameters[](https://developers.squarespace.com/commerce-apis/send-test-notification#get-webhook-subscription/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to retrieve. ### Get webhook subscription › Headers[](https://developers.squarespace.com/commerce-apis/send-test-notification#get-webhook-subscription/header-parameters) `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 webhook subscription › Responses[](https://developers.squarespace.com/commerce-apis/send-test-notification#get-webhook-subscription/responses) 200404 OK [ExternalWebhookSubscriptionResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionresponse) `clientId` ​string Third-party client id. `createdOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was created. `endpointUrl` ​string HTTPS URL that receives webhook notifications. `id` ​string Unique Webhook Subscription id. `topics` ​string\[\] List of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. `updatedOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was last modified. `websiteId` ​string Unique website id. * * * Update webhook subscription[](https://developers.squarespace.com/commerce-apis/send-test-notification#update-webhook-subscription) ----------------------------------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId} Updates information for a webhook subscription. A successful request returns the updated Webhook Subscription resource. Requires an OAuth access token; API keys are not supported. The OAuth token must hold scopes appropriate for each subscribed event topic: order.create and order.update require website.orders or website.orders.read; contact.create, contact.update, contact.delete, address.create, address.update, and address.delete require website.contacts; extension.uninstall requires no event-specific scope. ### Update webhook subscription › path Parameters[](https://developers.squarespace.com/commerce-apis/send-test-notification#update-webhook-subscription/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to update. ### Update webhook subscription › Headers[](https://developers.squarespace.com/commerce-apis/send-test-notification#update-webhook-subscription/header-parameters) `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 webhook subscription › Request Body[](https://developers.squarespace.com/commerce-apis/send-test-notification#update-webhook-subscription/request-body) [ExternalUpdateWebhookSubscriptionRequest](https://developers.squarespace.com/commerce-apis/~schemas#externalupdatewebhooksubscriptionrequest) `endpointUrl` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. `topics` ​[ChangeListString](https://developers.squarespace.com/commerce-apis/~schemas#changeliststring) Optional; list of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. ### Update webhook subscription › Responses[](https://developers.squarespace.com/commerce-apis/send-test-notification#update-webhook-subscription/responses) 200400404 OK [ExternalWebhookSubscriptionResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionresponse) `clientId` ​string Third-party client id. `createdOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was created. `endpointUrl` ​string HTTPS URL that receives webhook notifications. `id` ​string Unique Webhook Subscription id. `topics` ​string\[\] List of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. `updatedOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was last modified. `websiteId` ​string Unique website id. * * * Delete webhook subscription[](https://developers.squarespace.com/commerce-apis/send-test-notification#delete-webhook-subscription) ----------------------------------------------------------------------------------------------------------------------------------- DELETE https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId} Deletes a webhook subscription. Requires an OAuth access token; API keys are not supported. ### Delete webhook subscription › path Parameters[](https://developers.squarespace.com/commerce-apis/send-test-notification#delete-webhook-subscription/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to delete. ### Delete webhook subscription › Headers[](https://developers.squarespace.com/commerce-apis/send-test-notification#delete-webhook-subscription/header-parameters) `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 webhook subscription › Responses[](https://developers.squarespace.com/commerce-apis/send-test-notification#delete-webhook-subscription/responses) 204404 No content. The webhook subscription was deleted successfully. No data returned * * * Rotate webhook subscription secret[](https://developers.squarespace.com/commerce-apis/send-test-notification#rotate-webhook-subscription-secret) ------------------------------------------------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId}/actions/rotateSecret Rotates a webhook subscription's secret. The previous secret for a subscription is no longer valid after a new one is generated. Requires an OAuth access token; API keys are not supported. ### Rotate webhook subscription secret › path Parameters[](https://developers.squarespace.com/commerce-apis/send-test-notification#rotate-webhook-subscription-secret/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to update. ### Rotate webhook subscription secret › Headers[](https://developers.squarespace.com/commerce-apis/send-test-notification#rotate-webhook-subscription-secret/header-parameters) `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 ### Rotate webhook subscription secret › Responses[](https://developers.squarespace.com/commerce-apis/send-test-notification#rotate-webhook-subscription-secret/responses) 200404 OK [ExternalRotateSecretResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalrotatesecretresponse) `secret` ​string Hexadecimal value used to generate a signature for a webhook notification; field is only returned when creating a new subscription or rotating a secret. Store the secret in a safe location to verify notifications from Squarespace. * * * Send test notification[](https://developers.squarespace.com/commerce-apis/send-test-notification#send-test-notification) ------------------------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId}/actions/sendTestNotification Sends a notification to a subscribed webhook endpoint for testing purposes. This is a one-time notification, and will not be retried if it fails or times out. Requires an OAuth access token; API keys are not supported. ### Send test notification › path Parameters[](https://developers.squarespace.com/commerce-apis/send-test-notification#send-test-notification/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to send a notification to. ### Send test notification › Headers[](https://developers.squarespace.com/commerce-apis/send-test-notification#send-test-notification/header-parameters) `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 ### Send test notification › Request Body[](https://developers.squarespace.com/commerce-apis/send-test-notification#send-test-notification/request-body) [ExternalSendTestNotificationRequest](https://developers.squarespace.com/commerce-apis/~schemas#externalsendtestnotificationrequest) `topic` ​string · required Required; Squarespace event topic that triggers a webhook notification. Possible values include: extension.uninstall, order.create, order.update. ### Send test notification › Responses[](https://developers.squarespace.com/commerce-apis/send-test-notification#send-test-notification/responses) 200400404 OK [ExternalTestNotificationResponse](https://developers.squarespace.com/commerce-apis/~schemas#externaltestnotificationresponse) `statusCode` ​integer · int32 Status code returned by the subscribed webhook endpoint. * * * [Profiles](https://developers.squarespace.com/commerce-apis/profiles) [Overview](https://developers.squarespace.com/commerce-apis/webhook-subscriptions-overview) --- # Developer Portal Menu Commerce API [Commerce API](https://developers.squarespace.com/commerce-apis) WebhookSubscriptions ==================== [Download schema](https://developers.squarespace.com/commerce-apis/latest/schema-processor-version-version-latest.json) * * * List webhook subscriptions[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#list-webhook-subscriptions) -------------------------------------------------------------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/webhook\_subscriptions Retrieves information for all webhook subscriptions. The response contains up to 25 Webhook Subscriptions. Requires an OAuth access token; API keys are not supported. ### List webhook subscriptions › Headers[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#list-webhook-subscriptions/header-parameters) `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 webhook subscriptions › Responses[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#list-webhook-subscriptions/responses) 200404 OK [ExternalWebhookSubscriptionListResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionlistresponse) `webhookSubscriptions` ​[ExternalWebhookSubscriptionResponse\[\]](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionresponse) Array of Webhook Subscription resources. If the merchant site doesn't have any webhook subscriptions, this array is empty. * * * Create webhook subscription[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#create-webhook-subscription) ---------------------------------------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/webhook\_subscriptions Creates a webhook subscription. A successful request returns the created Webhook Subscription resource. Requires an OAuth access token; API keys are not supported. The OAuth token must hold scopes appropriate for each subscribed event topic: order.create and order.update require website.orders or website.orders.read; contact.create, contact.update, contact.delete, address.create, address.update, and address.delete require website.contacts; extension.uninstall requires no event-specific scope. ### Create webhook subscription › Headers[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#create-webhook-subscription/header-parameters) `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 webhook subscription › Request Body[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#create-webhook-subscription/request-body) [ExternalCreateWebhookSubscriptionRequest](https://developers.squarespace.com/commerce-apis/~schemas#externalcreatewebhooksubscriptionrequest) `endpointUrl` ​string · required HTTPS URL to POST webhook notifications. Example: https://example-extension.com/uninstall `topics` ​string\[\] List of event topics that trigger a webhook notification. Enum values: order.create order.update extension.uninstall contact.create contact.update contact.delete address.create address.update show 1 more ### Create webhook subscription › Responses[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#create-webhook-subscription/responses) 201400404409 The created webhook subscription. [ExternalCreateWebhookSubscriptionResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalcreatewebhooksubscriptionresponse) `clientId` ​string · readOnly · required Third-party client id. Example: A125dfPqdKJDqPAcJQgLo3A5mwcKIq2G `createdOn` ​string · date-time · readOnly · required ISO 8601 UTC date and time string; represents when the webhook subscription was created. Example: 2020-04-22T22:18:00Z `endpointUrl` ​string · required HTTPS URL to POST webhook notifications. Example: https://example-extension.com/uninstall `id` ​string · readOnly · required Unique Webhook Subscription id. Example: 7aff04bb-90e0-4002-96c2-69d8162c8dae `secret` ​string · readOnly · required Hexadecimal value used to generate a signature for a webhook notification; field is only returned when creating a new subscription or rotating a secret. Store the secret in a safe location to verify notifications from Squarespace. See the 'Verifying notifications' guide under Webhooks for details. Example: F3F9B981C78E7A6187E42853F6CE2804177E98206164779423B02DEC981ACD6B `updatedOn` ​string · date-time · readOnly · required ISO 8601 UTC date and time string; represents when the webhook subscription was last modified. Example: 2020-04-22T22:18:00Z `websiteId` ​string · readOnly · required Unique Webhook Subscription id. Example: 7aff04bb-90e0-4002-96c2-69d8162c8dae `topics` ​string\[\] List of event topics that trigger a webhook notification. Enum values: order.create order.update extension.uninstall contact.create contact.update contact.delete address.create address.update show 1 more * * * Get webhook subscription[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#get-webhook-subscription) ---------------------------------------------------------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId} Retrieves information for a specific webhook subscription. Requires an OAuth access token; API keys are not supported. ### Get webhook subscription › path Parameters[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#get-webhook-subscription/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to retrieve. ### Get webhook subscription › Headers[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#get-webhook-subscription/header-parameters) `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 webhook subscription › Responses[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#get-webhook-subscription/responses) 200404 OK [ExternalWebhookSubscriptionResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionresponse) `clientId` ​string Third-party client id. `createdOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was created. `endpointUrl` ​string HTTPS URL that receives webhook notifications. `id` ​string Unique Webhook Subscription id. `topics` ​string\[\] List of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. `updatedOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was last modified. `websiteId` ​string Unique website id. * * * Update webhook subscription[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#update-webhook-subscription) ---------------------------------------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId} Updates information for a webhook subscription. A successful request returns the updated Webhook Subscription resource. Requires an OAuth access token; API keys are not supported. The OAuth token must hold scopes appropriate for each subscribed event topic: order.create and order.update require website.orders or website.orders.read; contact.create, contact.update, contact.delete, address.create, address.update, and address.delete require website.contacts; extension.uninstall requires no event-specific scope. ### Update webhook subscription › path Parameters[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#update-webhook-subscription/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to update. ### Update webhook subscription › Headers[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#update-webhook-subscription/header-parameters) `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 webhook subscription › Request Body[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#update-webhook-subscription/request-body) [ExternalUpdateWebhookSubscriptionRequest](https://developers.squarespace.com/commerce-apis/~schemas#externalupdatewebhooksubscriptionrequest) `endpointUrl` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. `topics` ​[ChangeListString](https://developers.squarespace.com/commerce-apis/~schemas#changeliststring) Optional; list of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. ### Update webhook subscription › Responses[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#update-webhook-subscription/responses) 200400404 OK [ExternalWebhookSubscriptionResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionresponse) `clientId` ​string Third-party client id. `createdOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was created. `endpointUrl` ​string HTTPS URL that receives webhook notifications. `id` ​string Unique Webhook Subscription id. `topics` ​string\[\] List of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. `updatedOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was last modified. `websiteId` ​string Unique website id. * * * Delete webhook subscription[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#delete-webhook-subscription) ---------------------------------------------------------------------------------------------------------------------------------------- DELETE https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId} Deletes a webhook subscription. Requires an OAuth access token; API keys are not supported. ### Delete webhook subscription › path Parameters[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#delete-webhook-subscription/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to delete. ### Delete webhook subscription › Headers[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#delete-webhook-subscription/header-parameters) `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 webhook subscription › Responses[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#delete-webhook-subscription/responses) 204404 No content. The webhook subscription was deleted successfully. No data returned * * * Rotate webhook subscription secret[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#rotate-webhook-subscription-secret) ------------------------------------------------------------------------------------------------------------------------------------------------------ POST https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId}/actions/rotateSecret Rotates a webhook subscription's secret. The previous secret for a subscription is no longer valid after a new one is generated. Requires an OAuth access token; API keys are not supported. ### Rotate webhook subscription secret › path Parameters[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#rotate-webhook-subscription-secret/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to update. ### Rotate webhook subscription secret › Headers[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#rotate-webhook-subscription-secret/header-parameters) `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 ### Rotate webhook subscription secret › Responses[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#rotate-webhook-subscription-secret/responses) 200404 OK [ExternalRotateSecretResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalrotatesecretresponse) `secret` ​string Hexadecimal value used to generate a signature for a webhook notification; field is only returned when creating a new subscription or rotating a secret. Store the secret in a safe location to verify notifications from Squarespace. * * * Send test notification[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#send-test-notification) ------------------------------------------------------------------------------------------------------------------------------ POST https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId}/actions/sendTestNotification Sends a notification to a subscribed webhook endpoint for testing purposes. This is a one-time notification, and will not be retried if it fails or times out. Requires an OAuth access token; API keys are not supported. ### Send test notification › path Parameters[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#send-test-notification/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to send a notification to. ### Send test notification › Headers[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#send-test-notification/header-parameters) `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 ### Send test notification › Request Body[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#send-test-notification/request-body) [ExternalSendTestNotificationRequest](https://developers.squarespace.com/commerce-apis/~schemas#externalsendtestnotificationrequest) `topic` ​string · required Required; Squarespace event topic that triggers a webhook notification. Possible values include: extension.uninstall, order.create, order.update. ### Send test notification › Responses[](https://developers.squarespace.com/commerce-apis/create-webhook-subscription#send-test-notification/responses) 200400404 OK [ExternalTestNotificationResponse](https://developers.squarespace.com/commerce-apis/~schemas#externaltestnotificationresponse) `statusCode` ​integer · int32 Status code returned by the subscribed webhook endpoint. * * * [Profiles](https://developers.squarespace.com/commerce-apis/profiles) [Overview](https://developers.squarespace.com/commerce-apis/webhook-subscriptions-overview) --- # Developer Portal Menu Commerce API [Commerce API](https://developers.squarespace.com/commerce-apis) Inventory ========= [Download schema](https://developers.squarespace.com/commerce-apis/latest/schema-processor-version-version-latest.json) * * * List inventory[](https://developers.squarespace.com/commerce-apis/inventory#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[](https://developers.squarespace.com/commerce-apis/inventory#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[](https://developers.squarespace.com/commerce-apis/inventory#list-inventory/header-parameters) `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[](https://developers.squarespace.com/commerce-apis/inventory#list-inventory/responses) 200400404 OK [PaginatedInventoryItemListResponse](https://developers.squarespace.com/commerce-apis/~schemas#paginatedinventoryitemlistresponse) `inventory` ​[InventoryItem\[\]](https://developers.squarespace.com/commerce-apis/~schemas#inventoryitem) Array of InventoryItem resources. If the merchant site doesn't have any physical or service product variants, this array is empty. `pagination` ​object * * * Adjust stock quantities[](https://developers.squarespace.com/commerce-apis/inventory#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[](https://developers.squarespace.com/commerce-apis/inventory#adjust-stock-quantities/header-parameters) `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[](https://developers.squarespace.com/commerce-apis/inventory#adjust-stock-quantities/request-body) [CreateInventoryAdjustmentRequest](https://developers.squarespace.com/commerce-apis/~schemas#createinventoryadjustmentrequest) `decrementOperations` ​[InventoryQuantityExpression\[\]](https://developers.squarespace.com/commerce-apis/~schemas#inventoryquantityexpression) Optional; array of objects. Subtracts stock quantity for InventoryItems. `incrementOperations` ​[InventoryQuantityExpression\[\]](https://developers.squarespace.com/commerce-apis/~schemas#inventoryquantityexpression) Optional; array of objects. Increments stock quantity for InventoryItems. `setFiniteOperations` ​[InventoryQuantityExpression\[\]](https://developers.squarespace.com/commerce-apis/~schemas#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[](https://developers.squarespace.com/commerce-apis/inventory#adjust-stock-quantities/responses) 204400404409 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[](https://developers.squarespace.com/commerce-apis/inventory#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[](https://developers.squarespace.com/commerce-apis/inventory#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[](https://developers.squarespace.com/commerce-apis/inventory#get-inventory/header-parameters) `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[](https://developers.squarespace.com/commerce-apis/inventory#get-inventory/responses) 200400404 OK [InventoryItemListResponse](https://developers.squarespace.com/commerce-apis/~schemas#inventoryitemlistresponse) `inventory` ​[InventoryItem\[\]](https://developers.squarespace.com/commerce-apis/~schemas#inventoryitem) Array of InventoryItem resources. If the merchant site doesn't have any physical or service products, this array is empty. * * * [Websites](https://developers.squarespace.com/commerce-apis/websites) [Orders](https://developers.squarespace.com/commerce-apis/orders) --- # Developer Portal Menu Commerce API [Commerce API](https://developers.squarespace.com/commerce-apis) Websites ======== [Download schema](https://developers.squarespace.com/commerce-apis/latest/schema-processor-version-version-latest.json) * * * Retrieves basic details about the Squarespace member who owns the provided OAuth token[](https://developers.squarespace.com/commerce-apis/websites#retrieves-basic-details-about-the-squarespace-member-who-owns-the-provided-oauth-token) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/authorization/member Retrieves basic details about the Squarespace member who owns the provided OAuth token ### Retrieves basic details about the Squarespace member who owns the provided OAuth token › Headers[](https://developers.squarespace.com/commerce-apis/websites#retrieves-basic-details-about-the-squarespace-member-who-owns-the-provided-oauth-token/header-parameters) `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 ### Retrieves basic details about the Squarespace member who owns the provided OAuth token › Responses[](https://developers.squarespace.com/commerce-apis/websites#retrieves-basic-details-about-the-squarespace-member-who-owns-the-provided-oauth-token/responses) 200401404 OK [MemberProfile](https://developers.squarespace.com/commerce-apis/~schemas#memberprofile) `email` ​string Profile email address. `firstName` ​string Profile first name. `id` ​string Unique Profile id. `lastName` ​string Profile last name. * * * Retrieves basic details about the website that owns the provided API key or OAuth token[](https://developers.squarespace.com/commerce-apis/websites#retrieves-basic-details-about-the-website-that-owns-the-provided-api-key-or-oauth-token) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/authorization/website Retrieves basic details about the website that owns the provided API key or OAuth token ### Retrieves basic details about the website that owns the provided API key or OAuth token › Headers[](https://developers.squarespace.com/commerce-apis/websites#retrieves-basic-details-about-the-website-that-owns-the-provided-api-key-or-oauth-token/header-parameters) `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 ### Retrieves basic details about the website that owns the provided API key or OAuth token › Responses[](https://developers.squarespace.com/commerce-apis/websites#retrieves-basic-details-about-the-website-that-owns-the-provided-api-key-or-oauth-token/responses) 200404 OK [WebsiteProfile](https://developers.squarespace.com/commerce-apis/~schemas#websiteprofile) `currency` ​string `id` ​string `language` ​string `location` ​[Location](https://developers.squarespace.com/commerce-apis/~schemas#location) `measurementStandard` ​[MeasurementStandard](https://developers.squarespace.com/commerce-apis/~schemas#measurementstandard)  · enum Enum values: IMPERIAL METRIC `siteId` ​string `timeZone` ​string `title` ​string `url` ​string * * * List store pages[](https://developers.squarespace.com/commerce-apis/websites#list-store-pages) ----------------------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/commerce/store\_pages Retrieves information for all store pages on the website. The response supports dynamic cursors for pagination. ### List store pages › query Parameters[](https://developers.squarespace.com/commerce-apis/websites#list-store-pages/query-parameters) `cursor` ​string ### List store pages › Headers[](https://developers.squarespace.com/commerce-apis/websites#list-store-pages/header-parameters) `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 store pages › Responses[](https://developers.squarespace.com/commerce-apis/websites#list-store-pages/responses) 200404 OK [PaginatedStorePagesResponse](https://developers.squarespace.com/commerce-apis/~schemas#paginatedstorepagesresponse) `pagination` ​object `storePages` ​[StorePage\[\]](https://developers.squarespace.com/commerce-apis/~schemas#storepage) * * * [Products](https://developers.squarespace.com/commerce-apis/products) [Inventory](https://developers.squarespace.com/commerce-apis/inventory) --- # Developer Portal Menu Extension uninstall[](https://developers.squarespace.com/webhooks/events/extension-uninstall#extension-uninstall) ================================================================================================================== Code `"topic": "extension.uninstall"` Occurs when a merchant or site owner uninstalls an extension connected to a Squarespace website. Read the [Overview](https://developers.squarespace.com/webhooks/overview) for details about the information sent with every Squarespace webhook notification. Request payload example[](https://developers.squarespace.com/webhooks/events/extension-uninstall#request-payload-example) -------------------------------------------------------------------------------------------------------------------------- JavascriptCode `{ // String; unique notification id "id": "5c2ba184b63ed3cb411ce2b1", // String; Squarespace website id that triggered the notification. "websiteId": "5f3c3d55ac435e1a051f77b3", // String; unique Webhook Subscriptions id "subscriptionId": "5f3c2155d947844beedda991", // String; description of the event that triggered notification. "topic": "extension.uninstall", // ISO 8601 UTC date and time string; represents when the notification was created. "createdOn": "2020-04-22T22:18+00:00", // Object; data associated with the event. "data": { // String; third-party client id. "clientId": "A125dfPqdKJDqPAcJQgLo3A5mwcKIq2G" } }` [Address delete](https://developers.squarespace.com/webhooks/events/address-delete) --- # Developer Portal Menu Order update[](https://developers.squarespace.com/webhooks/events/order-update#order-update) ============================================================================================= Code `"topic": "order.update"` Occurs when an order is updated on a Squarespace merchant site. Read the [Overview](https://developers.squarespace.com/webhooks/overview) for details about the information sent with every Squarespace webhook notification. Request payload example[](https://developers.squarespace.com/webhooks/events/order-update#request-payload-example) ------------------------------------------------------------------------------------------------------------------- JavascriptCode ``{ // String; unique notification id "id": "5c2ba184b63ed3cb411ce2b1", // String; Squarespace website id that triggered the notification. "websiteId": "5f3c3d55ac435e1a051f77b3", // String; unique Webhook Subscriptions id "subscriptionId": "5f3c2155d947844beedda991", // String; description of the event that triggered notification. "topic": "order.update", // ISO 8601 UTC date and time string; represents when the notification was created. "createdOn": "2020-04-22T22:18+00:00", // Object; data associated with the event. "data": { // String; unique order id. "orderId": "5f3c39ce69e11e796f19990e", // String; describes the update to the order. // Values can include: `FULFILLED`, `REFUNDED`, `CANCELED`, `MARKED_PENDING`, or `EMAIL_UPDATED` "update": "FULFILLED" } }`` [Order create](https://developers.squarespace.com/webhooks/events/order-create) [Contact create](https://developers.squarespace.com/webhooks/events/contact-create) --- # Developer Portal Menu Contact delete[](https://developers.squarespace.com/webhooks/events/contact-delete#contact-delete) =================================================================================================== Code `"topic": "contact.delete"` Occurs when a contact is removed from a Squarespace website. The payload includes identifiers and metadata about the deletion, not the full contact record. See the [Contacts API](https://developers.squarespace.com/commerce-apis/contacts-overview) for the full resource model. Read the [Webhooks overview](https://developers.squarespace.com/webhooks/overview) for details about the information sent with every Squarespace webhook notification. Request payload example[](https://developers.squarespace.com/webhooks/events/contact-delete#request-payload-example) --------------------------------------------------------------------------------------------------------------------- JavascriptCode `{ // String; unique notification id "id": "5c2ba184b63ed3cb411ce2b1", // String; Squarespace website id that triggered the notification. "websiteId": "5f3c3d55ac435e1a051f77b3", // String; unique Webhook Subscriptions id "subscriptionId": "5f3c2155d947844beedda991", // String; description of the event that triggered notification. "topic": "contact.delete", // ISO 8601 UTC date and time string; represents when the notification was created. "createdOn": "2024-01-28T10:44:00Z", // Object; data associated with the event — deletion metadata "data": { // String; unique contact id that was deleted "contactId": "5f3c39ce69e11e796f19990e", // String; ISO 8601 date-time; when the contact was deleted (UTC) "deletedOn": "2024-01-28T11:02:00Z" } }` [Contact update](https://developers.squarespace.com/webhooks/events/contact-update) [Address create](https://developers.squarespace.com/webhooks/events/address-create) --- # Developer Portal Menu Address update[](https://developers.squarespace.com/webhooks/events/address-update#address-update) =================================================================================================== Code `"topic": "address.update"` Occurs when an existing address book entry for a contact is changed — for example when line fields, default shipping flag, or contact name on the address are updated. See the [Contacts API](https://developers.squarespace.com/commerce-apis/contacts-overview) for the full resource model. Read the [Webhooks overview](https://developers.squarespace.com/webhooks/overview) for details about the information sent with every Squarespace webhook notification. > **Editing the default address does not trigger `contact.update`.** When the content of the already-default address is changed (fields like `line1`, `city`, etc.), only `address.update` fires — no [`contact.update`](https://developers.squarespace.com/webhooks/events/contact-update) > is emitted. However, if a _different_ address is assigned as the default (the default address ID changes), a `contact.update` is triggered because the contact's `defaultShippingAddress` reference has changed. Request payload example[](https://developers.squarespace.com/webhooks/events/address-update#request-payload-example) --------------------------------------------------------------------------------------------------------------------- JavascriptCode `{ // String; unique notification id "id": "5c2ba184b63ed3cb411ce2b1", // String; Squarespace website id that triggered the notification. "websiteId": "5f3c3d55ac435e1a051f77b3", // String; unique Webhook Subscriptions id "subscriptionId": "5f3c2155d947844beedda991", // String; description of the event that triggered notification. "topic": "address.update", // ISO 8601 UTC date and time string; represents when the notification was created. "createdOn": "2024-01-28T10:44:00Z", // Object; data associated with the event "data": { "contactId": "5f3c39ce69e11e796f19990e", // String; ISO 8601 date-time; when the address was last updated "updatedOn": "2024-01-29T14:30:00Z", // Object; the updated address book entry "addressBookEntry": { "addressBookEntryId": "addr-entry-id-001", "defaultShipping": false, "address": { "firstName": "Jane", "lastName": "Doe", "line1": "200 Oak Ave", "line2": null, "city": "Springfield", "region": "IL", "postalCode": "62702", "countryCode": "US", "phoneNumber": "217-555-0100" } } } }` [Address create](https://developers.squarespace.com/webhooks/events/address-create) [Address delete](https://developers.squarespace.com/webhooks/events/address-delete) --- # Developer Portal Menu Address create[](https://developers.squarespace.com/webhooks/events/address-create#address-create) =================================================================================================== Code `"topic": "address.create"` Occurs when a new address book entry is added for a contact — for example when they save a shipping address to their address book. The `addressBookEntry` object in `data` contains the new entry, following the same structure as `defaultShippingAddress` on a contact in the [Contacts API](https://developers.squarespace.com/commerce-apis/contacts-overview) . Read the [Webhooks overview](https://developers.squarespace.com/webhooks/overview) for details about the information sent with every Squarespace webhook notification. > **First address always becomes default.** If this is the contact's only address, it is automatically set as the default shipping address regardless of the `defaultShipping` value in the request. Because the contact's `defaultShippingAddress` reference changes (from `null` to the new entry), a [`contact.update`](https://developers.squarespace.com/webhooks/events/contact-update) > event is also emitted. Request payload example[](https://developers.squarespace.com/webhooks/events/address-create#request-payload-example) --------------------------------------------------------------------------------------------------------------------- JavascriptCode `{ // String; unique notification id "id": "5c2ba184b63ed3cb411ce2b1", // String; Squarespace website id that triggered the notification. "websiteId": "5f3c3d55ac435e1a051f77b3", // String; unique Webhook Subscriptions id "subscriptionId": "5f3c2155d947844beedda991", // String; description of the event that triggered notification. "topic": "address.create", // ISO 8601 UTC date and time string; represents when the notification was created. "createdOn": "2024-01-28T10:44:00Z", // Object; data associated with the event "data": { // String; contact this address belongs to "contactId": "5f3c39ce69e11e796f19990e", // String; ISO 8601 date-time; when the address was created "createdOn": "2024-01-28T10:44:00Z", // Object; the new address book entry "addressBookEntry": { // String; unique id of this address book entry "addressBookEntryId": "addr-entry-id-001", // Boolean; whether this entry is the default shipping address "defaultShipping": true, "address": { "firstName": "Jane", "lastName": "Doe", "line1": "100 Main St", "line2": "Apt 1A", "city": "Springfield", "region": "IL", "postalCode": "62701", "countryCode": "US", "phoneNumber": "217-555-0100" } } } }` [Contact delete](https://developers.squarespace.com/webhooks/events/contact-delete) [Address update](https://developers.squarespace.com/webhooks/events/address-update) --- # Developer Portal Menu Contact update[](https://developers.squarespace.com/webhooks/events/contact-update#contact-update) =================================================================================================== Code `"topic": "contact.update"` Occurs when an existing contact is updated on a Squarespace website — for example when contact fields, email, or marketing preferences change. See the [Contacts API](https://developers.squarespace.com/commerce-apis/contacts-overview) for the full resource model. Read the [Webhooks overview](https://developers.squarespace.com/webhooks/overview) for details about the information sent with every Squarespace webhook notification. > **When the default address changes, a `contact.update` is triggered.** If a different address is assigned as the contact's default shipping address — for example because the previous default was deleted, or a new address was explicitly set as default — a `contact.update` event fires because the contact's `defaultShippingAddress` reference has changed. However, when the content of the already-default address changes (fields like `line1`, `city`, etc.), no `contact.update` is emitted — only an [`address.update`](https://developers.squarespace.com/webhooks/events/address-update) > event fires. > **Marketing acceptance changes always produce a separate `contact.update`.** When `acceptsMarketing` is changed alongside other contact fields, the marketing change generates its own `contact.update` event in addition to any other update event. When a new contact is created with `acceptsMarketing` set to `true`, an extra `contact.update` is also emitted — and due to the asynchronous nature of webhooks, it may arrive before the corresponding [`contact.create`](https://developers.squarespace.com/webhooks/events/contact-create) > . Integrators should handle `contact.update` for a contact that has not yet been seen via `contact.create`. Request payload example[](https://developers.squarespace.com/webhooks/events/contact-update#request-payload-example) --------------------------------------------------------------------------------------------------------------------- JavascriptCode `{ // String; unique notification id "id": "5c2ba184b63ed3cb411ce2b1", // String; Squarespace website id that triggered the notification. "websiteId": "5f3c3d55ac435e1a051f77b3", // String; unique Webhook Subscriptions id "subscriptionId": "5f3c2155d947844beedda991", // String; description of the event that triggered notification. "topic": "contact.update", // ISO 8601 UTC date and time string; represents when the notification was created. "createdOn": "2024-01-28T10:44:00Z", // Object; data associated with the event "data": { // String; ISO 8601 date-time; when the contact was created "createdOn": "2024-01-28T10:44:00Z", // String; ISO 8601 date-time; when the contact was last updated "updatedOn": "2024-01-29T14:30:00Z", // Object; the full Contact resource (same shape as contact.create) "contact": { "contactId": "5f3c39ce69e11e796f19990e", "firstName": "Jane", "lastName": "Doe", "primaryEmail": { "value": "jane.doe@example.com", "createdOn": "2024-01-28T10:44:00Z", "acceptsMarketing": { "acceptsMarketing": true } }, "defaultShippingAddress": null } } }` [Contact create](https://developers.squarespace.com/webhooks/events/contact-create) [Contact delete](https://developers.squarespace.com/webhooks/events/contact-delete) --- # Developer Portal Menu Contact create[](https://developers.squarespace.com/webhooks/events/contact-create#contact-create) =================================================================================================== Code `"topic": "contact.create"` Occurs when a new contact is created on a Squarespace website — for example when a visitor subscribes, becomes a customer, or is created via the API. See the [Contacts API](https://developers.squarespace.com/commerce-apis/contacts-overview) for the full resource model. Read the [Webhooks overview](https://developers.squarespace.com/webhooks/overview) for details about the information sent with every Squarespace webhook notification. > **Creating a contact with marketing acceptance triggers an extra event.** When a contact is created with `acceptsMarketing` set to `true`, an additional [`contact.update`](https://developers.squarespace.com/webhooks/events/contact-update) > event is emitted for the marketing change. Due to the asynchronous nature of webhooks, the `contact.update` may arrive before the `contact.create`. Integrators should handle receiving a `contact.update` for a contact that has not yet been seen via `contact.create`. Request payload example[](https://developers.squarespace.com/webhooks/events/contact-create#request-payload-example) --------------------------------------------------------------------------------------------------------------------- JavascriptCode `{ // String; unique notification id "id": "5c2ba184b63ed3cb411ce2b1", // String; Squarespace website id that triggered the notification. "websiteId": "5f3c3d55ac435e1a051f77b3", // String; unique Webhook Subscriptions id "subscriptionId": "5f3c2155d947844beedda991", // String; description of the event that triggered notification. "topic": "contact.create", // ISO 8601 UTC date and time string; represents when the notification was created. "createdOn": "2024-01-28T10:44:00Z", // Object; data associated with the event "data": { // String; ISO 8601 date-time; when the contact was created "createdOn": "2024-01-28T10:44:00Z", // Object; the full Contact resource "contact": { // String; unique contact id "contactId": "5f3c39ce69e11e796f19990e", "firstName": "Jane", "lastName": "Doe", "primaryEmail": { "value": "jane.doe@example.com", "createdOn": "2024-01-28T10:44:00Z", "acceptsMarketing": { "acceptsMarketing": true } }, // Optional; default shipping address when present "defaultShippingAddress": { "addressBookEntryId": "addr-entry-id", "defaultShipping": true, "address": { "firstName": "Jane", "lastName": "Doe", "line1": "100 Main St", "line2": "Apt 1A", "city": "Springfield", "region": "IL", "postalCode": "62701", "countryCode": "US", "phoneNumber": "217-555-0100" } } } } }` [Order update](https://developers.squarespace.com/webhooks/events/order-update) [Contact update](https://developers.squarespace.com/webhooks/events/contact-update) --- # Developer Portal Menu Address delete[](https://developers.squarespace.com/webhooks/events/address-delete#address-delete) =================================================================================================== Code `"topic": "address.delete"` Occurs when an address book entry is removed from a contact's address book. The payload identifies the contact and the deleted entry ID. See the [Contacts API](https://developers.squarespace.com/commerce-apis/contacts-overview) for the full resource model. Read the [Webhooks overview](https://developers.squarespace.com/webhooks/overview) for details about the information sent with every Squarespace webhook notification. > **Deleting the default address reassigns a new default.** If the deleted address was the contact's default shipping address, another address in the address book is automatically promoted to default. Because the contact's `defaultShippingAddress` reference changes, a [`contact.update`](https://developers.squarespace.com/webhooks/events/contact-update) > event is also emitted. Request payload example[](https://developers.squarespace.com/webhooks/events/address-delete#request-payload-example) --------------------------------------------------------------------------------------------------------------------- JavascriptCode `{ // String; unique notification id "id": "5c2ba184b63ed3cb411ce2b1", // String; Squarespace website id that triggered the notification. "websiteId": "5f3c3d55ac435e1a051f77b3", // String; unique Webhook Subscriptions id "subscriptionId": "5f3c2155d947844beedda991", // String; description of the event that triggered notification. "topic": "address.delete", // ISO 8601 UTC date and time string; represents when the notification was created. "createdOn": "2024-01-28T10:44:00Z", // Object; data associated with the event — deletion metadata "data": { // String; contact that owned this address "contactId": "5f3c39ce69e11e796f19990e", // String; id of the address book entry that was deleted "addressBookEntryId": "addr-entry-id-001" } }` [Address update](https://developers.squarespace.com/webhooks/events/address-update) [Extension uninstall](https://developers.squarespace.com/webhooks/events/extension-uninstall) --- # Developer Portal Menu Order create[](https://developers.squarespace.com/webhooks/events/order-create#order-create) ============================================================================================= Code `"topic": "order.create"` Occurs when an order is created on a Squarespace merchant site. Read the [Overview](https://developers.squarespace.com/webhooks/overview) for details about the information sent with every Squarespace webhook notification. > **Payment Plan orders fire `order.create` only when fully paid.** To preserve backward compatibility with existing integrations, an order using a [Payment Plan](https://developers.squarespace.com/commerce-apis/orders-overview#payment-plans) > does not trigger `order.create` when the deposit is captured at checkout. The notification fires only when the order's `paymentState` transitions to `PAID` (all installments collected), which may be days, weeks, or months after the order was originally placed. To detect newly placed Payment Plan orders in real time, poll the [retrieve all orders](https://developers.squarespace.com/commerce-apis/retrieve-all-orders) > endpoint with `paymentStates=PARTIALLY_PAID`. Request payload example[](https://developers.squarespace.com/webhooks/events/order-create#request-payload-example) ------------------------------------------------------------------------------------------------------------------- JavascriptCode `{ // String; unique notification id "id": "5c2ba184b63ed3cb411ce2b1", // String; Squarespace website id that triggered the notification. "websiteId": "5f3c3d55ac435e1a051f77b3", // String; unique Webhook Subscriptions id "subscriptionId": "5f3c2155d947844beedda991", // String; description of the event that triggered notification. "topic": "order.create", // ISO 8601 UTC date and time string; represents when the notification was created. "createdOn": "2020-04-22T22:18+00:00", // Object; data associated with the event. "data": { // String; unique order id. "orderId": "5f3c39ce69e11e796f19990e" } }` [Notification delivery](https://developers.squarespace.com/webhooks/notification-delivery) [Order update](https://developers.squarespace.com/webhooks/events/order-update) --- # Developer Portal Menu Commerce API [Commerce API](https://developers.squarespace.com/commerce-apis) WebhookSubscriptions ==================== [Download schema](https://developers.squarespace.com/commerce-apis/latest/schema-processor-version-version-latest.json) * * * List webhook subscriptions[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#list-webhook-subscriptions) ------------------------------------------------------------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/webhook\_subscriptions Retrieves information for all webhook subscriptions. The response contains up to 25 Webhook Subscriptions. Requires an OAuth access token; API keys are not supported. ### List webhook subscriptions › Headers[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#list-webhook-subscriptions/header-parameters) `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 webhook subscriptions › Responses[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#list-webhook-subscriptions/responses) 200404 OK [ExternalWebhookSubscriptionListResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionlistresponse) `webhookSubscriptions` ​[ExternalWebhookSubscriptionResponse\[\]](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionresponse) Array of Webhook Subscription resources. If the merchant site doesn't have any webhook subscriptions, this array is empty. * * * Create webhook subscription[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#create-webhook-subscription) --------------------------------------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/webhook\_subscriptions Creates a webhook subscription. A successful request returns the created Webhook Subscription resource. Requires an OAuth access token; API keys are not supported. The OAuth token must hold scopes appropriate for each subscribed event topic: order.create and order.update require website.orders or website.orders.read; contact.create, contact.update, contact.delete, address.create, address.update, and address.delete require website.contacts; extension.uninstall requires no event-specific scope. ### Create webhook subscription › Headers[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#create-webhook-subscription/header-parameters) `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 webhook subscription › Request Body[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#create-webhook-subscription/request-body) [ExternalCreateWebhookSubscriptionRequest](https://developers.squarespace.com/commerce-apis/~schemas#externalcreatewebhooksubscriptionrequest) `endpointUrl` ​string · required HTTPS URL to POST webhook notifications. Example: https://example-extension.com/uninstall `topics` ​string\[\] List of event topics that trigger a webhook notification. Enum values: order.create order.update extension.uninstall contact.create contact.update contact.delete address.create address.update show 1 more ### Create webhook subscription › Responses[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#create-webhook-subscription/responses) 201400404409 The created webhook subscription. [ExternalCreateWebhookSubscriptionResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalcreatewebhooksubscriptionresponse) `clientId` ​string · readOnly · required Third-party client id. Example: A125dfPqdKJDqPAcJQgLo3A5mwcKIq2G `createdOn` ​string · date-time · readOnly · required ISO 8601 UTC date and time string; represents when the webhook subscription was created. Example: 2020-04-22T22:18:00Z `endpointUrl` ​string · required HTTPS URL to POST webhook notifications. Example: https://example-extension.com/uninstall `id` ​string · readOnly · required Unique Webhook Subscription id. Example: 7aff04bb-90e0-4002-96c2-69d8162c8dae `secret` ​string · readOnly · required Hexadecimal value used to generate a signature for a webhook notification; field is only returned when creating a new subscription or rotating a secret. Store the secret in a safe location to verify notifications from Squarespace. See the 'Verifying notifications' guide under Webhooks for details. Example: F3F9B981C78E7A6187E42853F6CE2804177E98206164779423B02DEC981ACD6B `updatedOn` ​string · date-time · readOnly · required ISO 8601 UTC date and time string; represents when the webhook subscription was last modified. Example: 2020-04-22T22:18:00Z `websiteId` ​string · readOnly · required Unique Webhook Subscription id. Example: 7aff04bb-90e0-4002-96c2-69d8162c8dae `topics` ​string\[\] List of event topics that trigger a webhook notification. Enum values: order.create order.update extension.uninstall contact.create contact.update contact.delete address.create address.update show 1 more * * * Get webhook subscription[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#get-webhook-subscription) --------------------------------------------------------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId} Retrieves information for a specific webhook subscription. Requires an OAuth access token; API keys are not supported. ### Get webhook subscription › path Parameters[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#get-webhook-subscription/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to retrieve. ### Get webhook subscription › Headers[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#get-webhook-subscription/header-parameters) `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 webhook subscription › Responses[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#get-webhook-subscription/responses) 200404 OK [ExternalWebhookSubscriptionResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionresponse) `clientId` ​string Third-party client id. `createdOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was created. `endpointUrl` ​string HTTPS URL that receives webhook notifications. `id` ​string Unique Webhook Subscription id. `topics` ​string\[\] List of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. `updatedOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was last modified. `websiteId` ​string Unique website id. * * * Update webhook subscription[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#update-webhook-subscription) --------------------------------------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId} Updates information for a webhook subscription. A successful request returns the updated Webhook Subscription resource. Requires an OAuth access token; API keys are not supported. The OAuth token must hold scopes appropriate for each subscribed event topic: order.create and order.update require website.orders or website.orders.read; contact.create, contact.update, contact.delete, address.create, address.update, and address.delete require website.contacts; extension.uninstall requires no event-specific scope. ### Update webhook subscription › path Parameters[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#update-webhook-subscription/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to update. ### Update webhook subscription › Headers[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#update-webhook-subscription/header-parameters) `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 webhook subscription › Request Body[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#update-webhook-subscription/request-body) [ExternalUpdateWebhookSubscriptionRequest](https://developers.squarespace.com/commerce-apis/~schemas#externalupdatewebhooksubscriptionrequest) `endpointUrl` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. `topics` ​[ChangeListString](https://developers.squarespace.com/commerce-apis/~schemas#changeliststring) Optional; list of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. ### Update webhook subscription › Responses[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#update-webhook-subscription/responses) 200400404 OK [ExternalWebhookSubscriptionResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionresponse) `clientId` ​string Third-party client id. `createdOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was created. `endpointUrl` ​string HTTPS URL that receives webhook notifications. `id` ​string Unique Webhook Subscription id. `topics` ​string\[\] List of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. `updatedOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was last modified. `websiteId` ​string Unique website id. * * * Delete webhook subscription[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#delete-webhook-subscription) --------------------------------------------------------------------------------------------------------------------------------------- DELETE https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId} Deletes a webhook subscription. Requires an OAuth access token; API keys are not supported. ### Delete webhook subscription › path Parameters[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#delete-webhook-subscription/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to delete. ### Delete webhook subscription › Headers[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#delete-webhook-subscription/header-parameters) `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 webhook subscription › Responses[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#delete-webhook-subscription/responses) 204404 No content. The webhook subscription was deleted successfully. No data returned * * * Rotate webhook subscription secret[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#rotate-webhook-subscription-secret) ----------------------------------------------------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId}/actions/rotateSecret Rotates a webhook subscription's secret. The previous secret for a subscription is no longer valid after a new one is generated. Requires an OAuth access token; API keys are not supported. ### Rotate webhook subscription secret › path Parameters[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#rotate-webhook-subscription-secret/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to update. ### Rotate webhook subscription secret › Headers[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#rotate-webhook-subscription-secret/header-parameters) `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 ### Rotate webhook subscription secret › Responses[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#rotate-webhook-subscription-secret/responses) 200404 OK [ExternalRotateSecretResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalrotatesecretresponse) `secret` ​string Hexadecimal value used to generate a signature for a webhook notification; field is only returned when creating a new subscription or rotating a secret. Store the secret in a safe location to verify notifications from Squarespace. * * * Send test notification[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#send-test-notification) ----------------------------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId}/actions/sendTestNotification Sends a notification to a subscribed webhook endpoint for testing purposes. This is a one-time notification, and will not be retried if it fails or times out. Requires an OAuth access token; API keys are not supported. ### Send test notification › path Parameters[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#send-test-notification/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to send a notification to. ### Send test notification › Headers[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#send-test-notification/header-parameters) `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 ### Send test notification › Request Body[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#send-test-notification/request-body) [ExternalSendTestNotificationRequest](https://developers.squarespace.com/commerce-apis/~schemas#externalsendtestnotificationrequest) `topic` ​string · required Required; Squarespace event topic that triggers a webhook notification. Possible values include: extension.uninstall, order.create, order.update. ### Send test notification › Responses[](https://developers.squarespace.com/commerce-apis/rotate-subscription-secret#send-test-notification/responses) 200400404 OK [ExternalTestNotificationResponse](https://developers.squarespace.com/commerce-apis/~schemas#externaltestnotificationresponse) `statusCode` ​integer · int32 Status code returned by the subscribed webhook endpoint. * * * [Profiles](https://developers.squarespace.com/commerce-apis/profiles) [Overview](https://developers.squarespace.com/commerce-apis/webhook-subscriptions-overview) --- # Developer Portal Menu Commerce API [Commerce API](https://developers.squarespace.com/commerce-apis) Profiles ======== [Download schema](https://developers.squarespace.com/commerce-apis/latest/schema-processor-version-version-latest.json) * * * List profiles[](https://developers.squarespace.com/commerce-apis/profiles#list-profiles) ----------------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/profiles Retrieves all profiles; profiles can be filtered and sorted. The response contains up to 50 Profiles and supports dynamic cursors for pagination. ### List profiles › query Parameters[](https://developers.squarespace.com/commerce-apis/profiles#list-profiles/query-parameters) `sortDirection` ​string Identifies the sort direction of the result list; asc for ascending or dsc for descending. If not specified, the returned list is in descending order. `sortField` ​string Identifies the sort field of the result list. Values include: createdOn, id, email, or lastName. If not specified, the returned list is sorted by id. `filter` ​string Semicolon separated list used to filter profile results. Values include: isCustomer and/or hasAccount, or email. The email filter cannot be used with isCustomer or hasAccount. `email` ​string Email address filter (URL-encoded, case insensitive). `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. ### List profiles › Headers[](https://developers.squarespace.com/commerce-apis/profiles#list-profiles/header-parameters) `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 profiles › Responses[](https://developers.squarespace.com/commerce-apis/profiles#list-profiles/responses) 200400404 A paginated list of profiles. [PaginatedProfileListResponse](https://developers.squarespace.com/commerce-apis/~schemas#paginatedprofilelistresponse) `pagination` ​object `profiles` ​[Profile\[\]](https://developers.squarespace.com/commerce-apis/~schemas#profile) * * * Get profiles[](https://developers.squarespace.com/commerce-apis/profiles#get-profiles) --------------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/profiles/{profileIdCsvs} Retrieves information for specific profiles. The response contains a list of up to 50 Profiles. Multiple Profiles can be retrieved by providing a comma-separated list of profile ids. ### Get profiles › path Parameters[](https://developers.squarespace.com/commerce-apis/profiles#get-profiles/path-parameters) `profileIdCsvs` ​string · required Specifies the profiles to retrieve. Multiple Profiles can be retrieved by providing a comma-separated list of profile ids. ### Get profiles › Headers[](https://developers.squarespace.com/commerce-apis/profiles#get-profiles/header-parameters) `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 profiles › Responses[](https://developers.squarespace.com/commerce-apis/profiles#get-profiles/responses) 200400404 The requested profiles. [ProfileListResponse](https://developers.squarespace.com/commerce-apis/~schemas#profilelistresponse) `profiles` ​[Profile\[\]](https://developers.squarespace.com/commerce-apis/~schemas#profile) * * * [Transactions](https://developers.squarespace.com/commerce-apis/transactions) [WebhookSubscriptions](https://developers.squarespace.com/commerce-apis/webhooksubscriptions) --- # Developer Portal Menu Commerce API [Commerce API](https://developers.squarespace.com/commerce-apis) Transactions ============ [Download schema](https://developers.squarespace.com/commerce-apis/latest/schema-processor-version-version-latest.json) * * * List transactions[](https://developers.squarespace.com/commerce-apis/transactions#list-transactions) ----------------------------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/commerce/transactions Retrieves all financial transactions for orders and donations. Per order and donation, the response groups transactions into a Document, contains up to 50 Documents ordered by their modification date (modifiedOn), and supports dynamic cursors for pagination. ### List transactions › query Parameters[](https://developers.squarespace.com/commerce-apis/transactions#list-transactions/query-parameters) `cursor` ​string Identifies where the next page of results should begin. Should be the value of pagination.nextPageCursor from a previous response. `modifiedAfter` ​string Time-boxes the request to Documents that were modified after a given ISO 8601 UTC date and time string (YYYY-MM-DDThh:mm:ss.sZ). `modifiedBefore` ​string Time-boxes the request to Documents that were modified before a given ISO 8601 UTC date and time string (YYYY-MM-DDThh:mm:ss.sZ). `orderId` ​string ### List transactions › Headers[](https://developers.squarespace.com/commerce-apis/transactions#list-transactions/header-parameters) `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 transactions › Responses[](https://developers.squarespace.com/commerce-apis/transactions#list-transactions/responses) 200400 A paginated list of transaction documents. [PaginatedTransactionListResponse](https://developers.squarespace.com/commerce-apis/~schemas#paginatedtransactionlistresponse) `documents` ​[TransactionDocument\[\]](https://developers.squarespace.com/commerce-apis/~schemas#transactiondocument) Array of Document resources. If the merchant site doesn't have any payment transactions for orders or donations, this array is empty. `pagination` ​object * * * Get transactions[](https://developers.squarespace.com/commerce-apis/transactions#get-transactions) --------------------------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/commerce/transactions/{documentIds} Retrieves information for specific transaction Documents. The response contains up to 50 Documents. Multiple Documents can be retrieved by providing a comma-separated list of Document ids. ### Get transactions › path Parameters[](https://developers.squarespace.com/commerce-apis/transactions#get-transactions/path-parameters) `documentIds` ​string · required Specifies the Documents to retrieve. Multiple Documents can be retrieved by providing a comma-separated list of Document ids. ### Get transactions › Headers[](https://developers.squarespace.com/commerce-apis/transactions#get-transactions/header-parameters) `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 transactions › Responses[](https://developers.squarespace.com/commerce-apis/transactions#get-transactions/responses) 200400404 The requested transaction documents. [TransactionListResponse](https://developers.squarespace.com/commerce-apis/~schemas#transactionlistresponse) `documents` ​[TransactionDocument\[\]](https://developers.squarespace.com/commerce-apis/~schemas#transactiondocument) Array of Document resources. * * * [Orders](https://developers.squarespace.com/commerce-apis/orders) [Profiles](https://developers.squarespace.com/commerce-apis/profiles) --- # Developer Portal Menu Commerce API [Commerce API](https://developers.squarespace.com/commerce-apis) Orders ====== [Download schema](https://developers.squarespace.com/commerce-apis/latest/schema-processor-version-version-latest.json) * * * List orders[](https://developers.squarespace.com/commerce-apis/orders#list-orders) ----------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/commerce/orders Retrieves information about all orders. Orders can be filtered by Customer ID and date ranges. The response contains order information in an Order, up to 50 Orders ordered by their modification date (modifiedOn), and supports dynamic cursors for pagination. ### List orders › query Parameters[](https://developers.squarespace.com/commerce-apis/orders#list-orders/query-parameters) `customerId` ​string Used to filter Orders by Customer ID. `modifiedAfter` ​string Time-boxes the request to Orders 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 Orders 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. `fulfillmentStatus` ​string Used to filter Orders by fulfillment status. Values may be PENDING, FULFILLED, or CANCELED. `paymentStates` ​string Used to filter Orders by payment state. Accepts a comma-separated list of values. Possible values are: NOT\_CHARGED, AUTHORIZED, PAID, REFUNDED, PENDING, FAILED, REFUND\_PENDING, REFUND\_FAILED, PARTIALLY\_PAID. If not specified, defaults to NOT\_CHARGED, AUTHORIZED, PAID, and REFUNDED. ### List orders › Headers[](https://developers.squarespace.com/commerce-apis/orders#list-orders/header-parameters) `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 orders › Responses[](https://developers.squarespace.com/commerce-apis/orders#list-orders/responses) 200400 A paginated list of orders. [OrderListResponse](https://developers.squarespace.com/commerce-apis/~schemas#orderlistresponse) `pagination` ​object `result` ​[Order\[\]](https://developers.squarespace.com/commerce-apis/~schemas#order) * * * Create order[](https://developers.squarespace.com/commerce-apis/orders#create-order) ------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/commerce/orders Creates an order using information from a third-party sales channel. A successful request creates an Order resource. ### Create order › Headers[](https://developers.squarespace.com/commerce-apis/orders#create-order/header-parameters) `Idempotency-Key` ​string · required Idempotency key to prevent duplicate order creation. `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 order › Request Body[](https://developers.squarespace.com/commerce-apis/orders#create-order/request-body) [CreateOrderRequest](https://developers.squarespace.com/commerce-apis/~schemas#createorderrequest) `channelName` ​string · maxLength: 30 · required Name of third-party sales channel. `createdOn` ​string · date-time · required ISO 8601 UTC date and time string. Represents the date and time when the order was placed through the third-party sales channel. `externalOrderReference` ​string · maxLength: 200 · required Order reference identifier used by the third-party sales channel. `fulfillments` ​[CreateOrderShipmentRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#createordershipmentrequest)  · required Array of shipping fulfillments; up to 100 entries. Describes shipment information for the order. `grandTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount)  · required A monetary amount with currency code and decimal value `lineItems` ​[CreateLineItemRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#createlineitemrequest)  · required Array of purchased line items; cannot be empty. `priceTaxInterpretation` ​[TaxInterpretation](https://developers.squarespace.com/commerce-apis/~schemas#taxinterpretation)  · enum · required Indicates that lineItems.unitPricePaid includes tax. Values may be EXCLUSIVE or INCLUSIVE. Enum values: INCLUSIVE EXCLUSIVE `billingAddress` ​[AddressRequest](https://developers.squarespace.com/commerce-apis/~schemas#addressrequest) Customer's shipping address. `customerEmail` ​string · email Email address provided at checkout on the third-party sales channel. Example: john.doe@example.com `discountLines` ​[CreateDiscountLineRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#creatediscountlinerequest) Array of discount line items. Describes the promotions redeemed during checkout. `discountTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `fulfilledOn` ​string · date-time ISO 8601 UTC date and time string. Represents the moment the order was fulfilled. Required if fulfillmentStatus is FULFILLED. `fulfillmentStatus` ​[OrderCreateFulfillmentStatus](https://developers.squarespace.com/commerce-apis/~schemas#ordercreatefulfillmentstatus)  · enum Current fulfillment status of the order. Value may be PENDING or FULFILLED. Enum values: PENDING FULFILLED `inventoryBehavior` ​[CreateOrderInventoryBehavior](https://developers.squarespace.com/commerce-apis/~schemas#createorderinventorybehavior)  · enum Indicates whether to deduct stock quantity for the product variant upon Order creation. Values may be DEDUCT or SKIP. Defaults to SKIP. Enum values: DEDUCT SKIP `shippingAddress` ​[AddressRequest](https://developers.squarespace.com/commerce-apis/~schemas#addressrequest) Customer's shipping address. `shippingLines` ​[CreateShippingLineRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#createshippinglinerequest) Array of shipping line items. Describes the shipping options chosen at checkout. Currently accepts only one shipping entry. `shippingTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `shopperFulfillmentNotificationBehavior` ​[ShopperFulfillmentNotificationBehavior](https://developers.squarespace.com/commerce-apis/~schemas#shopperfulfillmentnotificationbehavior)  · enum Indicates whether to send a fulfillment notification email to the customer. Value may be SEND or SKIP. Enum values: SEND SKIP `subtotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `taxTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value ### Create order › Responses[](https://developers.squarespace.com/commerce-apis/orders#create-order/responses) 201400409429 The created order. [Order](https://developers.squarespace.com/commerce-apis/~schemas#order) `billingAddress` ​[Address](https://developers.squarespace.com/commerce-apis/~schemas#address) Customer's shipping address provided at checkout or, for recurring subscription orders, the customer's current mailing address. `channel` ​string Where the order originated; possible values are: web and pos. Example: web `channelName` ​string Name of the third-party sales channel. Example: Faire Wholesale `createdOn` ​string · date-time ISO 8601 UTC date and time string; represents the moment when the order was placed. Example: 2016-12-23T15:58:07.187Z `customerEmail` ​string Email address entered at checkout or, for recurring subscription orders, the customer's current email address. Example: foo@example.com `customerId` ​string Unique customer id. Example: 585d498fdee9f31a60284a38 `discountLines` ​[DiscountLine\[\]](https://developers.squarespace.com/commerce-apis/~schemas#discountline) Array of discount line items; describes the promotions redeemed during checkout. `discountTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `externalOrderReference` ​string Order reference identifier used by the third-party sales channel. Example: EXT-98765 `formSubmission` ​[FormItem\[\]](https://developers.squarespace.com/commerce-apis/~schemas#formitem) Array of form data submitted via the checkout page. `fulfilledOn` ​string · date-time ISO 8601 UTC date and time string; represents the moment the order was fulfilled. `fulfillmentStatus` ​[FulfillmentStatus](https://developers.squarespace.com/commerce-apis/~schemas#fulfillmentstatus)  · enum Current fulfillment status of the order. Value may be: PENDING, FULFILLED, or CANCELED. Enum values: PENDING FULFILLED CANCELED `fulfillments` ​[Fulfillment\[\]](https://developers.squarespace.com/commerce-apis/~schemas#fulfillment) Array of shipping fulfillments; describes shipment information for the order. `grandTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `id` ​string Unique Order id. Example: 585d498fdee9f31a60284a37 `internalNotes` ​[OrderNote\[\]](https://developers.squarespace.com/commerce-apis/~schemas#ordernote) Array of internal notes added to the order by the merchant. `lineItems` ​[LineItem\[\]](https://developers.squarespace.com/commerce-apis/~schemas#lineitem) Array of purchased line items; line items describe what product or product variant was purchased, how many of that item were purchased, and additional details. `modifiedOn` ​string · date-time ISO 8601 UTC date and time string; represents when the order was last modified. Example: 2016-12-23T15:58:07.187Z `orderNumber` ​string Unique, sequential number for the Order. Example: 3 `paymentState` ​[PaymentState](https://developers.squarespace.com/commerce-apis/~schemas#paymentstate)  · enum Current state of payment for the order. Enum values: NOT\_CHARGED AUTHORIZED PAID REFUNDED PENDING FAILED REFUND\_PENDING REFUND\_FAILED show 1 more `priceTaxInterpretation` ​string Indicates whether lineItems.unitPricePaid includes tax. Values may be EXCLUSIVE or INCLUSIVE. Example: EXCLUSIVE `refundedTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `shippingAddress` ​[Address](https://developers.squarespace.com/commerce-apis/~schemas#address) Customer's shipping address provided at checkout or, for recurring subscription orders, the customer's current mailing address. `shippingLines` ​[ShippingLine\[\]](https://developers.squarespace.com/commerce-apis/~schemas#shippingline) Array of shipping line items; describes the shipping options chosen at checkout. `shippingOptionName` ​string the specific shipping service name selected at checkout (e.g. "USPS Ground Advantage", "Royal Mail Tracked 48"). `shippingOptionServiceType` ​string · enum The carrier service type identifier. Enum values: FEDEX\_GROUND FEDEX\_GROUND\_HOME\_DELIVERY FEDEX\_PRIORITY\_OVERNIGHT FEDEX\_STANDARD\_OVERNIGHT FEDEX\_2\_DAY FEDEX\_2\_DAY\_AM FEDEX\_EXPRESS\_SAVER FEDEX\_FIRST\_FREIGHT show 26 more `shippingTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `subtotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `taxTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `testmode` ​boolean If true, the order is a test order created using a payment method in test mode. * * * Get order[](https://developers.squarespace.com/commerce-apis/orders#get-order) ------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/commerce/orders/{id} Retrieves information for a specific order. The response contains order information in an Order. ### Get order › path Parameters[](https://developers.squarespace.com/commerce-apis/orders#get-order/path-parameters) `id` ​string · required Specifies the Order to retrieve. ### Get order › Headers[](https://developers.squarespace.com/commerce-apis/orders#get-order/header-parameters) `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 order › Responses[](https://developers.squarespace.com/commerce-apis/orders#get-order/responses) 200400404 The requested order. [Order](https://developers.squarespace.com/commerce-apis/~schemas#order) `billingAddress` ​[Address](https://developers.squarespace.com/commerce-apis/~schemas#address) Customer's shipping address provided at checkout or, for recurring subscription orders, the customer's current mailing address. `channel` ​string Where the order originated; possible values are: web and pos. Example: web `channelName` ​string Name of the third-party sales channel. Example: Faire Wholesale `createdOn` ​string · date-time ISO 8601 UTC date and time string; represents the moment when the order was placed. Example: 2016-12-23T15:58:07.187Z `customerEmail` ​string Email address entered at checkout or, for recurring subscription orders, the customer's current email address. Example: foo@example.com `customerId` ​string Unique customer id. Example: 585d498fdee9f31a60284a38 `discountLines` ​[DiscountLine\[\]](https://developers.squarespace.com/commerce-apis/~schemas#discountline) Array of discount line items; describes the promotions redeemed during checkout. `discountTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `externalOrderReference` ​string Order reference identifier used by the third-party sales channel. Example: EXT-98765 `formSubmission` ​[FormItem\[\]](https://developers.squarespace.com/commerce-apis/~schemas#formitem) Array of form data submitted via the checkout page. `fulfilledOn` ​string · date-time ISO 8601 UTC date and time string; represents the moment the order was fulfilled. `fulfillmentStatus` ​[FulfillmentStatus](https://developers.squarespace.com/commerce-apis/~schemas#fulfillmentstatus)  · enum Current fulfillment status of the order. Value may be: PENDING, FULFILLED, or CANCELED. Enum values: PENDING FULFILLED CANCELED `fulfillments` ​[Fulfillment\[\]](https://developers.squarespace.com/commerce-apis/~schemas#fulfillment) Array of shipping fulfillments; describes shipment information for the order. `grandTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `id` ​string Unique Order id. Example: 585d498fdee9f31a60284a37 `internalNotes` ​[OrderNote\[\]](https://developers.squarespace.com/commerce-apis/~schemas#ordernote) Array of internal notes added to the order by the merchant. `lineItems` ​[LineItem\[\]](https://developers.squarespace.com/commerce-apis/~schemas#lineitem) Array of purchased line items; line items describe what product or product variant was purchased, how many of that item were purchased, and additional details. `modifiedOn` ​string · date-time ISO 8601 UTC date and time string; represents when the order was last modified. Example: 2016-12-23T15:58:07.187Z `orderNumber` ​string Unique, sequential number for the Order. Example: 3 `paymentState` ​[PaymentState](https://developers.squarespace.com/commerce-apis/~schemas#paymentstate)  · enum Current state of payment for the order. Enum values: NOT\_CHARGED AUTHORIZED PAID REFUNDED PENDING FAILED REFUND\_PENDING REFUND\_FAILED show 1 more `priceTaxInterpretation` ​string Indicates whether lineItems.unitPricePaid includes tax. Values may be EXCLUSIVE or INCLUSIVE. Example: EXCLUSIVE `refundedTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `shippingAddress` ​[Address](https://developers.squarespace.com/commerce-apis/~schemas#address) Customer's shipping address provided at checkout or, for recurring subscription orders, the customer's current mailing address. `shippingLines` ​[ShippingLine\[\]](https://developers.squarespace.com/commerce-apis/~schemas#shippingline) Array of shipping line items; describes the shipping options chosen at checkout. `shippingOptionName` ​string the specific shipping service name selected at checkout (e.g. "USPS Ground Advantage", "Royal Mail Tracked 48"). `shippingOptionServiceType` ​string · enum The carrier service type identifier. Enum values: FEDEX\_GROUND FEDEX\_GROUND\_HOME\_DELIVERY FEDEX\_PRIORITY\_OVERNIGHT FEDEX\_STANDARD\_OVERNIGHT FEDEX\_2\_DAY FEDEX\_2\_DAY\_AM FEDEX\_EXPRESS\_SAVER FEDEX\_FIRST\_FREIGHT show 26 more `shippingTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `subtotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `taxTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `testmode` ​boolean If true, the order is a test order created using a payment method in test mode. * * * Fulfill order[](https://developers.squarespace.com/commerce-apis/orders#fulfill-order) --------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/commerce/orders/{id}/fulfillments Updates the status of a specific order to fulfilled, with options to include shipment information and send a customer notification. ### Fulfill order › path Parameters[](https://developers.squarespace.com/commerce-apis/orders#fulfill-order/path-parameters) `id` ​string · required Specifies the Order to update. ### Fulfill order › Headers[](https://developers.squarespace.com/commerce-apis/orders#fulfill-order/header-parameters) `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 ### Fulfill order › Request Body[](https://developers.squarespace.com/commerce-apis/orders#fulfill-order/request-body) [OrderFulfillmentRequest](https://developers.squarespace.com/commerce-apis/~schemas#orderfulfillmentrequest) `shipments` ​[CreateOrderShipmentRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#createordershipmentrequest) Array of shipment data. `shouldSendNotification` ​boolean Indicates whether the customer should receive an email notification about the added shipments. ### Fulfill order › Responses[](https://developers.squarespace.com/commerce-apis/orders#fulfill-order/responses) 204400404409 No content. The order was successfully fulfilled. No data returned * * * [Inventory](https://developers.squarespace.com/commerce-apis/inventory) [Transactions](https://developers.squarespace.com/commerce-apis/transactions) --- # Developer Portal Menu Commerce API [Commerce API](https://developers.squarespace.com/commerce-apis) WebhookSubscriptions ==================== [Download schema](https://developers.squarespace.com/commerce-apis/latest/schema-processor-version-version-latest.json) * * * List webhook subscriptions[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#list-webhook-subscriptions) ------------------------------------------------------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/webhook\_subscriptions Retrieves information for all webhook subscriptions. The response contains up to 25 Webhook Subscriptions. Requires an OAuth access token; API keys are not supported. ### List webhook subscriptions › Headers[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#list-webhook-subscriptions/header-parameters) `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 webhook subscriptions › Responses[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#list-webhook-subscriptions/responses) 200404 OK [ExternalWebhookSubscriptionListResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionlistresponse) `webhookSubscriptions` ​[ExternalWebhookSubscriptionResponse\[\]](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionresponse) Array of Webhook Subscription resources. If the merchant site doesn't have any webhook subscriptions, this array is empty. * * * Create webhook subscription[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#create-webhook-subscription) --------------------------------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/webhook\_subscriptions Creates a webhook subscription. A successful request returns the created Webhook Subscription resource. Requires an OAuth access token; API keys are not supported. The OAuth token must hold scopes appropriate for each subscribed event topic: order.create and order.update require website.orders or website.orders.read; contact.create, contact.update, contact.delete, address.create, address.update, and address.delete require website.contacts; extension.uninstall requires no event-specific scope. ### Create webhook subscription › Headers[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#create-webhook-subscription/header-parameters) `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 webhook subscription › Request Body[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#create-webhook-subscription/request-body) [ExternalCreateWebhookSubscriptionRequest](https://developers.squarespace.com/commerce-apis/~schemas#externalcreatewebhooksubscriptionrequest) `endpointUrl` ​string · required HTTPS URL to POST webhook notifications. Example: https://example-extension.com/uninstall `topics` ​string\[\] List of event topics that trigger a webhook notification. Enum values: order.create order.update extension.uninstall contact.create contact.update contact.delete address.create address.update show 1 more ### Create webhook subscription › Responses[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#create-webhook-subscription/responses) 201400404409 The created webhook subscription. [ExternalCreateWebhookSubscriptionResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalcreatewebhooksubscriptionresponse) `clientId` ​string · readOnly · required Third-party client id. Example: A125dfPqdKJDqPAcJQgLo3A5mwcKIq2G `createdOn` ​string · date-time · readOnly · required ISO 8601 UTC date and time string; represents when the webhook subscription was created. Example: 2020-04-22T22:18:00Z `endpointUrl` ​string · required HTTPS URL to POST webhook notifications. Example: https://example-extension.com/uninstall `id` ​string · readOnly · required Unique Webhook Subscription id. Example: 7aff04bb-90e0-4002-96c2-69d8162c8dae `secret` ​string · readOnly · required Hexadecimal value used to generate a signature for a webhook notification; field is only returned when creating a new subscription or rotating a secret. Store the secret in a safe location to verify notifications from Squarespace. See the 'Verifying notifications' guide under Webhooks for details. Example: F3F9B981C78E7A6187E42853F6CE2804177E98206164779423B02DEC981ACD6B `updatedOn` ​string · date-time · readOnly · required ISO 8601 UTC date and time string; represents when the webhook subscription was last modified. Example: 2020-04-22T22:18:00Z `websiteId` ​string · readOnly · required Unique Webhook Subscription id. Example: 7aff04bb-90e0-4002-96c2-69d8162c8dae `topics` ​string\[\] List of event topics that trigger a webhook notification. Enum values: order.create order.update extension.uninstall contact.create contact.update contact.delete address.create address.update show 1 more * * * Get webhook subscription[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#get-webhook-subscription) --------------------------------------------------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId} Retrieves information for a specific webhook subscription. Requires an OAuth access token; API keys are not supported. ### Get webhook subscription › path Parameters[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#get-webhook-subscription/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to retrieve. ### Get webhook subscription › Headers[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#get-webhook-subscription/header-parameters) `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 webhook subscription › Responses[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#get-webhook-subscription/responses) 200404 OK [ExternalWebhookSubscriptionResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionresponse) `clientId` ​string Third-party client id. `createdOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was created. `endpointUrl` ​string HTTPS URL that receives webhook notifications. `id` ​string Unique Webhook Subscription id. `topics` ​string\[\] List of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. `updatedOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was last modified. `websiteId` ​string Unique website id. * * * Update webhook subscription[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#update-webhook-subscription) --------------------------------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId} Updates information for a webhook subscription. A successful request returns the updated Webhook Subscription resource. Requires an OAuth access token; API keys are not supported. The OAuth token must hold scopes appropriate for each subscribed event topic: order.create and order.update require website.orders or website.orders.read; contact.create, contact.update, contact.delete, address.create, address.update, and address.delete require website.contacts; extension.uninstall requires no event-specific scope. ### Update webhook subscription › path Parameters[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#update-webhook-subscription/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to update. ### Update webhook subscription › Headers[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#update-webhook-subscription/header-parameters) `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 webhook subscription › Request Body[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#update-webhook-subscription/request-body) [ExternalUpdateWebhookSubscriptionRequest](https://developers.squarespace.com/commerce-apis/~schemas#externalupdatewebhooksubscriptionrequest) `endpointUrl` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. `topics` ​[ChangeListString](https://developers.squarespace.com/commerce-apis/~schemas#changeliststring) Optional; list of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. ### Update webhook subscription › Responses[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#update-webhook-subscription/responses) 200400404 OK [ExternalWebhookSubscriptionResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionresponse) `clientId` ​string Third-party client id. `createdOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was created. `endpointUrl` ​string HTTPS URL that receives webhook notifications. `id` ​string Unique Webhook Subscription id. `topics` ​string\[\] List of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. `updatedOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was last modified. `websiteId` ​string Unique website id. * * * Delete webhook subscription[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#delete-webhook-subscription) --------------------------------------------------------------------------------------------------------------------------------- DELETE https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId} Deletes a webhook subscription. Requires an OAuth access token; API keys are not supported. ### Delete webhook subscription › path Parameters[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#delete-webhook-subscription/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to delete. ### Delete webhook subscription › Headers[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#delete-webhook-subscription/header-parameters) `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 webhook subscription › Responses[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#delete-webhook-subscription/responses) 204404 No content. The webhook subscription was deleted successfully. No data returned * * * Rotate webhook subscription secret[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#rotate-webhook-subscription-secret) ----------------------------------------------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId}/actions/rotateSecret Rotates a webhook subscription's secret. The previous secret for a subscription is no longer valid after a new one is generated. Requires an OAuth access token; API keys are not supported. ### Rotate webhook subscription secret › path Parameters[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#rotate-webhook-subscription-secret/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to update. ### Rotate webhook subscription secret › Headers[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#rotate-webhook-subscription-secret/header-parameters) `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 ### Rotate webhook subscription secret › Responses[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#rotate-webhook-subscription-secret/responses) 200404 OK [ExternalRotateSecretResponse](https://developers.squarespace.com/commerce-apis/~schemas#externalrotatesecretresponse) `secret` ​string Hexadecimal value used to generate a signature for a webhook notification; field is only returned when creating a new subscription or rotating a secret. Store the secret in a safe location to verify notifications from Squarespace. * * * Send test notification[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#send-test-notification) ----------------------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/webhook\_subscriptions/{subscriptionId}/actions/sendTestNotification Sends a notification to a subscribed webhook endpoint for testing purposes. This is a one-time notification, and will not be retried if it fails or times out. Requires an OAuth access token; API keys are not supported. ### Send test notification › path Parameters[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#send-test-notification/path-parameters) `subscriptionId` ​string · required Specifies the Webhook Subscription to send a notification to. ### Send test notification › Headers[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#send-test-notification/header-parameters) `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 ### Send test notification › Request Body[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#send-test-notification/request-body) [ExternalSendTestNotificationRequest](https://developers.squarespace.com/commerce-apis/~schemas#externalsendtestnotificationrequest) `topic` ​string · required Required; Squarespace event topic that triggers a webhook notification. Possible values include: extension.uninstall, order.create, order.update. ### Send test notification › Responses[](https://developers.squarespace.com/commerce-apis/webhooksubscriptions#send-test-notification/responses) 200400404 OK [ExternalTestNotificationResponse](https://developers.squarespace.com/commerce-apis/~schemas#externaltestnotificationresponse) `statusCode` ​integer · int32 Status code returned by the subscribed webhook endpoint. * * * [Profiles](https://developers.squarespace.com/commerce-apis/profiles) [Overview](https://developers.squarespace.com/commerce-apis/webhook-subscriptions-overview) --- # Developer Portal Menu Analytics API overview[](https://developers.squarespace.com/commerce-apis/analytics-overview#analytics-api-overview) ===================================================================================================================== **Current version: 1.0** _For versioning details, read the [Versioning](https://developers.squarespace.com/commerce-apis/versioning) guide._ Use the Analytics API to retrieve aggregated commerce data for contacts on a Squarespace merchant site. The API currently returns transaction summaries — order and donation metrics — grouped by contact, making it useful for segmentation, reporting, and CRM enrichment workflows. > _Note: In the old Profiles API, transaction summary data is embedded inline on each `Profile` resource. The Analytics API provides the same information as a standalone, dedicated endpoint that accepts contact IDs from the [Contacts API](https://developers.squarespace.com/commerce-apis/contacts-overview) > and returns summaries in bulk — up to 1,000 contacts per request._ API resources[](https://developers.squarespace.com/commerce-apis/analytics-overview#api-resources) --------------------------------------------------------------------------------------------------- ### Transaction summaries[](https://developers.squarespace.com/commerce-apis/analytics-overview#transaction-summaries) `TransactionsSummary` provides an aggregated view of a contact's commerce activity on the site. Each summary includes: * `firstOrderSubmittedOn` — when the contact's first order was placed * `lastOrderSubmittedOn` — when the contact's most recent order was placed * `orderCount` — total number of orders * `totalOrderAmount` — grand total across all orders * `totalRefundAmount` — total value of all refunds * `firstDonationSubmittedOn` — when the contact's first donation was submitted * `lastDonationSubmittedOn` — when the contact's most recent donation was submitted * `donationCount` — total number of donations * `totalDonationAmount` — grand total across all donations Monetary amounts are returned as `MonetaryAmount` objects (value and currency). ### Asynchronous computation[](https://developers.squarespace.com/commerce-apis/analytics-overview#asynchronous-computation) Transaction summary data is computed **asynchronously**. There may be a delay between when an order or donation is submitted and when it is reflected in the summary. Integrations with the endpoint should be built in a way that tolerates this eventual consistency. How it works[](https://developers.squarespace.com/commerce-apis/analytics-overview#how-it-works) ------------------------------------------------------------------------------------------------- The Analytics API exposes a single endpoint that accepts a list of contact IDs and returns a transaction summary for each: 1. Retrieve contact IDs — either by listing contacts via the [Contacts API](https://developers.squarespace.com/commerce-apis/contacts-overview) , or by extracting `customerId` from orders. 2. Post up to **1,000 contact IDs** to the transaction summaries endpoint, specifying `groupBy: "contactId"`. 3. Receive a `TransactionsSummaryWrapper` for each contact, containing the `contactId` and its `TransactionsSummary`. Contacts with no commerce activity will return a summary with zero counts and `null` date fields. Cross-API relationships[](https://developers.squarespace.com/commerce-apis/analytics-overview#cross-api-relationships) ----------------------------------------------------------------------------------------------------------------------- | API | Field | Relationship | | --- | --- | --- | | **Contacts** | `id` | Pass contact `id` values as `contactIds` in the request. | | **Profiles** | `id` | A profile's `id` is the same identifier. The Profiles API includes a `TransactionsSummary` inline; the Analytics API provides the same data via a dedicated bulk endpoint. | | **Orders** | `customerId` | The `customerId` on an Order corresponds to a contact `id`. Use it to look up transaction summaries after processing orders. | Common workflows[](https://developers.squarespace.com/commerce-apis/analytics-overview#common-workflows) --------------------------------------------------------------------------------------------------------- **CRM segmentation by spend** Query contacts using the [Contacts API](https://developers.squarespace.com/commerce-apis/contacts-overview) to identify a cohort (e.g. contacts who accept marketing), then pass their IDs to the Analytics API to retrieve order totals and donation counts for segmentation. **Lifetime value reporting** Periodically fetch transaction summaries for all active contacts to build lifetime value (LTV) reports, using `totalOrderAmount` and `orderCount` as the core metrics. **Post-order enrichment** After receiving an order webhook, use the `customerId` to fetch an updated transaction summary, then sync the contact's commerce metrics back to an external CRM or analytics platform. Further reading[](https://developers.squarespace.com/commerce-apis/analytics-overview#further-reading) ------------------------------------------------------------------------------------------------------- * Learn about the [Contacts API](https://developers.squarespace.com/commerce-apis/contacts-overview) , which provides the contact records referenced by this API * Become familiar with [common commerce terms](https://developers.squarespace.com/commerce-apis/glossary) and how they're related to the API * [Obtain an API key or use OAuth](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) * Read the [FAQ](https://developers.squarespace.com/commerce-apis/faq) guide for answers to common questions [Analytics](https://developers.squarespace.com/commerce-apis/analytics) [Discounts](https://developers.squarespace.com/commerce-apis/discounts) --- # Developer Portal Menu Profiles API overview[](https://developers.squarespace.com/commerce-apis/profiles-overview#profiles-api-overview) ================================================================================================================== > **Maintenance mode** — The Profiles API is now in maintenance mode. The [Contacts API](https://developers.squarespace.com/commerce-apis/contacts-overview) > is its modern replacement, adding full CRUD operations, address book management, query filtering, and webhook support. Migration to the Contacts API is highly recommended, and new integrations should use the Contacts API. **Current version: 1.0** _For versioning details, read the [Versioning](https://developers.squarespace.com/commerce-apis/versioning) guide._ The Profiles API allows apps to retrieve Squarespace site users. A site user can be a customer, mailing list subscriber, or donor that are traditionally accessible through the [Profiles panel](https://support.squarespace.com/hc/en-us/articles/360046485652) . Site visitors become site users when they perform one of the following actions: * Registers an account with the site * Performs an e-commerce guest checkout or donation on the site * Subscribes to a newsletter or campaigns mailing list API resources[](https://developers.squarespace.com/commerce-apis/profiles-overview#api-resources) -------------------------------------------------------------------------------------------------- The Profiles API allows for the retrieval of `Profile` resource objects. Every `Profile` contains information about a site user and has the following characteristics: * A unique email address * An approximate address for the user based on existing data (always generated internally, not created by the API) * A summary of the user's commerce transactions, such as orders or donations (generated asynchronously from the site) Further reading[](https://developers.squarespace.com/commerce-apis/profiles-overview#further-reading) ------------------------------------------------------------------------------------------------------ * Become familiar with [common commerce terms](https://developers.squarespace.com/commerce-apis/glossary) and how they're related to the API * [Obtain an API key or use OAuth](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) * Read the [FAQ](https://developers.squarespace.com/commerce-apis/faq) guide for answers to common questions [Profiles](https://developers.squarespace.com/commerce-apis/profiles) [WebhookSubscriptions](https://developers.squarespace.com/commerce-apis/webhooksubscriptions) --- # Developer Portal Menu Versioning[](https://developers.squarespace.com/commerce-apis/versioning#versioning) ===================================================================================== Each Commerce API resource has an independent version number, where the current version number is listed in the resource's overview page. Versions are specified in request URIs per the following format: **Format** Code `https://api.squarespace.com/{api-version}/{resource-path}` **Examples** Code `https://api.squarespace.com/v1/contacts https://api.squarespace.com/v2/commerce/products https://api.squarespace.com/1.0/commerce/orders` Versioning methodology and breaking changes[](https://developers.squarespace.com/commerce-apis/versioning#versioning-methodology-and-breaking-changes) ------------------------------------------------------------------------------------------------------------------------------------------------------- Our versioning methodology has evolved over time to provide more stability and less overhead for developers. ### Pre-2025 (1.0 and 1.1)[](https://developers.squarespace.com/commerce-apis/versioning#pre-2025-10-and-11) Squarespace endpoints released before 2025 used a Semantic Versioning format (`Major.Minor`), where minor updates sometimes introduced breaking changes. ### 2025 onwards[](https://developers.squarespace.com/commerce-apis/versioning#2025-onwards) Starting in 2025, Squarespace uses a non-SemVer approach, using integers: v1, v2, v3, etc. Non-breaking changes are added to the existing version without incrementing the version string. A version increment is only triggered by a breaking change that requires developers to update their code. The following types of changes will not result in a version increment. Any code that interacts with the Squarespace APIs must be able to handle the following types of changes: * **Additive response contents:** New fields or objects in a JSON response. * **Relaxed constraints:** Making a required field optional, or loosening of validation rules (e.g. a string with a maximum length of 50 is expanded to 100). * **New HTTP methods:** Allowing new HTTP methods for endpoints that previously did not support them. * **New query parameters:** Adding optional query parameters to existing endpoints (e.g. new filter or sort options). * **Bug fixes:** Bug fixes that do not result in breaking changes. All changes are, nonetheless, registered in our [changelog](https://developers.squarespace.com/commerce-apis/changelog) , even if they do not require a version bump. ### Current versioning per resource path[](https://developers.squarespace.com/commerce-apis/versioning#current-versioning-per-resource-path) | Resource path | Latest version | Legacy versions | | --- | --- | --- | | `/products` | `v2` | `1.1`, `1.0` | | `/contacts` | `v1` | `N/A` | | `/discounts` | `v1` | `N/A` | | `/inventory` | `1.0` | `N/A` | | `/orders` | `1.0` | `N/A` | | `/profiles` | `1.0` | `N/A` | | `/transactions` | `1.0` | `N/A` | | `/webhook_subscriptions` | `1.0` | `N/A` | Legacy API versions[](https://developers.squarespace.com/commerce-apis/versioning#legacy-api-versions) ------------------------------------------------------------------------------------------------------- Squarespace supports legacy API versions for an extended period. We provide significant advance notice before deprecating any version. Supported legacy versions will be documented per API, including the information you need to upgrade your applications. [Responses & error handling](https://developers.squarespace.com/commerce-apis/responses-error-handling) [Changelog](https://developers.squarespace.com/commerce-apis/changelog) --- # Developer Portal Menu Glossary[](https://developers.squarespace.com/commerce-apis/glossary#glossary) =============================================================================== When developing with Commerce APIs, it's helpful to know Squarespace Commerce terms and how they're used by merchants and the APIs. Inventory[](https://developers.squarespace.com/commerce-apis/glossary#inventory) --------------------------------------------------------------------------------- 1. **A collection of products configured for a Squarespace merchant site.** A Squarespace merchant may use "inventory" in the following ways: * To refer to the **Commerce** > **Inventory** page in the Squarespace UI. This page lists every product that's been configured for a merchant site. * To refer to the quantity of an item, for example, "The inventory for this product is running low." 2. **With respect to the Inventory API, an "inventory item" is any variant of a configured product that supports stock tracking, which is a feature of physical and service products.** Payment Plan[](https://developers.squarespace.com/commerce-apis/glossary#payment-plan) --------------------------------------------------------------------------------------- **A purchase split into an upfront deposit followed by a series of installments collected automatically over time.** Payment Plans are available on eligible products and are surfaced through the standard `Order` resource (with `paymentState` reflecting how much of the plan has been collected) and the Transactions `Document` (with one `TransactionPayment` entry per collected payment). See the [Orders API overview](https://developers.squarespace.com/commerce-apis/orders-overview#payment-plans) for integration guidance, or the [Add payment plans to service products](https://support.squarespace.com/hc/articles/45799419568653/) Help Center article for the current eligibility rules and seller-facing setup. Product[](https://developers.squarespace.com/commerce-apis/glossary#product) ----------------------------------------------------------------------------- **A sellable item on a Squarespace merchant site, which may be sold as variations (or "variants"). Multiple product types are supported for a Squarespace store including physical goods, services, gift cards, downloads, and subscriptions.** Product variant[](https://developers.squarespace.com/commerce-apis/glossary#product-variant) --------------------------------------------------------------------------------------------- **A variant of a product sold on a Squarespace merchant site.** For example, a bakery may sell **Pies** and **Cookies**, where "Key Lime" and "Pecan" are variants of **Pies** and "Chocolate Chip" and "Oatmeal Raisin" are variants of **Cookies**. Stock keeping unit (SKU)[](https://developers.squarespace.com/commerce-apis/glossary#stock-keeping-unit-sku) ------------------------------------------------------------------------------------------------------------- **A user-defined code assigned for the purpose of identifying a product variant.** SKUs help merchants keep track of product quantities and identify the variant of a product customers purchase. Squarespace merchants are not required to keep unique SKUs across all of their products, however, SKUs for variants of the same product must be unique. [Price Limits](https://developers.squarespace.com/commerce-apis/price-limits) [FAQ](https://developers.squarespace.com/commerce-apis/faq) --- # Developer Portal Menu Frequently asked questions[](https://developers.squarespace.com/commerce-apis/faq#frequently-asked-questions) ============================================================================================================== A collection of common questions and answers as you develop with Commerce APIs. General[](https://developers.squarespace.com/commerce-apis/faq#general) ------------------------------------------------------------------------ ### Can I promote my application?[](https://developers.squarespace.com/commerce-apis/faq#can-i-promote-my-application) Companies who have built applications, extensions, integrations, or other products or services to our APIs (each a "Developer Product") cannot release external press releases about their Developer Product without Squarespace's explicit permission or suggest or imply partnership, sponsorship, or endorsement by Squarespace. Any marketing is limited to conveying information related to your Developer Product's functionality, and must clearly convey that the Developer Product and/or any tools built using Squarespace APIs are not endorsed by Squarespace. Squarespace may terminate or suspend the Developer Tools or the Developer Agreement, or disable access to the Developer Tools or your Developer Account, at any time at our sole discretion, for any reason, with or without notice, without any liability to you. See more in our [brand guidelines](https://www.squarespace.com/brand-guidelines) and our [developer terms](https://www.squarespace.com/developer-terms) . ### What's a dynamic cursor?[](https://developers.squarespace.com/commerce-apis/faq#whats-a-dynamic-cursor) A dynamic cursor points to a specific _location_ in a collection of data, but is not backed by a snapshot of that data. Thus, if the collection changes (e.g. a product is added or deleted) the response may change, too. ### Do Commerce APIs support the cross-origin resource sharing standard (CORS)?[](https://developers.squarespace.com/commerce-apis/faq#do-commerce-apis-support-the-cross-origin-resource-sharing-standard-cors) CORS is only useful if you're using a browser to access Commerce APIs, which is not recommended. A browser would require knowledge of the authorization header bearer token and users would have direct access to that token in the browser, which presents a severe security risk. Instead, if your application has an HTML frontend, call a server that's responsible for retrieving the bearer token from a secure location and makes all requests to Commerce APIs. This ensures users of your client-side application will not able to access your API credentials through the browser and make potentially unwanted API calls. ### How can the Commerce APIs I'm using change as I'm developing my custom app or Extension?[](https://developers.squarespace.com/commerce-apis/faq#how-can-the-commerce-apis-im-using-change-as-im-developing-my-custom-app-or-extension) New fields are added to Commerce API responses occasionally to expose new data. Develop your application such that new fields shouldn't cause a disruption, for example, when de-serializing a response body. Furthermore, changes to existing fields are introduced in new API versions. Consult the [Versioning](https://developers.squarespace.com/commerce-apis/versioning) guide for more information regarding these breaking changes. Authentication[](https://developers.squarespace.com/commerce-apis/faq#authentication) -------------------------------------------------------------------------------------- ### Can I change the API access permissions for my API key or OAuth token?[](https://developers.squarespace.com/commerce-apis/faq#can-i-change-the-api-access-permissions-for-my-api-key-or-oauth-token) To keep data for a Squarespace merchant site private and secure, permissions for an API key or OAuth token cannot be modified. If an app uses API keys and needs a different set of permissions, follow the procedures in the [Authentication and Permissions](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) guide for a new API key. Squarespace Extensions, which use Oauth, will need to their users to re-initiate their OAuth connection by following the established initiate link for that application. If the user grants access to the application, the new OAuth credentials should replace any existing credentials as they will possess the permissions you requested. [Glossary](https://developers.squarespace.com/commerce-apis/glossary) [Contacts](https://developers.squarespace.com/commerce-apis/contacts) --- # Developer Portal Menu Commerce API [Commerce API](https://developers.squarespace.com/commerce-apis) Products ======== [Download schema](https://developers.squarespace.com/commerce-apis/latest/schema-processor-version-version-latest.json) * * * List products[](https://developers.squarespace.com/commerce-apis/products#list-products) ----------------------------------------------------------------------------------------- GET https://api.squarespace.com /v2/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[](https://developers.squarespace.com/commerce-apis/products#list-products/query-parameters) `modifiedAfter` ​string `modifiedBefore` ​string `cursor` ​string `query` ​string `type` ​string\[\] ### List products › Headers[](https://developers.squarespace.com/commerce-apis/products#list-products/header-parameters) `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[](https://developers.squarespace.com/commerce-apis/products#list-products/responses) 200400 A paginated list of products. [PaginatedProductListResponseV2](https://developers.squarespace.com/commerce-apis/~schemas#paginatedproductlistresponsev2) `pagination` ​object `products` ​array * * * Create product[](https://developers.squarespace.com/commerce-apis/products#create-product) ------------------------------------------------------------------------------------------- POST https://api.squarespace.com /v2/commerce/products Creates a product with appropriate subresources based on product type. ### Create product › Headers[](https://developers.squarespace.com/commerce-apis/products#create-product/header-parameters) `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[](https://developers.squarespace.com/commerce-apis/products#create-product/request-body) oneOf Exactly one variant **must match**. #### Decision Table | Variant | Matching Criteria | | --- | --- | | CreateGiftCardProductRequest | type = object | | CreatePhysicalProductRequest | type = object | | CreateServiceProductRequest | type = object | **Properties for CreateGiftCardProductRequest:** [CreateGiftCardProductRequest](https://developers.squarespace.com/commerce-apis/~schemas#creategiftcardproductrequest) `description` ​string `isVisible` ​boolean `name` ​string `storePageId` ​string `tags` ​string\[\] `type` ​string `urlSlug` ​string `variants` ​[CreateGiftCardProductVariantRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#creategiftcardproductvariantrequest) ### Create product › Responses[](https://developers.squarespace.com/commerce-apis/products#create-product/responses) 201400405409429 The product was created successfully. [ProductV2](https://developers.squarespace.com/commerce-apis/~schemas#productv2) `createdOn` ​string · date-time · required `id` ​string · required `modifiedOn` ​string · date-time · required `storePageId` ​string · required `type` ​[ProductTypeV2](https://developers.squarespace.com/commerce-apis/~schemas#producttypev2)  · enum · required Enum values: PHYSICAL SERVICE GIFT\_CARD DIGITAL `description` ​string `images` ​[ProductImage\[\]](https://developers.squarespace.com/commerce-apis/~schemas#productimage) `isVisible` ​boolean `name` ​string `seoOptions` ​[SeoOptions](https://developers.squarespace.com/commerce-apis/~schemas#seooptions) Options for search engine optimization. `tags` ​string\[\] `url` ​string `urlSlug` ​string * * * Get products[](https://developers.squarespace.com/commerce-apis/products#get-products) --------------------------------------------------------------------------------------- GET https://api.squarespace.com /v2/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[](https://developers.squarespace.com/commerce-apis/products#get-products/path-parameters) `productIdCsvs` ​string · required ### Get products › Headers[](https://developers.squarespace.com/commerce-apis/products#get-products/header-parameters) `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[](https://developers.squarespace.com/commerce-apis/products#get-products/responses) 200400404 The requested products. [ProductListResponseV2](https://developers.squarespace.com/commerce-apis/~schemas#productlistresponsev2) `products` ​array * * * Update product[](https://developers.squarespace.com/commerce-apis/products#update-product) ------------------------------------------------------------------------------------------- POST https://api.squarespace.com /v2/commerce/products/{productId} Updates information for a product. The endpoint supports partial updates. ### Update product › path Parameters[](https://developers.squarespace.com/commerce-apis/products#update-product/path-parameters) `productId` ​string · required ### Update product › Headers[](https://developers.squarespace.com/commerce-apis/products#update-product/header-parameters) `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[](https://developers.squarespace.com/commerce-apis/products#update-product/request-body) [UpdateProductRequest](https://developers.squarespace.com/commerce-apis/~schemas#updateproductrequest) `description` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. `isVisible` ​[ChangeBoolean](https://developers.squarespace.com/commerce-apis/~schemas#changeboolean) `name` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. `pricing` ​[ChangeUpdateProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#changeupdateproductpricing) Pricing data for the product. `productAttributeNames` ​[ChangeListString](https://developers.squarespace.com/commerce-apis/~schemas#changeliststring) Optional; list of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. `seoData` ​[ChangeSeoOptions](https://developers.squarespace.com/commerce-apis/~schemas#changeseooptions) Options for search engine optimization. `tags` ​[ChangeListString](https://developers.squarespace.com/commerce-apis/~schemas#changeliststring) Optional; list of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. `urlSlug` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. ### Update product › Responses[](https://developers.squarespace.com/commerce-apis/products#update-product/responses) 200400404405409 Return the updated Product [ProductV2](https://developers.squarespace.com/commerce-apis/~schemas#productv2) `createdOn` ​string · date-time · required `id` ​string · required `modifiedOn` ​string · date-time · required `storePageId` ​string · required `type` ​[ProductTypeV2](https://developers.squarespace.com/commerce-apis/~schemas#producttypev2)  · enum · required Enum values: PHYSICAL SERVICE GIFT\_CARD DIGITAL `description` ​string `images` ​[ProductImage\[\]](https://developers.squarespace.com/commerce-apis/~schemas#productimage) `isVisible` ​boolean `name` ​string `seoOptions` ​[SeoOptions](https://developers.squarespace.com/commerce-apis/~schemas#seooptions) Options for search engine optimization. `tags` ​string\[\] `url` ​string `urlSlug` ​string * * * Delete specified product[](https://developers.squarespace.com/commerce-apis/products#delete-specified-product) --------------------------------------------------------------------------------------------------------------- DELETE https://api.squarespace.com /v2/commerce/products/{productId} Delete specified product ### Delete specified product › path Parameters[](https://developers.squarespace.com/commerce-apis/products#delete-specified-product/path-parameters) `productId` ​string · required ### Delete specified product › Headers[](https://developers.squarespace.com/commerce-apis/products#delete-specified-product/header-parameters) `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 specified product › Responses[](https://developers.squarespace.com/commerce-apis/products#delete-specified-product/responses) 204404405 The Product was deleted successfully. No data returned * * * Upload product image[](https://developers.squarespace.com/commerce-apis/products#upload-product-image) ------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /v2/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[](https://developers.squarespace.com/commerce-apis/products#upload-product-image/path-parameters) `productId` ​string · required ### Upload product image › Headers[](https://developers.squarespace.com/commerce-apis/products#upload-product-image/header-parameters) `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[](https://developers.squarespace.com/commerce-apis/products#upload-product-image/responses) 202400404409 The request was accepted and the uploaded image is being processed. [UploadProductImageResponse](https://developers.squarespace.com/commerce-apis/~schemas#uploadproductimageresponse) `imageId` ​string Unique ProductImage id. * * * Update product image[](https://developers.squarespace.com/commerce-apis/products#update-product-image) ------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /v2/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[](https://developers.squarespace.com/commerce-apis/products#update-product-image/path-parameters) `productId` ​string · required `imageId` ​string · required ### Update product image › Headers[](https://developers.squarespace.com/commerce-apis/products#update-product-image/header-parameters) `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[](https://developers.squarespace.com/commerce-apis/products#update-product-image/request-body) [UpdateProductImageRequest](https://developers.squarespace.com/commerce-apis/~schemas#updateproductimagerequest) `altText` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. ### Update product image › Responses[](https://developers.squarespace.com/commerce-apis/products#update-product-image/responses) 200400404 Return the updated ProductImage [ProductImage](https://developers.squarespace.com/commerce-apis/~schemas#productimage) `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 one product image[](https://developers.squarespace.com/commerce-apis/products#delete-one-product-image) --------------------------------------------------------------------------------------------------------------- DELETE https://api.squarespace.com /v2/commerce/products/{productId}/images/{imageId} Delete one product image ### Delete one product image › path Parameters[](https://developers.squarespace.com/commerce-apis/products#delete-one-product-image/path-parameters) `productId` ​string · required `imageId` ​string · required ### Delete one product image › Headers[](https://developers.squarespace.com/commerce-apis/products#delete-one-product-image/header-parameters) `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 one product image › Responses[](https://developers.squarespace.com/commerce-apis/products#delete-one-product-image/responses) 204404 The ProductImage was deleted successfully. No data returned * * * Update product image order[](https://developers.squarespace.com/commerce-apis/products#update-product-image-order) ------------------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /v2/commerce/products/{productId}/images/{imageId}/order Updates the ordering of a product image on the product details page. ### Update product image order › path Parameters[](https://developers.squarespace.com/commerce-apis/products#update-product-image-order/path-parameters) `productId` ​string · required `imageId` ​string · required ### Update product image order › Headers[](https://developers.squarespace.com/commerce-apis/products#update-product-image-order/header-parameters) `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[](https://developers.squarespace.com/commerce-apis/products#update-product-image-order/request-body) [UpdateProductImageOrderRequest](https://developers.squarespace.com/commerce-apis/~schemas#updateproductimageorderrequest) `afterImageId` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. ### Update product image order › Responses[](https://developers.squarespace.com/commerce-apis/products#update-product-image-order/responses) 204400404405 The request was successful. No data returned * * * Get image processing status[](https://developers.squarespace.com/commerce-apis/products#get-image-processing-status) --------------------------------------------------------------------------------------------------------------------- GET https://api.squarespace.com /v2/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[](https://developers.squarespace.com/commerce-apis/products#get-image-processing-status/path-parameters) `productId` ​string · required `imageId` ​string · required ### Get image processing status › Headers[](https://developers.squarespace.com/commerce-apis/products#get-image-processing-status/header-parameters) `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[](https://developers.squarespace.com/commerce-apis/products#get-image-processing-status/responses) 200404 Return the processing status for the ProductImage [ProductImageProcessingStatus](https://developers.squarespace.com/commerce-apis/~schemas#productimageprocessingstatus) `id` ​string `status` ​[ImageProcessingStatus](https://developers.squarespace.com/commerce-apis/~schemas#imageprocessingstatus)  · enum Enum values: QUEUED PROCESSING READY ERROR * * * Create product variant[](https://developers.squarespace.com/commerce-apis/products#create-product-variant) ----------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /v2/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[](https://developers.squarespace.com/commerce-apis/products#create-product-variant/path-parameters) `productId` ​string · required ### Create product variant › Headers[](https://developers.squarespace.com/commerce-apis/products#create-product-variant/header-parameters) `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[](https://developers.squarespace.com/commerce-apis/products#create-product-variant/request-body) [CreateVariantRequestV2](https://developers.squarespace.com/commerce-apis/~schemas#createvariantrequestv2) `pricing` ​[ProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#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. `attributes` ​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. `gtin` ​string Global Trade Item Number (GTIN). Optional. Must be 8, 12, 13, or 14 numeric digits. Whitespace, hyphens, and underscores are stripped before validation. Supported for PHYSICAL products only. Example: 01234567890128 `mpn` ​string Manufacturer Part Number (MPN). Optional. Must be alphanumeric and 70 characters or fewer. Whitespace, hyphens, and underscores are stripped before validation. Supported for PHYSICAL products only. Example: MPN-1234 `shippingMeasurements` ​[ProductMeasurements](https://developers.squarespace.com/commerce-apis/~schemas#productmeasurements) Measurements of the variant when it's shipped. Present for PHYSICAL products only. `stock` ​[ProductStock](https://developers.squarespace.com/commerce-apis/~schemas#productstock) Available stock for the variant. Present for PHYSICAL products only. ### Create product variant › Responses[](https://developers.squarespace.com/commerce-apis/products#create-product-variant/responses) 201400404405409 The ProductVariant was created successfully. [ProductVariantV2](https://developers.squarespace.com/commerce-apis/~schemas#productvariantv2) `id` ​string `image` ​[ProductImage](https://developers.squarespace.com/commerce-apis/~schemas#productimage) Product image assigned to the variant. `sku` ​string oneOf Exactly one variant **must match**. #### Decision Table | Variant | Matching Criteria | | --- | --- | | PhysicalProductVariant | type = object | | GiftCardProductVariant | type = object | | ServiceProductVariant | type = object | **Properties for PhysicalProductVariant:** [PhysicalProductVariant](https://developers.squarespace.com/commerce-apis/~schemas#physicalproductvariant) `attributes` ​object `gtin` ​string `id` ​string `image` ​[ProductImage](https://developers.squarespace.com/commerce-apis/~schemas#productimage) Product image assigned to the variant. `mpn` ​string `pricing` ​[FullProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#fullproductpricing) `shippingMeasurements` ​[ProductMeasurements](https://developers.squarespace.com/commerce-apis/~schemas#productmeasurements) Measurements of the variant when it's shipped. Present for PHYSICAL products only. `sku` ​string `stock` ​[ProductStock](https://developers.squarespace.com/commerce-apis/~schemas#productstock) Available stock for the variant. Present for PHYSICAL products only. * * * Update product variant[](https://developers.squarespace.com/commerce-apis/products#update-product-variant) ----------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /v2/commerce/products/{productId}/variants/{variantId} Updates a variant of a product. The endpoint supports partial updates. ### Update product variant › path Parameters[](https://developers.squarespace.com/commerce-apis/products#update-product-variant/path-parameters) `productId` ​string · required `variantId` ​string · required ### Update product variant › Headers[](https://developers.squarespace.com/commerce-apis/products#update-product-variant/header-parameters) `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[](https://developers.squarespace.com/commerce-apis/products#update-product-variant/request-body) [UpdateVariantRequestV2](https://developers.squarespace.com/commerce-apis/~schemas#updatevariantrequestv2) `attributes` ​[ChangeMapStringString](https://developers.squarespace.com/commerce-apis/~schemas#changemapstringstring) Specifies attribute-value pairs for the variant. Supported for PHYSICAL products only. `gtin` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. `mpn` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. `pricing` ​[ChangeUpdateProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#changeupdateproductpricing) Pricing data for the product. `shippingMeasurements` ​[ChangeUpdateProductMeasurements](https://developers.squarespace.com/commerce-apis/~schemas#changeupdateproductmeasurements) Measurements of the variant when it's shipped. Supported for PHYSICAL products only. `sku` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. ### Update product variant › Responses[](https://developers.squarespace.com/commerce-apis/products#update-product-variant/responses) 200400404405409429 Return the updated ProductVariant [ProductVariantV2](https://developers.squarespace.com/commerce-apis/~schemas#productvariantv2) `id` ​string `image` ​[ProductImage](https://developers.squarespace.com/commerce-apis/~schemas#productimage) Product image assigned to the variant. `sku` ​string oneOf Exactly one variant **must match**. #### Decision Table | Variant | Matching Criteria | | --- | --- | | PhysicalProductVariant | type = object | | GiftCardProductVariant | type = object | | ServiceProductVariant | type = object | **Properties for PhysicalProductVariant:** [PhysicalProductVariant](https://developers.squarespace.com/commerce-apis/~schemas#physicalproductvariant) `attributes` ​object `gtin` ​string `id` ​string `image` ​[ProductImage](https://developers.squarespace.com/commerce-apis/~schemas#productimage) Product image assigned to the variant. `mpn` ​string `pricing` ​[FullProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#fullproductpricing) `shippingMeasurements` ​[ProductMeasurements](https://developers.squarespace.com/commerce-apis/~schemas#productmeasurements) Measurements of the variant when it's shipped. Present for PHYSICAL products only. `sku` ​string `stock` ​[ProductStock](https://developers.squarespace.com/commerce-apis/~schemas#productstock) Available stock for the variant. Present for PHYSICAL products only. * * * Delete one product variant[](https://developers.squarespace.com/commerce-apis/products#delete-one-product-variant) ------------------------------------------------------------------------------------------------------------------- DELETE https://api.squarespace.com /v2/commerce/products/{productId}/variants/{variantId} Delete one product variant ### Delete one product variant › path Parameters[](https://developers.squarespace.com/commerce-apis/products#delete-one-product-variant/path-parameters) `productId` ​string · required `variantId` ​string · required ### Delete one product variant › Headers[](https://developers.squarespace.com/commerce-apis/products#delete-one-product-variant/header-parameters) `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 one product variant › Responses[](https://developers.squarespace.com/commerce-apis/products#delete-one-product-variant/responses) 204404405409429 The ProductVariant was deleted successfully. No data returned * * * Associate variant image[](https://developers.squarespace.com/commerce-apis/products#associate-variant-image) ------------------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /v2/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[](https://developers.squarespace.com/commerce-apis/products#associate-variant-image/path-parameters) `productId` ​string · required `variantId` ​string · required ### Associate variant image › Headers[](https://developers.squarespace.com/commerce-apis/products#associate-variant-image/header-parameters) `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[](https://developers.squarespace.com/commerce-apis/products#associate-variant-image/request-body) [AssociateProductImageToVariantRequest](https://developers.squarespace.com/commerce-apis/~schemas#associateproductimagetovariantrequest) `imageId` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring)  · required Optional; HTTPS URL to receive webhook notifications. ### Associate variant image › Responses[](https://developers.squarespace.com/commerce-apis/products#associate-variant-image/responses) 204400404405429 The request was successful. No data returned * * * [Discounts](https://developers.squarespace.com/commerce-apis/discounts) [Websites](https://developers.squarespace.com/commerce-apis/websites) --- # Developer Portal Menu Commerce API [Commerce API](https://developers.squarespace.com/commerce-apis) Schemas ======= [Download schema](https://developers.squarespace.com/commerce-apis/latest/schema-processor-version-version-latest.json) * * * AcceptsMarketing[](https://developers.squarespace.com/commerce-apis/~schemas#acceptsmarketing) ----------------------------------------------------------------------------------------------- `acceptsMarketing` ​boolean Whether the contact accepts marketing email. `joinedOn` ​string · date-time The date and time the contact was added to the marketing list.The value returned in the creation response is a near-real-time estimate; the Get Contact endpoint should be used to verify the exact persisted timestamp. `leftOn` ​string · date-time The date and time the contact left Marketing list AcceptsMarketingWithDate[](https://developers.squarespace.com/commerce-apis/~schemas#acceptsmarketingwithdate) --------------------------------------------------------------------------------------------------------------- `acceptsMarketing` ​boolean If contact's email accepts marketing `joinedOn` ​[DateFilter](https://developers.squarespace.com/commerce-apis/~schemas#datefilter) Object for filtering by before and after dates Address[](https://developers.squarespace.com/commerce-apis/~schemas#address) ----------------------------------------------------------------------------- `address1` ​string Primary street address Example: 459 Broadway `address2` ​string Secondary address line `city` ​string City Example: New York `countryCode` ​string ISO 3166-1 alpha-2 country code Example: US `firstName` ​string First name Example: Bob `lastName` ​string Last name Example: Loblaw `phone` ​string Phone number Example: 5553334444 `postalCode` ​string Postal or ZIP code Example: 10003 `state` ​string State or province Example: NY AddressBook[](https://developers.squarespace.com/commerce-apis/~schemas#addressbook) ------------------------------------------------------------------------------------- `addressBookEntries` ​[AddressBookEntry\[\]](https://developers.squarespace.com/commerce-apis/~schemas#addressbookentry) List of Address Book Entries `defaultShippingAddressId` ​string The id of the address book entry that is the default shipping address. AddressBookEntry[](https://developers.squarespace.com/commerce-apis/~schemas#addressbookentry) ----------------------------------------------------------------------------------------------- `address` ​[ContactAddress](https://developers.squarespace.com/commerce-apis/~schemas#contactaddress) Address properties for a contact. `defaultShipping` ​boolean Whether this entry is the current default shipping address. When the contact has any address book entries, exactly one entry has this value set to true. `id` ​string · readOnly The address book entry's ID. Example: 5f8d0d55b54764421b7156aa AddressCreateData[](https://developers.squarespace.com/commerce-apis/~schemas#addresscreatedata) ------------------------------------------------------------------------------------------------- `addressBookEntries` ​[AddressBookEntry\[\]](https://developers.squarespace.com/commerce-apis/~schemas#addressbookentry)  · required The address book entries that were created. `contactId` ​string · required The contact's ID. Example: 64a7e3d2c8f1b95e30a14d2b `createdOn` ​string · date-time Creation date and time in UTC (ISO 8601 format) of the address book entries. Example: 2024-01-28T10:44:00Z AddressCreatePayload[](https://developers.squarespace.com/commerce-apis/~schemas#addresscreatepayload) ------------------------------------------------------------------------------------------------------- `createdOn` ​string · date-time · required Creation date and time in UTC (ISO 8601 format) of this message. Example: 2024-01-28T10:44:00Z `id` ​string · required Unique notification id. Example: 5c2ba184b63ed3cb411ce2b1 `subscriptionsId` ​string · required Unique Webhook Subscriptions id. Example: 5f3c2155d947844beedda991 `topic` ​string · enum · required Description of the event that triggered the notification. * `order.create` - always value for OrderCreatePayload.topic ref * `order.update` - always value for OrderUpdatePayload.topic * `extension.uninstall` - always value for ExtensionUninstallPayload.topic * `contact.create` - always value for ContactCreatePayload.topic * `contact.update` - always value for ContactUpdatePayload.topic * `contact.delete` - always value for ContactDeletePayload.topic * `address.create` - always value for AddressCreatePayload.topic * `address.update` - always value for AddressUpdatePayload.topic * `address.delete` - always value for AddressDeletePayload.topic Enum values: address.create Example: address.create Default: address.create `websiteId` ​string · required Squarespace website id that triggered the notification. Example: 5f3c3d55ac435e1a051f77b3 `data` ​[AddressCreateData](https://developers.squarespace.com/commerce-apis/~schemas#addresscreatedata) The address data for the created address book entries. AddressDeleteData[](https://developers.squarespace.com/commerce-apis/~schemas#addressdeletedata) ------------------------------------------------------------------------------------------------- `addressBookEntryIds` ​string\[\] · required The IDs of the deleted address book entries. `contactId` ​string · required The contact's ID. Example: 64a7e3d2c8f1b95e30a14d2b `deletedOn` ​string · date-time Deletion date and time in UTC (ISO 8601 format) of the address book entries. Example: 2024-01-28T10:44:00Z AddressDeletePayload[](https://developers.squarespace.com/commerce-apis/~schemas#addressdeletepayload) ------------------------------------------------------------------------------------------------------- `createdOn` ​string · date-time · required Creation date and time in UTC (ISO 8601 format) of this message. Example: 2024-01-28T10:44:00Z `id` ​string · required Unique notification id. Example: 5c2ba184b63ed3cb411ce2b1 `subscriptionsId` ​string · required Unique Webhook Subscriptions id. Example: 5f3c2155d947844beedda991 `topic` ​string · enum · required Description of the event that triggered the notification. * `order.create` - always value for OrderCreatePayload.topic ref * `order.update` - always value for OrderUpdatePayload.topic * `extension.uninstall` - always value for ExtensionUninstallPayload.topic * `contact.create` - always value for ContactCreatePayload.topic * `contact.update` - always value for ContactUpdatePayload.topic * `contact.delete` - always value for ContactDeletePayload.topic * `address.create` - always value for AddressCreatePayload.topic * `address.update` - always value for AddressUpdatePayload.topic * `address.delete` - always value for AddressDeletePayload.topic Enum values: address.delete Example: address.delete Default: address.delete `websiteId` ​string · required Squarespace website id that triggered the notification. Example: 5f3c3d55ac435e1a051f77b3 `data` ​[AddressDeleteData](https://developers.squarespace.com/commerce-apis/~schemas#addressdeletedata) Identifiers and metadata for the deleted address book entries. AddressRequest[](https://developers.squarespace.com/commerce-apis/~schemas#addressrequest) ------------------------------------------------------------------------------------------- `address1` ​string `address2` ​string `city` ​string `countryCode` ​string `firstName` ​string `lastName` ​string `phone` ​string `postalCode` ​string `state` ​string AddressUpdateData[](https://developers.squarespace.com/commerce-apis/~schemas#addressupdatedata) ------------------------------------------------------------------------------------------------- `addressBookEntries` ​[AddressBookEntry\[\]](https://developers.squarespace.com/commerce-apis/~schemas#addressbookentry)  · required The address book entries after the update. `contactId` ​string · required The contact's ID. Example: 64a7e3d2c8f1b95e30a14d2b `createdOn` ​string · date-time Creation date and time in UTC (ISO 8601 format) of the address book entries. Example: 2024-01-28T10:44:00Z `updatedOn` ​string · date-time Last update date and time in UTC (ISO 8601 format) of the address book entries. Example: 2024-02-15T14:30:00Z AddressUpdatePayload[](https://developers.squarespace.com/commerce-apis/~schemas#addressupdatepayload) ------------------------------------------------------------------------------------------------------- `createdOn` ​string · date-time · required Creation date and time in UTC (ISO 8601 format) of this message. Example: 2024-01-28T10:44:00Z `id` ​string · required Unique notification id. Example: 5c2ba184b63ed3cb411ce2b1 `subscriptionsId` ​string · required Unique Webhook Subscriptions id. Example: 5f3c2155d947844beedda991 `topic` ​string · enum · required Description of the event that triggered the notification. * `order.create` - always value for OrderCreatePayload.topic ref * `order.update` - always value for OrderUpdatePayload.topic * `extension.uninstall` - always value for ExtensionUninstallPayload.topic * `contact.create` - always value for ContactCreatePayload.topic * `contact.update` - always value for ContactUpdatePayload.topic * `contact.delete` - always value for ContactDeletePayload.topic * `address.create` - always value for AddressCreatePayload.topic * `address.update` - always value for AddressUpdatePayload.topic * `address.delete` - always value for AddressDeletePayload.topic Enum values: address.update Example: address.update Default: address.update `websiteId` ​string · required Squarespace website id that triggered the notification. Example: 5f3c3d55ac435e1a051f77b3 `data` ​[AddressUpdateData](https://developers.squarespace.com/commerce-apis/~schemas#addressupdatedata) The address data after the update. AnyOrderCriteria[](https://developers.squarespace.com/commerce-apis/~schemas#anyordercriteria) ----------------------------------------------------------------------------------------------- `type` ​string · required AssociateProductImageToVariantRequest[](https://developers.squarespace.com/commerce-apis/~schemas#associateproductimagetovariantrequest) ----------------------------------------------------------------------------------------------------------------------------------------- `imageId` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring)  · required Optional; HTTPS URL to receive webhook notifications. AutoTrigger[](https://developers.squarespace.com/commerce-apis/~schemas#autotrigger) ------------------------------------------------------------------------------------- `type` ​string · required CartTotalCriteria[](https://developers.squarespace.com/commerce-apis/~schemas#carttotalcriteria) ------------------------------------------------------------------------------------------------- `type` ​string · required `minimumCartTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount)  · required A monetary amount with currency code and decimal value ChangeBoolean[](https://developers.squarespace.com/commerce-apis/~schemas#changeboolean) ----------------------------------------------------------------------------------------- `present` ​boolean `value` ​boolean ChangeListString[](https://developers.squarespace.com/commerce-apis/~schemas#changeliststring) ----------------------------------------------------------------------------------------------- `present` ​boolean `value` ​string\[\] ChangeMapStringString[](https://developers.squarespace.com/commerce-apis/~schemas#changemapstringstring) --------------------------------------------------------------------------------------------------------- `present` ​boolean `value` ​object ChangeMonetaryAmount[](https://developers.squarespace.com/commerce-apis/~schemas#changemonetaryamount) ------------------------------------------------------------------------------------------------------- `present` ​boolean `value` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value ChangeProductDimensions[](https://developers.squarespace.com/commerce-apis/~schemas#changeproductdimensions) ------------------------------------------------------------------------------------------------------------- `present` ​boolean `value` ​[ProductDimensions](https://developers.squarespace.com/commerce-apis/~schemas#productdimensions) Physical dimensions of the variant. ChangeProductWeight[](https://developers.squarespace.com/commerce-apis/~schemas#changeproductweight) ----------------------------------------------------------------------------------------------------- `present` ​boolean `value` ​[ProductWeight](https://developers.squarespace.com/commerce-apis/~schemas#productweight) Weight of the variant. ChangeSeoOptions[](https://developers.squarespace.com/commerce-apis/~schemas#changeseooptions) ----------------------------------------------------------------------------------------------- `present` ​boolean `value` ​[SeoOptions](https://developers.squarespace.com/commerce-apis/~schemas#seooptions) Options for search engine optimization. ChangeString[](https://developers.squarespace.com/commerce-apis/~schemas#changestring) --------------------------------------------------------------------------------------- `present` ​boolean `value` ​string ChangeUpdateProductMeasurements[](https://developers.squarespace.com/commerce-apis/~schemas#changeupdateproductmeasurements) ----------------------------------------------------------------------------------------------------------------------------- `present` ​boolean `value` ​[UpdateProductMeasurements](https://developers.squarespace.com/commerce-apis/~schemas#updateproductmeasurements) ChangeUpdateProductPricing[](https://developers.squarespace.com/commerce-apis/~schemas#changeupdateproductpricing) ------------------------------------------------------------------------------------------------------------------- `present` ​boolean `value` ​[UpdateProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#updateproductpricing) Contact[](https://developers.squarespace.com/commerce-apis/~schemas#contact) ----------------------------------------------------------------------------- `createdOn` ​string · date-time · readOnly The date and time when the contact was created. `defaultShippingAddress` ​[AddressBookEntry](https://developers.squarespace.com/commerce-apis/~schemas#addressbookentry) An address book entry for a contact. `firstName` ​string The contact's first name. `id` ​string · readOnly The contact's ID. Example: 64a7e3d2c8f1b95e30a14d2b `lastName` ​string The contact's last name. `locale` ​string The contact's locale. Example: en-US `primaryEmail` ​[Email](https://developers.squarespace.com/commerce-apis/~schemas#email) The contact's primary email. ContactAddress[](https://developers.squarespace.com/commerce-apis/~schemas#contactaddress) ------------------------------------------------------------------------------------------- `countryCode` ​string · enum · required ISO 3166 alpha-2 country code string. Enum values: AF AX AL DZ AS AD AO AI show 243 more Example: US `city` ​string Address' city Example: Springfield `firstName` ​string Contact's first name Example: John `lastName` ​string Contact's last name Example: Doe `line1` ​string First line of address Example: 100 Main St `line2` ​string Second line of address Example: Apt 1A `phoneNumber` ​string Contact's phone number Example: 215-555-4321 `postalCode` ​string zip/postal code Example: 10900 `region` ​string General region (State, Province, County, etc...) Example: IL ContactCreatePayload[](https://developers.squarespace.com/commerce-apis/~schemas#contactcreatepayload) ------------------------------------------------------------------------------------------------------- `createdOn` ​string · date-time · required Creation date and time in UTC (ISO 8601 format) of this message. Example: 2024-01-28T10:44:00Z `id` ​string · required Unique notification id. Example: 5c2ba184b63ed3cb411ce2b1 `subscriptionsId` ​string · required Unique Webhook Subscriptions id. Example: 5f3c2155d947844beedda991 `topic` ​string · enum · required Description of the event that triggered the notification. * `order.create` - always value for OrderCreatePayload.topic ref * `order.update` - always value for OrderUpdatePayload.topic * `extension.uninstall` - always value for ExtensionUninstallPayload.topic * `contact.create` - always value for ContactCreatePayload.topic * `contact.update` - always value for ContactUpdatePayload.topic * `contact.delete` - always value for ContactDeletePayload.topic * `address.create` - always value for AddressCreatePayload.topic * `address.update` - always value for AddressUpdatePayload.topic * `address.delete` - always value for AddressDeletePayload.topic Enum values: contact.create Example: contact.create Default: contact.create `websiteId` ​string · required Squarespace website id that triggered the notification. Example: 5f3c3d55ac435e1a051f77b3 `data` ​[Contact](https://developers.squarespace.com/commerce-apis/~schemas#contact) A contact. ContactDeleteData[](https://developers.squarespace.com/commerce-apis/~schemas#contactdeletedata) ------------------------------------------------------------------------------------------------- `deletedOn` ​string · date-time · required Deletion date and time in UTC (ISO 8601 format) of the contact. Example: 2024-01-28T10:44:00Z `id` ​string · required The contact's ID. Example: 64a7e3d2c8f1b95e30a14d2b ContactDeletePayload[](https://developers.squarespace.com/commerce-apis/~schemas#contactdeletepayload) ------------------------------------------------------------------------------------------------------- `createdOn` ​string · date-time · required Creation date and time in UTC (ISO 8601 format) of this message. Example: 2024-01-28T10:44:00Z `id` ​string · required Unique notification id. Example: 5c2ba184b63ed3cb411ce2b1 `subscriptionsId` ​string · required Unique Webhook Subscriptions id. Example: 5f3c2155d947844beedda991 `topic` ​string · enum · required Description of the event that triggered the notification. * `order.create` - always value for OrderCreatePayload.topic ref * `order.update` - always value for OrderUpdatePayload.topic * `extension.uninstall` - always value for ExtensionUninstallPayload.topic * `contact.create` - always value for ContactCreatePayload.topic * `contact.update` - always value for ContactUpdatePayload.topic * `contact.delete` - always value for ContactDeletePayload.topic * `address.create` - always value for AddressCreatePayload.topic * `address.update` - always value for AddressUpdatePayload.topic * `address.delete` - always value for AddressDeletePayload.topic Enum values: contact.delete Example: contact.delete Default: contact.delete `websiteId` ​string · required Squarespace website id that triggered the notification. Example: 5f3c3d55ac435e1a051f77b3 `data` ​[ContactDeleteData](https://developers.squarespace.com/commerce-apis/~schemas#contactdeletedata) Identifiers and metadata for the deleted contact. ContactUpdatePayload[](https://developers.squarespace.com/commerce-apis/~schemas#contactupdatepayload) ------------------------------------------------------------------------------------------------------- `createdOn` ​string · date-time · required Creation date and time in UTC (ISO 8601 format) of this message. Example: 2024-01-28T10:44:00Z `id` ​string · required Unique notification id. Example: 5c2ba184b63ed3cb411ce2b1 `subscriptionsId` ​string · required Unique Webhook Subscriptions id. Example: 5f3c2155d947844beedda991 `topic` ​string · enum · required Description of the event that triggered the notification. * `order.create` - always value for OrderCreatePayload.topic ref * `order.update` - always value for OrderUpdatePayload.topic * `extension.uninstall` - always value for ExtensionUninstallPayload.topic * `contact.create` - always value for ContactCreatePayload.topic * `contact.update` - always value for ContactUpdatePayload.topic * `contact.delete` - always value for ContactDeletePayload.topic * `address.create` - always value for AddressCreatePayload.topic * `address.update` - always value for AddressUpdatePayload.topic * `address.delete` - always value for AddressDeletePayload.topic Enum values: contact.update Example: contact.update Default: contact.update `websiteId` ​string · required Squarespace website id that triggered the notification. Example: 5f3c3d55ac435e1a051f77b3 `data` ​[Contact](https://developers.squarespace.com/commerce-apis/~schemas#contact) A contact. CreateAddressBookEntryRequest[](https://developers.squarespace.com/commerce-apis/~schemas#createaddressbookentryrequest) ------------------------------------------------------------------------------------------------------------------------- `address` ​[ContactAddress](https://developers.squarespace.com/commerce-apis/~schemas#contactaddress)  · required Address properties for a contact. `defaultShipping` ​boolean Whether this entry should be the default shipping address. If this is the only address book entry for the contact after creation, it becomes the default even when set to false. CreateAddressBookEntryResponse[](https://developers.squarespace.com/commerce-apis/~schemas#createaddressbookentryresponse) --------------------------------------------------------------------------------------------------------------------------- `addressBookEntry` ​[AddressBookEntry](https://developers.squarespace.com/commerce-apis/~schemas#addressbookentry) An address book entry for a contact. CreateContactRequest[](https://developers.squarespace.com/commerce-apis/~schemas#createcontactrequest) ------------------------------------------------------------------------------------------------------- `firstName` ​string · required Contact's first name Example: john `lastName` ​string · required Contact's last name Example: doe `locale` ​string · required Contact's locale Example: en-US `primaryEmail` ​[CreateEmail](https://developers.squarespace.com/commerce-apis/~schemas#createemail)  · required Primary email supplied when creating a contact. CreateContactResponse[](https://developers.squarespace.com/commerce-apis/~schemas#createcontactresponse) --------------------------------------------------------------------------------------------------------- `contact` ​[Contact](https://developers.squarespace.com/commerce-apis/~schemas#contact) A contact. CreateDiscountLineRequest[](https://developers.squarespace.com/commerce-apis/~schemas#creatediscountlinerequest) ----------------------------------------------------------------------------------------------------------------- `amount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `name` ​string `promoCode` ​string CreateDiscountRequest[](https://developers.squarespace.com/commerce-apis/~schemas#creatediscountrequest) --------------------------------------------------------------------------------------------------------- `criteria` ​required `name` ​string · required Display name for the discount. `template` ​required `trigger` ​required `validFrom` ​string · date-time · required When the discount becomes active. `isLimitedUses` ​boolean If true, the discount can only be used `maxUsesAllowed` times site-wide. `isOncePerCustomer` ​boolean If true, a given customer can only use this discount once. `maxUsesAllowed` ​integer · int32 Maximum site-wide redemptions. Required when isLimitedUses=true; null otherwise. `paymentPlanOptions` ​[PaymentPlanOptions](https://developers.squarespace.com/commerce-apis/~schemas#paymentplanoptions) Payment-plan applicability settings for this discount. When omitted from a create or update request, defaults to NONE. `subscriptionOptions` ​[SubscriptionOptions](https://developers.squarespace.com/commerce-apis/~schemas#subscriptionoptions) Subscription applicability settings for this discount. When omitted from a create or update request, defaults to EXCLUDED. `validTo` ​string · date-time When the discount expires. Null = no expiry. CreateEmail[](https://developers.squarespace.com/commerce-apis/~schemas#createemail) ------------------------------------------------------------------------------------- `email` ​string · email · required The email address. Example: jane.doe@example.com `acceptsMarketing` ​boolean If contact's email accepts marketing Default: false CreateGiftCardProductRequest[](https://developers.squarespace.com/commerce-apis/~schemas#creategiftcardproductrequest) ----------------------------------------------------------------------------------------------------------------------- `description` ​string `isVisible` ​boolean `name` ​string `storePageId` ​string `tags` ​string\[\] `type` ​string `urlSlug` ​string `variants` ​[CreateGiftCardProductVariantRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#creategiftcardproductvariantrequest) CreateGiftCardProductVariantRequest[](https://developers.squarespace.com/commerce-apis/~schemas#creategiftcardproductvariantrequest) ------------------------------------------------------------------------------------------------------------------------------------- `pricing` ​[SimpleProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#simpleproductpricing) `sku` ​string CreateInventoryAdjustmentRequest[](https://developers.squarespace.com/commerce-apis/~schemas#createinventoryadjustmentrequest) ------------------------------------------------------------------------------------------------------------------------------- `decrementOperations` ​[InventoryQuantityExpression\[\]](https://developers.squarespace.com/commerce-apis/~schemas#inventoryquantityexpression) Optional; array of objects. Subtracts stock quantity for InventoryItems. `incrementOperations` ​[InventoryQuantityExpression\[\]](https://developers.squarespace.com/commerce-apis/~schemas#inventoryquantityexpression) Optional; array of objects. Increments stock quantity for InventoryItems. `setFiniteOperations` ​[InventoryQuantityExpression\[\]](https://developers.squarespace.com/commerce-apis/~schemas#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. CreateLineItemRequest[](https://developers.squarespace.com/commerce-apis/~schemas#createlineitemrequest) --------------------------------------------------------------------------------------------------------- `lineItemType` ​[OrderCreateLineItemType](https://developers.squarespace.com/commerce-apis/~schemas#ordercreatelineitemtype)  · enum · required Product type sold; values may be PHYSICAL\_PRODUCT or CUSTOM. Enum values: PHYSICAL\_PRODUCT CUSTOM `quantity` ​integer · int32 · required Amount of the item purchased. 1,000,000 limit. `unitPricePaid` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount)  · required A monetary amount with currency code and decimal value `nonSaleUnitPrice` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `title` ​string Title of the custom line item. `variantId` ​string Required if lineItemType is PHYSICAL\_PRODUCT. Unique id of the ProductVariant sold. CreateOrderInventoryBehavior[](https://developers.squarespace.com/commerce-apis/~schemas#createorderinventorybehavior) ----------------------------------------------------------------------------------------------------------------------- string · enum Enum values: DEDUCT SKIP Indicates whether to deduct stock quantity for the product variant upon Order creation. Values may be DEDUCT or SKIP. Defaults to SKIP. CreateOrderRequest[](https://developers.squarespace.com/commerce-apis/~schemas#createorderrequest) --------------------------------------------------------------------------------------------------- `channelName` ​string · maxLength: 30 · required Name of third-party sales channel. `createdOn` ​string · date-time · required ISO 8601 UTC date and time string. Represents the date and time when the order was placed through the third-party sales channel. `externalOrderReference` ​string · maxLength: 200 · required Order reference identifier used by the third-party sales channel. `fulfillments` ​[CreateOrderShipmentRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#createordershipmentrequest)  · required Array of shipping fulfillments; up to 100 entries. Describes shipment information for the order. `grandTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount)  · required A monetary amount with currency code and decimal value `lineItems` ​[CreateLineItemRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#createlineitemrequest)  · required Array of purchased line items; cannot be empty. `priceTaxInterpretation` ​[TaxInterpretation](https://developers.squarespace.com/commerce-apis/~schemas#taxinterpretation)  · enum · required Indicates that lineItems.unitPricePaid includes tax. Values may be EXCLUSIVE or INCLUSIVE. Enum values: INCLUSIVE EXCLUSIVE `billingAddress` ​[AddressRequest](https://developers.squarespace.com/commerce-apis/~schemas#addressrequest) Customer's shipping address. `customerEmail` ​string · email Email address provided at checkout on the third-party sales channel. Example: john.doe@example.com `discountLines` ​[CreateDiscountLineRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#creatediscountlinerequest) Array of discount line items. Describes the promotions redeemed during checkout. `discountTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `fulfilledOn` ​string · date-time ISO 8601 UTC date and time string. Represents the moment the order was fulfilled. Required if fulfillmentStatus is FULFILLED. `fulfillmentStatus` ​[OrderCreateFulfillmentStatus](https://developers.squarespace.com/commerce-apis/~schemas#ordercreatefulfillmentstatus)  · enum Current fulfillment status of the order. Value may be PENDING or FULFILLED. Enum values: PENDING FULFILLED `inventoryBehavior` ​[CreateOrderInventoryBehavior](https://developers.squarespace.com/commerce-apis/~schemas#createorderinventorybehavior)  · enum Indicates whether to deduct stock quantity for the product variant upon Order creation. Values may be DEDUCT or SKIP. Defaults to SKIP. Enum values: DEDUCT SKIP `shippingAddress` ​[AddressRequest](https://developers.squarespace.com/commerce-apis/~schemas#addressrequest) Customer's shipping address. `shippingLines` ​[CreateShippingLineRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#createshippinglinerequest) Array of shipping line items. Describes the shipping options chosen at checkout. Currently accepts only one shipping entry. `shippingTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `shopperFulfillmentNotificationBehavior` ​[ShopperFulfillmentNotificationBehavior](https://developers.squarespace.com/commerce-apis/~schemas#shopperfulfillmentnotificationbehavior)  · enum Indicates whether to send a fulfillment notification email to the customer. Value may be SEND or SKIP. Enum values: SEND SKIP `subtotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `taxTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value CreateOrderShipmentRequest[](https://developers.squarespace.com/commerce-apis/~schemas#createordershipmentrequest) ------------------------------------------------------------------------------------------------------------------- `carrierName` ​string · maxLength: 100 · required Name of the carrier handling the shipment. `service` ​string · maxLength: 100 · required Carrier's level of service for shipping. `shipDate` ​string · date-time · required ISO 8601 UTC date and time string. Represents the moment the shipment occurred. `trackingNumber` ​string · maxLength: 100 · required Carrier's parcel tracking number. `trackingUrl` ​string URL provided by carrier to track the shipment; must adhere to valid URL formatting. CreatePhysicalProductRequest[](https://developers.squarespace.com/commerce-apis/~schemas#createphysicalproductrequest) ----------------------------------------------------------------------------------------------------------------------- `description` ​string `isVisible` ​boolean `name` ​string `storePageId` ​string `tags` ​string\[\] `type` ​string `urlSlug` ​string `variantAttributes` ​string\[\] `variants` ​[CreatePhysicalProductVariantRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#createphysicalproductvariantrequest) CreatePhysicalProductVariantRequest[](https://developers.squarespace.com/commerce-apis/~schemas#createphysicalproductvariantrequest) ------------------------------------------------------------------------------------------------------------------------------------- `attributes` ​object `gtin` ​string Global Trade Item Number (GTIN). Optional. Must be 8, 12, 13, or 14 numeric digits. Whitespace, hyphens, and underscores are stripped before validation. `mpn` ​string Manufacturer Part Number (MPN). Optional. Must be alphanumeric and 70 characters or fewer. Whitespace, hyphens, and underscores are stripped before validation. `pricing` ​[FullProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#fullproductpricing) `shippingMeasurements` ​[ProductMeasurements](https://developers.squarespace.com/commerce-apis/~schemas#productmeasurements) Measurements of the variant when it's shipped. Present for PHYSICAL products only. `sku` ​string `stock` ​[ProductStock](https://developers.squarespace.com/commerce-apis/~schemas#productstock) Available stock for the variant. Present for PHYSICAL products only. CreateProductRequest[](https://developers.squarespace.com/commerce-apis/~schemas#createproductrequest) ------------------------------------------------------------------------------------------------------- `storePageId` ​string · required Identifier of the product's Store Page. `type` ​[ProductType](https://developers.squarespace.com/commerce-apis/~schemas#producttype)  · enum · required Product type indicator. Value may be: `PHYSICAL` or `DIGITAL`. Enum values: PHYSICAL DIGITAL `variants` ​[CreateProductVariantRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#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. `pricing` ​[ProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#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. CreateProductVariantRequest[](https://developers.squarespace.com/commerce-apis/~schemas#createproductvariantrequest) --------------------------------------------------------------------------------------------------------------------- `pricing` ​[ProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#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. `attributes` ​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. `shippingMeasurements` ​[ProductMeasurements](https://developers.squarespace.com/commerce-apis/~schemas#productmeasurements) Measurements of the variant when it's shipped. Present for PHYSICAL products only. `stock` ​[ProductStock](https://developers.squarespace.com/commerce-apis/~schemas#productstock) Available stock for the variant. Present for PHYSICAL products only. CreateServiceProductRequest[](https://developers.squarespace.com/commerce-apis/~schemas#createserviceproductrequest) --------------------------------------------------------------------------------------------------------------------- `description` ​string `isVisible` ​boolean `name` ​string `storePageId` ​string `tags` ​string\[\] `type` ​string `urlSlug` ​string `variantAttributes` ​string\[\] `variants` ​[CreateServiceProductVariantRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#createserviceproductvariantrequest) CreateServiceProductVariantRequest[](https://developers.squarespace.com/commerce-apis/~schemas#createserviceproductvariantrequest) ----------------------------------------------------------------------------------------------------------------------------------- `attributes` ​object `pricing` ​[FullProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#fullproductpricing) `sku` ​string `stock` ​[ProductStock](https://developers.squarespace.com/commerce-apis/~schemas#productstock) Available stock for the variant. Present for PHYSICAL products only. CreateShippingLineRequest[](https://developers.squarespace.com/commerce-apis/~schemas#createshippinglinerequest) ----------------------------------------------------------------------------------------------------------------- `amount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount)  · required A monetary amount with currency code and decimal value `method` ​string · maxLength: 100 · required Description of the shipping option. CreateVariantRequestV2[](https://developers.squarespace.com/commerce-apis/~schemas#createvariantrequestv2) ----------------------------------------------------------------------------------------------------------- `pricing` ​[ProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#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. `attributes` ​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. `gtin` ​string Global Trade Item Number (GTIN). Optional. Must be 8, 12, 13, or 14 numeric digits. Whitespace, hyphens, and underscores are stripped before validation. Supported for PHYSICAL products only. Example: 01234567890128 `mpn` ​string Manufacturer Part Number (MPN). Optional. Must be alphanumeric and 70 characters or fewer. Whitespace, hyphens, and underscores are stripped before validation. Supported for PHYSICAL products only. Example: MPN-1234 `shippingMeasurements` ​[ProductMeasurements](https://developers.squarespace.com/commerce-apis/~schemas#productmeasurements) Measurements of the variant when it's shipped. Present for PHYSICAL products only. `stock` ​[ProductStock](https://developers.squarespace.com/commerce-apis/~schemas#productstock) Available stock for the variant. Present for PHYSICAL products only. DateFilter[](https://developers.squarespace.com/commerce-apis/~schemas#datefilter) ----------------------------------------------------------------------------------- `after` ​string · date-time Filter out any dates after `before` ​string · date-time Filter out any dates before DigitalGood[](https://developers.squarespace.com/commerce-apis/~schemas#digitalgood) ------------------------------------------------------------------------------------- `filename` ​string Filename of the downloadable file. `id` ​string Unique DigitalGood id. DigitalProduct[](https://developers.squarespace.com/commerce-apis/~schemas#digitalproduct) ------------------------------------------------------------------------------------------- `createdOn` ​string · date-time · required `id` ​string · required `modifiedOn` ​string · date-time · required `storePageId` ​string · required `type` ​[ProductTypeV2](https://developers.squarespace.com/commerce-apis/~schemas#producttypev2)  · enum · required Enum values: PHYSICAL SERVICE GIFT\_CARD DIGITAL `description` ​string `images` ​[ProductImage\[\]](https://developers.squarespace.com/commerce-apis/~schemas#productimage) `isVisible` ​boolean `name` ​string `seoOptions` ​[SeoOptions](https://developers.squarespace.com/commerce-apis/~schemas#seooptions) Options for search engine optimization. `tags` ​string\[\] `url` ​string `urlSlug` ​string `digitalGood` ​[DigitalGood](https://developers.squarespace.com/commerce-apis/~schemas#digitalgood) Present for DIGITAL products only. `pricing` ​[ProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#productpricing) Present for DIGITAL products only. Digital products don't have variants, so pricing is at the product level. Discount[](https://developers.squarespace.com/commerce-apis/~schemas#discount) ------------------------------------------------------------------------------- `criteria` ​required `name` ​string · required Display name for the discount. `template` ​required `trigger` ​required `validFrom` ​string · date-time · required When the discount becomes active. `id` ​string · readOnly Discount id. `isLimitedUses` ​boolean If true, the discount can only be used `maxUsesAllowed` times site-wide. `isOncePerCustomer` ​boolean If true, a given customer can only use this discount once. `lastRedeemedAt` ​string · date-time · readOnly Timestamp of the most recent redemption. Null if never redeemed. `maxUsesAllowed` ​integer · int32 Maximum site-wide redemptions. Required when isLimitedUses=true; null otherwise. `numberOfUses` ​integer · int32 · readOnly Number of times this discount has been redeemed. `paymentPlanOptions` ​[PaymentPlanOptions](https://developers.squarespace.com/commerce-apis/~schemas#paymentplanoptions) Payment-plan applicability settings for this discount. When omitted from a create or update request, defaults to NONE. `status` ​string · enum · readOnly Defines the lifecycle status of a discount. Enum values: ACTIVE SCHEDULED EXPIRED `subscriptionOptions` ​[SubscriptionOptions](https://developers.squarespace.com/commerce-apis/~schemas#subscriptionoptions) Subscription applicability settings for this discount. When omitted from a create or update request, defaults to EXCLUDED. `validTo` ​string · date-time When the discount expires. Null = no expiry. `websiteId` ​string · readOnly 24-char website id. DiscountLine[](https://developers.squarespace.com/commerce-apis/~schemas#discountline) --------------------------------------------------------------------------------------- `amount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `description` ​string A plain-English description of the promotion Example: 20% off all orders over $50 `name` ​string Name of the promotion Example: Summer Sale - 20% Off `promoCode` ​string The user-entered promo code that triggered the discount Example: SUMMER20 DiscountResponse[](https://developers.squarespace.com/commerce-apis/~schemas#discountresponse) ----------------------------------------------------------------------------------------------- `discount` ​[Discount](https://developers.squarespace.com/commerce-apis/~schemas#discount)  · required Discount configured for a Commerce store. Email[](https://developers.squarespace.com/commerce-apis/~schemas#email) ------------------------------------------------------------------------- `acceptsMarketing` ​[AcceptsMarketing](https://developers.squarespace.com/commerce-apis/~schemas#acceptsmarketing) Marketing subscription state for the contact's email. `createdOn` ​string · date-time · readOnly The date and time when the email was created. `email` ​string · email The email address. Example: jane.doe@example.com ExtensionUninstallData[](https://developers.squarespace.com/commerce-apis/~schemas#extensionuninstalldata) ----------------------------------------------------------------------------------------------------------- `clientId` ​string · required Third-party client id. Example: A125dfPqdKJDqPAcJQgLo3A5mwcKIq2G ExtensionUninstallPayload[](https://developers.squarespace.com/commerce-apis/~schemas#extensionuninstallpayload) ----------------------------------------------------------------------------------------------------------------- `createdOn` ​string · date-time · required Creation date and time in UTC (ISO 8601 format) of this message. Example: 2024-01-28T10:44:00Z `id` ​string · required Unique notification id. Example: 5c2ba184b63ed3cb411ce2b1 `subscriptionsId` ​string · required Unique Webhook Subscriptions id. Example: 5f3c2155d947844beedda991 `topic` ​string · enum · required Description of the event that triggered the notification. * `order.create` - always value for OrderCreatePayload.topic ref * `order.update` - always value for OrderUpdatePayload.topic * `extension.uninstall` - always value for ExtensionUninstallPayload.topic * `contact.create` - always value for ContactCreatePayload.topic * `contact.update` - always value for ContactUpdatePayload.topic * `contact.delete` - always value for ContactDeletePayload.topic * `address.create` - always value for AddressCreatePayload.topic * `address.update` - always value for AddressUpdatePayload.topic * `address.delete` - always value for AddressDeletePayload.topic Enum values: extension.uninstall Example: extension.uninstall `websiteId` ​string · required Squarespace website id that triggered the notification. Example: 5f3c3d55ac435e1a051f77b3 `data` ​[ExtensionUninstallData](https://developers.squarespace.com/commerce-apis/~schemas#extensionuninstalldata) The extension uninstall details. ExternalCreateWebhookSubscriptionRequest[](https://developers.squarespace.com/commerce-apis/~schemas#externalcreatewebhooksubscriptionrequest) ----------------------------------------------------------------------------------------------------------------------------------------------- `endpointUrl` ​string · required HTTPS URL to POST webhook notifications. Example: https://example-extension.com/uninstall `topics` ​string\[\] List of event topics that trigger a webhook notification. Enum values: order.create order.update extension.uninstall contact.create contact.update contact.delete address.create address.update show 1 more ExternalCreateWebhookSubscriptionResponse[](https://developers.squarespace.com/commerce-apis/~schemas#externalcreatewebhooksubscriptionresponse) ------------------------------------------------------------------------------------------------------------------------------------------------- `clientId` ​string · readOnly · required Third-party client id. Example: A125dfPqdKJDqPAcJQgLo3A5mwcKIq2G `createdOn` ​string · date-time · readOnly · required ISO 8601 UTC date and time string; represents when the webhook subscription was created. Example: 2020-04-22T22:18:00Z `endpointUrl` ​string · required HTTPS URL to POST webhook notifications. Example: https://example-extension.com/uninstall `id` ​string · readOnly · required Unique Webhook Subscription id. Example: 7aff04bb-90e0-4002-96c2-69d8162c8dae `secret` ​string · readOnly · required Hexadecimal value used to generate a signature for a webhook notification; field is only returned when creating a new subscription or rotating a secret. Store the secret in a safe location to verify notifications from Squarespace. See the 'Verifying notifications' guide under Webhooks for details. Example: F3F9B981C78E7A6187E42853F6CE2804177E98206164779423B02DEC981ACD6B `updatedOn` ​string · date-time · readOnly · required ISO 8601 UTC date and time string; represents when the webhook subscription was last modified. Example: 2020-04-22T22:18:00Z `websiteId` ​string · readOnly · required Unique Webhook Subscription id. Example: 7aff04bb-90e0-4002-96c2-69d8162c8dae `topics` ​string\[\] List of event topics that trigger a webhook notification. Enum values: order.create order.update extension.uninstall contact.create contact.update contact.delete address.create address.update show 1 more ExternalRotateSecretResponse[](https://developers.squarespace.com/commerce-apis/~schemas#externalrotatesecretresponse) ----------------------------------------------------------------------------------------------------------------------- `secret` ​string Hexadecimal value used to generate a signature for a webhook notification; field is only returned when creating a new subscription or rotating a secret. Store the secret in a safe location to verify notifications from Squarespace. ExternalSendTestNotificationRequest[](https://developers.squarespace.com/commerce-apis/~schemas#externalsendtestnotificationrequest) ------------------------------------------------------------------------------------------------------------------------------------- `topic` ​string · required Required; Squarespace event topic that triggers a webhook notification. Possible values include: extension.uninstall, order.create, order.update. ExternalTestNotificationResponse[](https://developers.squarespace.com/commerce-apis/~schemas#externaltestnotificationresponse) ------------------------------------------------------------------------------------------------------------------------------- `statusCode` ​integer · int32 Status code returned by the subscribed webhook endpoint. ExternalTransactionProperty[](https://developers.squarespace.com/commerce-apis/~schemas#externaltransactionproperty) --------------------------------------------------------------------------------------------------------------------- `key` ​string `value` ​string ExternalUpdateWebhookSubscriptionRequest[](https://developers.squarespace.com/commerce-apis/~schemas#externalupdatewebhooksubscriptionrequest) ----------------------------------------------------------------------------------------------------------------------------------------------- `endpointUrl` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. `topics` ​[ChangeListString](https://developers.squarespace.com/commerce-apis/~schemas#changeliststring) Optional; list of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. ExternalWebhookSubscriptionListResponse[](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionlistresponse) --------------------------------------------------------------------------------------------------------------------------------------------- `webhookSubscriptions` ​[ExternalWebhookSubscriptionResponse\[\]](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionresponse) Array of Webhook Subscription resources. If the merchant site doesn't have any webhook subscriptions, this array is empty. ExternalWebhookSubscriptionResponse[](https://developers.squarespace.com/commerce-apis/~schemas#externalwebhooksubscriptionresponse) ------------------------------------------------------------------------------------------------------------------------------------- `clientId` ​string Third-party client id. `createdOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was created. `endpointUrl` ​string HTTPS URL that receives webhook notifications. `id` ​string Unique Webhook Subscription id. `topics` ​string\[\] List of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. `updatedOn` ​string ISO 8601 UTC date and time string; represents when the webhook subscription was last modified. `websiteId` ​string Unique website id. FixedAmountTemplate[](https://developers.squarespace.com/commerce-apis/~schemas#fixedamounttemplate) ----------------------------------------------------------------------------------------------------- `type` ​string · required `discountAmount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount)  · required A monetary amount with currency code and decimal value FormItem[](https://developers.squarespace.com/commerce-apis/~schemas#formitem) ------------------------------------------------------------------------------- `label` ​string The name of the form field Example: How did you hear about us? `value` ​string The value of the field, as entered by the shopper Example: Facebook Fulfillment[](https://developers.squarespace.com/commerce-apis/~schemas#fulfillment) ------------------------------------------------------------------------------------- `carrierName` ​string Name of the carrier handling the shipment. Example: FedEx `service` ​string Carrier's level of service for shipping. Example: Same-Day Delivery `shipDate` ​string · date-time ISO 8601 UTC date and time string; represents the moment the fulfillment was shipped. Example: 2017-01-29T22:19:26.98Z `trackingNumber` ​string Carrier's parcel tracking number. Example: 103932814692659 `trackingUrl` ​string URL provided by the carrier to track the shipment. Example: https://www.fedex.com/apps/fedextrack/?tracknumbers=103932814692659 FulfillmentStatus[](https://developers.squarespace.com/commerce-apis/~schemas#fulfillmentstatus) ------------------------------------------------------------------------------------------------- string · enum Enum values: PENDING FULFILLED CANCELED Current fulfillment status of the order. Value may be: PENDING, FULFILLED, or CANCELED. FullProductPricing[](https://developers.squarespace.com/commerce-apis/~schemas#fullproductpricing) --------------------------------------------------------------------------------------------------- `basePrice` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `onSale` ​boolean `salePrice` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value GetAddressBookEntryResponse[](https://developers.squarespace.com/commerce-apis/~schemas#getaddressbookentryresponse) --------------------------------------------------------------------------------------------------------------------- `addressBookEntry` ​[AddressBookEntry](https://developers.squarespace.com/commerce-apis/~schemas#addressbookentry) An address book entry for a contact. GetAddressBookResponse[](https://developers.squarespace.com/commerce-apis/~schemas#getaddressbookresponse) ----------------------------------------------------------------------------------------------------------- `addressBook` ​[AddressBook](https://developers.squarespace.com/commerce-apis/~schemas#addressbook) Address settings for a contact. When there is at least one address book entry, exactly one is the default shipping address; default shipping address is always returned on the first page of paginated results). `pagination` ​[PaginationDetails](https://developers.squarespace.com/commerce-apis/~schemas#paginationdetails) GetContactResponse[](https://developers.squarespace.com/commerce-apis/~schemas#getcontactresponse) --------------------------------------------------------------------------------------------------- `contact` ​[Contact](https://developers.squarespace.com/commerce-apis/~schemas#contact) A contact. GiftCardProduct[](https://developers.squarespace.com/commerce-apis/~schemas#giftcardproduct) --------------------------------------------------------------------------------------------- `createdOn` ​string · date-time · required `id` ​string · required `modifiedOn` ​string · date-time · required `storePageId` ​string · required `type` ​[ProductTypeV2](https://developers.squarespace.com/commerce-apis/~schemas#producttypev2)  · enum · required Enum values: PHYSICAL SERVICE GIFT\_CARD DIGITAL `description` ​string `images` ​[ProductImage\[\]](https://developers.squarespace.com/commerce-apis/~schemas#productimage) `isVisible` ​boolean `name` ​string `seoOptions` ​[SeoOptions](https://developers.squarespace.com/commerce-apis/~schemas#seooptions) Options for search engine optimization. `tags` ​string\[\] `url` ​string `urlSlug` ​string `variants` ​[GiftCardProductVariant\[\]](https://developers.squarespace.com/commerce-apis/~schemas#giftcardproductvariant) GiftCardProductVariant[](https://developers.squarespace.com/commerce-apis/~schemas#giftcardproductvariant) ----------------------------------------------------------------------------------------------------------- `id` ​string `image` ​[ProductImage](https://developers.squarespace.com/commerce-apis/~schemas#productimage) Product image assigned to the variant. `pricing` ​[SimpleProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#simpleproductpricing) `sku` ​string ImageProcessingStatus[](https://developers.squarespace.com/commerce-apis/~schemas#imageprocessingstatus) --------------------------------------------------------------------------------------------------------- string · enum Enum values: QUEUED PROCESSING READY ERROR IntegerFilter[](https://developers.squarespace.com/commerce-apis/~schemas#integerfilter) ----------------------------------------------------------------------------------------- `max` ​integer · int32 Filter out any numbers greater `min` ​integer · int32 Filter out any numbers lower InventoryItem[](https://developers.squarespace.com/commerce-apis/~schemas#inventoryitem) ----------------------------------------------------------------------------------------- `descriptor` ​string Generated description using the product's title and any available variant attributes including, but not limited to, color and size. `isUnlimited` ​boolean Indicates whether stock is currently tracked for the item. `quantity` ​integer · int32 Current amount in stock, or the last known stock amount prior to becoming unlimited. This value is modified by purchases and returns only when `isUnlimited` is `false`. `sku` ​string Stock keeping unit (SKU) code assigned by the Squarespace merchant for the variant; used to identify an exact variant of a product using a naming scheme preferred by the merchant. `variantId` ​string The product variant id, which also serves as a unique id for the InventoryItem. InventoryItemListResponse[](https://developers.squarespace.com/commerce-apis/~schemas#inventoryitemlistresponse) ----------------------------------------------------------------------------------------------------------------- `inventory` ​[InventoryItem\[\]](https://developers.squarespace.com/commerce-apis/~schemas#inventoryitem) Array of InventoryItem resources. If the merchant site doesn't have any physical or service products, this array is empty. InventoryQuantityExpression[](https://developers.squarespace.com/commerce-apis/~schemas#inventoryquantityexpression) --------------------------------------------------------------------------------------------------------------------- `quantity` ​integer · int32 Quantity value for the inventory operation. `variantId` ​string Unique id for the InventoryItem. LineItem[](https://developers.squarespace.com/commerce-apis/~schemas#lineitem) ------------------------------------------------------------------------------- `customizations` ​[FormItem\[\]](https://developers.squarespace.com/commerce-apis/~schemas#formitem) Array of form data submitted via a product's custom form prior to being added to the cart. `height` ​number · float Shipping height of the physical product variant. 0.0 when not specified or when the variant is not a physical product. Example: 4 `id` ​string Unique line item id. Example: 585d4975dee9f31a60284a16 `imageUrl` ​string URL of the primary image for the item. Example: https://static.squarespace.com/universal/commerce/images/brine-32oz-spring-mix-v2.jpg?format=300w `length` ​number · float Shipping length of the physical product variant. 0.0 when not specified or when the variant is not a physical product. Example: 3 `lineItemType` ​string Product type of the item. Example: PHYSICAL\_PRODUCT `productId` ​string Unique product id; unless null, every line item with a variantId is a variant of a product with productId. Example: 565c8f3da7c8a3cf71d5fd0a `productName` ​string Name of the purchased product. Example: Product `quantity` ​integer · int32 Amount of the item purchased. Example: 1 `sku` ​string Stock keeping unit (SKU) code assigned by the Squarespace merchant for a variant. Null for digital products. Example: SQ3381024 `unitPricePaid` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `variantId` ​string Unique id of the ProductVariant sold. Populated for physical, service, or gift card line items created on or after May 28, 2019. Example: 88c16ee4-547b-445e-a392-bded9991ae30 `variantOptions` ​[VariantOption\[\]](https://developers.squarespace.com/commerce-apis/~schemas#variantoption) Array of variant options; represents variant choices made by the customer. Null for download and gift card products. `weight` ​number · float Shipping weight of the physical product variant. 0.0 when not specified or when the variant is not a physical product. Example: 1 `width` ​number · float Shipping width of the physical product variant. 0.0 when not specified or when the variant is not a physical product. Example: 2 Location[](https://developers.squarespace.com/commerce-apis/~schemas#location) ------------------------------------------------------------------------------- `country` ​string `region` ​string MeasurementStandard[](https://developers.squarespace.com/commerce-apis/~schemas#measurementstandard) ----------------------------------------------------------------------------------------------------- string · enum Enum values: IMPERIAL METRIC MemberProfile[](https://developers.squarespace.com/commerce-apis/~schemas#memberprofile) ----------------------------------------------------------------------------------------- `email` ​string Profile email address. `firstName` ​string Profile first name. `id` ​string Unique Profile id. `lastName` ​string Profile last name. MonetaryAmount[](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) ------------------------------------------------------------------------------------------- `currency` ​object ISO 4217 currency code Example: USD `value` ​number Decimal monetary value Example: 49.99 Order[](https://developers.squarespace.com/commerce-apis/~schemas#order) ------------------------------------------------------------------------- `billingAddress` ​[Address](https://developers.squarespace.com/commerce-apis/~schemas#address) Customer's shipping address provided at checkout or, for recurring subscription orders, the customer's current mailing address. `channel` ​string Where the order originated; possible values are: web and pos. Example: web `channelName` ​string Name of the third-party sales channel. Example: Faire Wholesale `createdOn` ​string · date-time ISO 8601 UTC date and time string; represents the moment when the order was placed. Example: 2016-12-23T15:58:07.187Z `customerEmail` ​string Email address entered at checkout or, for recurring subscription orders, the customer's current email address. Example: foo@example.com `customerId` ​string Unique customer id. Example: 585d498fdee9f31a60284a38 `discountLines` ​[DiscountLine\[\]](https://developers.squarespace.com/commerce-apis/~schemas#discountline) Array of discount line items; describes the promotions redeemed during checkout. `discountTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `externalOrderReference` ​string Order reference identifier used by the third-party sales channel. Example: EXT-98765 `formSubmission` ​[FormItem\[\]](https://developers.squarespace.com/commerce-apis/~schemas#formitem) Array of form data submitted via the checkout page. `fulfilledOn` ​string · date-time ISO 8601 UTC date and time string; represents the moment the order was fulfilled. `fulfillmentStatus` ​[FulfillmentStatus](https://developers.squarespace.com/commerce-apis/~schemas#fulfillmentstatus)  · enum Current fulfillment status of the order. Value may be: PENDING, FULFILLED, or CANCELED. Enum values: PENDING FULFILLED CANCELED `fulfillments` ​[Fulfillment\[\]](https://developers.squarespace.com/commerce-apis/~schemas#fulfillment) Array of shipping fulfillments; describes shipment information for the order. `grandTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `id` ​string Unique Order id. Example: 585d498fdee9f31a60284a37 `internalNotes` ​[OrderNote\[\]](https://developers.squarespace.com/commerce-apis/~schemas#ordernote) Array of internal notes added to the order by the merchant. `lineItems` ​[LineItem\[\]](https://developers.squarespace.com/commerce-apis/~schemas#lineitem) Array of purchased line items; line items describe what product or product variant was purchased, how many of that item were purchased, and additional details. `modifiedOn` ​string · date-time ISO 8601 UTC date and time string; represents when the order was last modified. Example: 2016-12-23T15:58:07.187Z `orderNumber` ​string Unique, sequential number for the Order. Example: 3 `paymentState` ​[PaymentState](https://developers.squarespace.com/commerce-apis/~schemas#paymentstate)  · enum Current state of payment for the order. Enum values: NOT\_CHARGED AUTHORIZED PAID REFUNDED PENDING FAILED REFUND\_PENDING REFUND\_FAILED show 1 more `priceTaxInterpretation` ​string Indicates whether lineItems.unitPricePaid includes tax. Values may be EXCLUSIVE or INCLUSIVE. Example: EXCLUSIVE `refundedTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `shippingAddress` ​[Address](https://developers.squarespace.com/commerce-apis/~schemas#address) Customer's shipping address provided at checkout or, for recurring subscription orders, the customer's current mailing address. `shippingLines` ​[ShippingLine\[\]](https://developers.squarespace.com/commerce-apis/~schemas#shippingline) Array of shipping line items; describes the shipping options chosen at checkout. `shippingOptionName` ​string the specific shipping service name selected at checkout (e.g. "USPS Ground Advantage", "Royal Mail Tracked 48"). `shippingOptionServiceType` ​string · enum The carrier service type identifier. Enum values: FEDEX\_GROUND FEDEX\_GROUND\_HOME\_DELIVERY FEDEX\_PRIORITY\_OVERNIGHT FEDEX\_STANDARD\_OVERNIGHT FEDEX\_2\_DAY FEDEX\_2\_DAY\_AM FEDEX\_EXPRESS\_SAVER FEDEX\_FIRST\_FREIGHT show 26 more `shippingTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `subtotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `taxTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `testmode` ​boolean If true, the order is a test order created using a payment method in test mode. OrderCreateData[](https://developers.squarespace.com/commerce-apis/~schemas#ordercreatedata) --------------------------------------------------------------------------------------------- `orderId` ​string · required Unique order id. Example: 5f3c39ce69e11e796f19990e OrderCreateFulfillmentStatus[](https://developers.squarespace.com/commerce-apis/~schemas#ordercreatefulfillmentstatus) ----------------------------------------------------------------------------------------------------------------------- string · enum Enum values: PENDING FULFILLED Current fulfillment status of the order. Value may be PENDING or FULFILLED. OrderCreateLineItemType[](https://developers.squarespace.com/commerce-apis/~schemas#ordercreatelineitemtype) ------------------------------------------------------------------------------------------------------------- string · enum Enum values: PHYSICAL\_PRODUCT CUSTOM Product type sold; values may be PHYSICAL\_PRODUCT or CUSTOM. OrderCreatePayload[](https://developers.squarespace.com/commerce-apis/~schemas#ordercreatepayload) --------------------------------------------------------------------------------------------------- `createdOn` ​string · date-time · required Creation date and time in UTC (ISO 8601 format) of this message. Example: 2024-01-28T10:44:00Z `id` ​string · required Unique notification id. Example: 5c2ba184b63ed3cb411ce2b1 `subscriptionsId` ​string · required Unique Webhook Subscriptions id. Example: 5f3c2155d947844beedda991 `topic` ​string · enum · required Description of the event that triggered the notification. * `order.create` - always value for OrderCreatePayload.topic ref * `order.update` - always value for OrderUpdatePayload.topic * `extension.uninstall` - always value for ExtensionUninstallPayload.topic * `contact.create` - always value for ContactCreatePayload.topic * `contact.update` - always value for ContactUpdatePayload.topic * `contact.delete` - always value for ContactDeletePayload.topic * `address.create` - always value for AddressCreatePayload.topic * `address.update` - always value for AddressUpdatePayload.topic * `address.delete` - always value for AddressDeletePayload.topic Enum values: order.create Example: order.create Default: order.create `websiteId` ​string · required Squarespace website id that triggered the notification. Example: 5f3c3d55ac435e1a051f77b3 `data` ​[OrderCreateData](https://developers.squarespace.com/commerce-apis/~schemas#ordercreatedata) The created order details. OrderFulfillmentRequest[](https://developers.squarespace.com/commerce-apis/~schemas#orderfulfillmentrequest) ------------------------------------------------------------------------------------------------------------- `shipments` ​[CreateOrderShipmentRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#createordershipmentrequest) Array of shipment data. `shouldSendNotification` ​boolean Indicates whether the customer should receive an email notification about the added shipments. OrderListResponse[](https://developers.squarespace.com/commerce-apis/~schemas#orderlistresponse) ------------------------------------------------------------------------------------------------- `pagination` ​object `result` ​[Order\[\]](https://developers.squarespace.com/commerce-apis/~schemas#order) OrderNote[](https://developers.squarespace.com/commerce-apis/~schemas#ordernote) --------------------------------------------------------------------------------- `content` ​string Content for the note Example: First note OrderUpdateData[](https://developers.squarespace.com/commerce-apis/~schemas#orderupdatedata) --------------------------------------------------------------------------------------------- `orderId` ​string · required Unique order id. Example: 5f3c39ce69e11e796f19990e `update` ​string · enum · required The type of update on the order. Enum values: FULFILLED REFUNDED CANCELED MARKED\_PENDING EMAIL\_UPDATED Example: FULFILLED OrderUpdatePayload[](https://developers.squarespace.com/commerce-apis/~schemas#orderupdatepayload) --------------------------------------------------------------------------------------------------- `createdOn` ​string · date-time · required Creation date and time in UTC (ISO 8601 format) of this message. Example: 2024-01-28T10:44:00Z `id` ​string · required Unique notification id. Example: 5c2ba184b63ed3cb411ce2b1 `subscriptionsId` ​string · required Unique Webhook Subscriptions id. Example: 5f3c2155d947844beedda991 `topic` ​string · enum · required Description of the event that triggered the notification. * `order.create` - always value for OrderCreatePayload.topic ref * `order.update` - always value for OrderUpdatePayload.topic * `extension.uninstall` - always value for ExtensionUninstallPayload.topic * `contact.create` - always value for ContactCreatePayload.topic * `contact.update` - always value for ContactUpdatePayload.topic * `contact.delete` - always value for ContactDeletePayload.topic * `address.create` - always value for AddressCreatePayload.topic * `address.update` - always value for AddressUpdatePayload.topic * `address.delete` - always value for AddressDeletePayload.topic Enum values: order.update Example: order.update Default: order.update `websiteId` ​string · required Squarespace website id that triggered the notification. Example: 5f3c3d55ac435e1a051f77b3 `data` ​[OrderUpdateData](https://developers.squarespace.com/commerce-apis/~schemas#orderupdatedata) The updated order details. PaginatedDiscountListResponse[](https://developers.squarespace.com/commerce-apis/~schemas#paginateddiscountlistresponse) ------------------------------------------------------------------------------------------------------------------------- `discounts` ​[Discount\[\]](https://developers.squarespace.com/commerce-apis/~schemas#discount)  · required Discounts for this page. `hasNextPage` ​boolean True when more results exist after the current window. `hasPreviousPage` ​boolean True when a page of results exists before the current window. PaginatedGetContactsResponse[](https://developers.squarespace.com/commerce-apis/~schemas#paginatedgetcontactsresponse) ----------------------------------------------------------------------------------------------------------------------- `contacts` ​[Contact\[\]](https://developers.squarespace.com/commerce-apis/~schemas#contact) paginated list of contacts retrieved `pagination` ​object PaginatedInventoryItemListResponse[](https://developers.squarespace.com/commerce-apis/~schemas#paginatedinventoryitemlistresponse) ----------------------------------------------------------------------------------------------------------------------------------- `inventory` ​[InventoryItem\[\]](https://developers.squarespace.com/commerce-apis/~schemas#inventoryitem) Array of InventoryItem resources. If the merchant site doesn't have any physical or service product variants, this array is empty. `pagination` ​object PaginatedProductListResponse[](https://developers.squarespace.com/commerce-apis/~schemas#paginatedproductlistresponse) ----------------------------------------------------------------------------------------------------------------------- `pagination` ​object `products` ​[Product\[\]](https://developers.squarespace.com/commerce-apis/~schemas#product) PaginatedProductListResponseV2[](https://developers.squarespace.com/commerce-apis/~schemas#paginatedproductlistresponsev2) --------------------------------------------------------------------------------------------------------------------------- `pagination` ​object `products` ​array PaginatedProfileListResponse[](https://developers.squarespace.com/commerce-apis/~schemas#paginatedprofilelistresponse) ----------------------------------------------------------------------------------------------------------------------- `pagination` ​object `profiles` ​[Profile\[\]](https://developers.squarespace.com/commerce-apis/~schemas#profile) PaginatedQueryContactsResponse[](https://developers.squarespace.com/commerce-apis/~schemas#paginatedquerycontactsresponse) --------------------------------------------------------------------------------------------------------------------------- `contacts` ​[Contact\[\]](https://developers.squarespace.com/commerce-apis/~schemas#contact) paginated list of contacts retrieved `pagination` ​object PaginatedStorePagesResponse[](https://developers.squarespace.com/commerce-apis/~schemas#paginatedstorepagesresponse) --------------------------------------------------------------------------------------------------------------------- `pagination` ​object `storePages` ​[StorePage\[\]](https://developers.squarespace.com/commerce-apis/~schemas#storepage) PaginatedTransactionListResponse[](https://developers.squarespace.com/commerce-apis/~schemas#paginatedtransactionlistresponse) ------------------------------------------------------------------------------------------------------------------------------- `documents` ​[TransactionDocument\[\]](https://developers.squarespace.com/commerce-apis/~schemas#transactiondocument) Array of Document resources. If the merchant site doesn't have any payment transactions for orders or donations, this array is empty. `pagination` ​object PaginationDetails[](https://developers.squarespace.com/commerce-apis/~schemas#paginationdetails) ------------------------------------------------------------------------------------------------- `hasNextPage` ​boolean `nextPageCursor` ​string `nextPageUrl` ​string PatchContactRequest[](https://developers.squarespace.com/commerce-apis/~schemas#patchcontactrequest) ----------------------------------------------------------------------------------------------------- `firstName` ​string The contact's first name. Example: John `lastName` ​string The contact's last name. Example: Smith `locale` ​string The contact's locale. Example: en-US `primaryEmail` ​[PatchEmail](https://developers.squarespace.com/commerce-apis/~schemas#patchemail) Primary email fields for an update request. Example: {"email":"johnsmith@mail.com","acceptsMarketing":true} PatchContactResponse[](https://developers.squarespace.com/commerce-apis/~schemas#patchcontactresponse) ------------------------------------------------------------------------------------------------------- `contact` ​[Contact](https://developers.squarespace.com/commerce-apis/~schemas#contact) A contact. PatchEmail[](https://developers.squarespace.com/commerce-apis/~schemas#patchemail) ----------------------------------------------------------------------------------- `acceptsMarketing` ​boolean If contact's email accepts marketing Example: true `email` ​string · email The email address. Example: jane.doe@example.com PaymentGatewayError[](https://developers.squarespace.com/commerce-apis/~schemas#paymentgatewayerror) ----------------------------------------------------------------------------------------------------- string · enum Enum values: GATEWAY\_FEE\_PROCEESING\_ERROR GATEWAY\_API\_PERMISSION\_ERROR GATEWAY\_DISCONNNECTED Captures errors from the payment gateway; value is null if not applicable. PaymentPlanOptions[](https://developers.squarespace.com/commerce-apis/~schemas#paymentplanoptions) --------------------------------------------------------------------------------------------------- `type` ​string · enum · required Defines how the discount applies to payment-plan payments. Enum values: NONE ALL\_PAYMENTS PaymentState[](https://developers.squarespace.com/commerce-apis/~schemas#paymentstate) --------------------------------------------------------------------------------------- string · enum Enum values: NOT\_CHARGED AUTHORIZED PAID REFUNDED PENDING FAILED REFUND\_PENDING REFUND\_FAILED show 1 more Current state of payment for the order. PercentageTemplate[](https://developers.squarespace.com/commerce-apis/~schemas#percentagetemplate) --------------------------------------------------------------------------------------------------- `type` ​string · required `percentage` ​number · max: 100 · required Percentage to subtract from the cart total. Range (0, 100\]. PhysicalProduct[](https://developers.squarespace.com/commerce-apis/~schemas#physicalproduct) --------------------------------------------------------------------------------------------- `createdOn` ​string · date-time · required `id` ​string · required `modifiedOn` ​string · date-time · required `storePageId` ​string · required `type` ​[ProductTypeV2](https://developers.squarespace.com/commerce-apis/~schemas#producttypev2)  · enum · required Enum values: PHYSICAL SERVICE GIFT\_CARD DIGITAL `description` ​string `images` ​[ProductImage\[\]](https://developers.squarespace.com/commerce-apis/~schemas#productimage) `isVisible` ​boolean `name` ​string `seoOptions` ​[SeoOptions](https://developers.squarespace.com/commerce-apis/~schemas#seooptions) Options for search engine optimization. `tags` ​string\[\] `url` ​string `urlSlug` ​string `variantAttributes` ​string\[\] `variants` ​[PhysicalProductVariant\[\]](https://developers.squarespace.com/commerce-apis/~schemas#physicalproductvariant) PhysicalProductVariant[](https://developers.squarespace.com/commerce-apis/~schemas#physicalproductvariant) ----------------------------------------------------------------------------------------------------------- `attributes` ​object `gtin` ​string `id` ​string `image` ​[ProductImage](https://developers.squarespace.com/commerce-apis/~schemas#productimage) Product image assigned to the variant. `mpn` ​string `pricing` ​[FullProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#fullproductpricing) `shippingMeasurements` ​[ProductMeasurements](https://developers.squarespace.com/commerce-apis/~schemas#productmeasurements) Measurements of the variant when it's shipped. Present for PHYSICAL products only. `sku` ​string `stock` ​[ProductStock](https://developers.squarespace.com/commerce-apis/~schemas#productstock) Available stock for the variant. Present for PHYSICAL products only. Product[](https://developers.squarespace.com/commerce-apis/~schemas#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` ​[DigitalGood](https://developers.squarespace.com/commerce-apis/~schemas#digitalgood) Present for DIGITAL products only. `id` ​string Unique Product id. `images` ​[ProductImage\[\]](https://developers.squarespace.com/commerce-apis/~schemas#productimage) 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. `pricing` ​[ProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#productpricing) Present for DIGITAL products only. Digital products don't have variants, so pricing is at the product level. `seoOptions` ​[SeoOptions](https://developers.squarespace.com/commerce-apis/~schemas#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](https://developers.squarespace.com/commerce-apis/~schemas#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. `variants` ​[ProductVariant\[\]](https://developers.squarespace.com/commerce-apis/~schemas#productvariant) List of variants of the product. Present for PHYSICAL and GIFT\_CARD products only. ProductCriteria[](https://developers.squarespace.com/commerce-apis/~schemas#productcriteria) --------------------------------------------------------------------------------------------- `type` ​string · required `productId` ​string Identifier of the product the discount targets. `productName` ​string Display-time snapshot of the product name at the time the discount was created. ProductDimensions[](https://developers.squarespace.com/commerce-apis/~schemas#productdimensions) ------------------------------------------------------------------------------------------------- `height` ​number · float Height of the variant. `length` ​number · float Length of the variant. `unit` ​[ProductDimensionsUnit](https://developers.squarespace.com/commerce-apis/~schemas#productdimensionsunit)  · enum Unit of measurement. Supported values: `INCH`, `CENTIMETER`. Enum values: CENTIMETER INCH `width` ​number · float Width of the variant. ProductDimensionsUnit[](https://developers.squarespace.com/commerce-apis/~schemas#productdimensionsunit) --------------------------------------------------------------------------------------------------------- string · enum Enum values: CENTIMETER INCH Unit of measurement. Supported values: `INCH`, `CENTIMETER`. ProductImage[](https://developers.squarespace.com/commerce-apis/~schemas#productimage) --------------------------------------------------------------------------------------- `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. ProductImageProcessingStatus[](https://developers.squarespace.com/commerce-apis/~schemas#productimageprocessingstatus) ----------------------------------------------------------------------------------------------------------------------- `id` ​string `status` ​[ImageProcessingStatus](https://developers.squarespace.com/commerce-apis/~schemas#imageprocessingstatus)  · enum Enum values: QUEUED PROCESSING READY ERROR ProductListResponse[](https://developers.squarespace.com/commerce-apis/~schemas#productlistresponse) ----------------------------------------------------------------------------------------------------- `products` ​[Product\[\]](https://developers.squarespace.com/commerce-apis/~schemas#product) ProductListResponseV2[](https://developers.squarespace.com/commerce-apis/~schemas#productlistresponsev2) --------------------------------------------------------------------------------------------------------- `products` ​array ProductMeasurements[](https://developers.squarespace.com/commerce-apis/~schemas#productmeasurements) ----------------------------------------------------------------------------------------------------- `dimensions` ​[ProductDimensions](https://developers.squarespace.com/commerce-apis/~schemas#productdimensions) Physical dimensions of the variant. `weight` ​[ProductWeight](https://developers.squarespace.com/commerce-apis/~schemas#productweight) Weight of the variant. ProductPricing[](https://developers.squarespace.com/commerce-apis/~schemas#productpricing) ------------------------------------------------------------------------------------------- `basePrice` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `onSale` ​boolean Indicates whether the variant is sold according to its sale price. Present for PHYSICAL products only. `salePrice` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value ProductStock[](https://developers.squarespace.com/commerce-apis/~schemas#productstock) --------------------------------------------------------------------------------------- `quantity` ​integer · int32 Number of units that can be purchased. `unlimited` ​boolean Indicates whether the variant has unlimited stock. ProductType[](https://developers.squarespace.com/commerce-apis/~schemas#producttype) ------------------------------------------------------------------------------------- string · enum Enum values: PHYSICAL DIGITAL Product type indicator. Value may be: `PHYSICAL` or `DIGITAL`. ProductTypeV2[](https://developers.squarespace.com/commerce-apis/~schemas#producttypev2) ----------------------------------------------------------------------------------------- string · enum Enum values: PHYSICAL SERVICE GIFT\_CARD DIGITAL ProductV2[](https://developers.squarespace.com/commerce-apis/~schemas#productv2) --------------------------------------------------------------------------------- `createdOn` ​string · date-time · required `id` ​string · required `modifiedOn` ​string · date-time · required `storePageId` ​string · required `type` ​[ProductTypeV2](https://developers.squarespace.com/commerce-apis/~schemas#producttypev2)  · enum · required Enum values: PHYSICAL SERVICE GIFT\_CARD DIGITAL `description` ​string `images` ​[ProductImage\[\]](https://developers.squarespace.com/commerce-apis/~schemas#productimage) `isVisible` ​boolean `name` ​string `seoOptions` ​[SeoOptions](https://developers.squarespace.com/commerce-apis/~schemas#seooptions) Options for search engine optimization. `tags` ​string\[\] `url` ​string `urlSlug` ​string ProductVariant[](https://developers.squarespace.com/commerce-apis/~schemas#productvariant) ------------------------------------------------------------------------------------------- `attributes` ​object Specifies attribute-value pairs for the variant. Present for PHYSICAL products only. `id` ​string Unique ProductVariant id. `image` ​[ProductImage](https://developers.squarespace.com/commerce-apis/~schemas#productimage) Product image assigned to the variant. `pricing` ​[ProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#productpricing) Present for DIGITAL products only. Digital products don't have variants, so pricing is at the product level. `shippingMeasurements` ​[ProductMeasurements](https://developers.squarespace.com/commerce-apis/~schemas#productmeasurements) Measurements of the variant when it's shipped. Present for PHYSICAL products only. `sku` ​string Merchant-defined code that identifies the product variant. `stock` ​[ProductStock](https://developers.squarespace.com/commerce-apis/~schemas#productstock) Available stock for the variant. Present for PHYSICAL products only. ProductVariantV2[](https://developers.squarespace.com/commerce-apis/~schemas#productvariantv2) ----------------------------------------------------------------------------------------------- `id` ​string `image` ​[ProductImage](https://developers.squarespace.com/commerce-apis/~schemas#productimage) Product image assigned to the variant. `sku` ​string oneOf Exactly one variant **must match**. #### Decision Table | Variant | Matching Criteria | | --- | --- | | PhysicalProductVariant | type = object | | GiftCardProductVariant | type = object | | ServiceProductVariant | type = object | **Properties for PhysicalProductVariant:** [PhysicalProductVariant](https://developers.squarespace.com/commerce-apis/~schemas#physicalproductvariant) `attributes` ​object `gtin` ​string `id` ​string `image` ​[ProductImage](https://developers.squarespace.com/commerce-apis/~schemas#productimage) Product image assigned to the variant. `mpn` ​string `pricing` ​[FullProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#fullproductpricing) `shippingMeasurements` ​[ProductMeasurements](https://developers.squarespace.com/commerce-apis/~schemas#productmeasurements) Measurements of the variant when it's shipped. Present for PHYSICAL products only. `sku` ​string `stock` ​[ProductStock](https://developers.squarespace.com/commerce-apis/~schemas#productstock) Available stock for the variant. Present for PHYSICAL products only. ProductWeight[](https://developers.squarespace.com/commerce-apis/~schemas#productweight) ----------------------------------------------------------------------------------------- `unit` ​[ProductWeightUnit](https://developers.squarespace.com/commerce-apis/~schemas#productweightunit)  · enum Unit of measurement. Supported values: `KILOGRAM`, `POUND`. Enum values: KILOGRAM POUND `value` ​number · float Weight amount. ProductWeightUnit[](https://developers.squarespace.com/commerce-apis/~schemas#productweightunit) ------------------------------------------------------------------------------------------------- string · enum Enum values: KILOGRAM POUND Unit of measurement. Supported values: `KILOGRAM`, `POUND`. Profile[](https://developers.squarespace.com/commerce-apis/~schemas#profile) ----------------------------------------------------------------------------- `acceptsMarketing` ​boolean Indicates whether the profile opted to receive marketing. `address` ​[Address](https://developers.squarespace.com/commerce-apis/~schemas#address) Customer's shipping address provided at checkout or, for recurring subscription orders, the customer's current mailing address. `createdOn` ​string · date-time ISO 8601 UTC date and time string; represents when the profile was created. `email` ​string Profile email address. `firstName` ​string Profile first name. `hasAccount` ​boolean Indicates whether the profile has an account with the website. `id` ​string Unique Profile id. `isCustomer` ​boolean Indicates whether the profile has any commerce orders or donations with the website. `lastName` ​string Profile last name. `transactionsSummary` ​[TransactionsSummary](https://developers.squarespace.com/commerce-apis/~schemas#transactionssummary) Summary of profile's commerce transactions. If a profile has no commerce transactions, the object is still returned with null or 0 values. This information is calculated asynchronously; there may be a slight delay between when an order is created, and when it's reflected in the object. ProfileListResponse[](https://developers.squarespace.com/commerce-apis/~schemas#profilelistresponse) ----------------------------------------------------------------------------------------------------- `profiles` ​[Profile\[\]](https://developers.squarespace.com/commerce-apis/~schemas#profile) PromoCodeTrigger[](https://developers.squarespace.com/commerce-apis/~schemas#promocodetrigger) ----------------------------------------------------------------------------------------------- `type` ​string · required `promoCode` ​string · pattern: `^[A-Za-z0-9_\-]{1,50…` · required Shopper-entered promo code. Required, non-empty, 1–50 characters; allowed characters: letters, digits, underscore, hyphen. QueryContactsRequest[](https://developers.squarespace.com/commerce-apis/~schemas#querycontactsrequest) ------------------------------------------------------------------------------------------------------- `acceptsMarketingWithDate` ​[AcceptsMarketingWithDate](https://developers.squarespace.com/commerce-apis/~schemas#acceptsmarketingwithdate) Contact's marketing settings with joined on date `cursor` ​string The cursor for the next page of results. Use the value of `pagination.nextPageCursor` from the previous response. `donationAmount` ​[IntegerFilter](https://developers.squarespace.com/commerce-apis/~schemas#integerfilter) Object for filtering by a min and max integer `donationCount` ​[IntegerFilter](https://developers.squarespace.com/commerce-apis/~schemas#integerfilter) Object for filtering by a min and max integer `firstDonationOn` ​[DateFilter](https://developers.squarespace.com/commerce-apis/~schemas#datefilter) Object for filtering by before and after dates `firstOrderOn` ​[DateFilter](https://developers.squarespace.com/commerce-apis/~schemas#datefilter) Object for filtering by before and after dates `lastDonationOn` ​[DateFilter](https://developers.squarespace.com/commerce-apis/~schemas#datefilter) Object for filtering by before and after dates `lastOrderOn` ​[DateFilter](https://developers.squarespace.com/commerce-apis/~schemas#datefilter) Object for filtering by before and after dates `orderAmount` ​[IntegerFilter](https://developers.squarespace.com/commerce-apis/~schemas#integerfilter) Object for filtering by a min and max integer `orderCount` ​[IntegerFilter](https://developers.squarespace.com/commerce-apis/~schemas#integerfilter) Object for filtering by a min and max integer `pageSize` ​integer · int32 · min: 1 · max: 1000 The number of contacts to return per request. Default: 50 `searchString` ​string Search string for Name and Email address `sortDirection` ​string · enum Direction to sort results, ASCENDING or DESCENDING Enum values: ASCENDING DESCENDING `sortField` ​string · enum Field to sort results by Enum values: ID CREATED\_ON EMAIL ACCEPTS\_MARKETING\_JOINED\_ON FIRST\_NAME LAST\_NAME ORDER\_COUNT LAST\_ORDER\_ON show 4 more RetrieveTransactionsSummariesRequest[](https://developers.squarespace.com/commerce-apis/~schemas#retrievetransactionssummariesrequest) --------------------------------------------------------------------------------------------------------------------------------------- `contactIds` ​string\[\] · minItems: 1 · maxItems: 1000 · required `groupBy` ​string · enum · minLength: 1 · required Field to group results by, should be a contactId Enum values: contactId Example: contactId RetrieveTransactionsSummariesResponse[](https://developers.squarespace.com/commerce-apis/~schemas#retrievetransactionssummariesresponse) ----------------------------------------------------------------------------------------------------------------------------------------- `transactionsSummaryWrappers` ​[TransactionsSummaryWrapper\[\]](https://developers.squarespace.com/commerce-apis/~schemas#transactionssummarywrapper) List of transaction summary wrappers SeoOptions[](https://developers.squarespace.com/commerce-apis/~schemas#seooptions) ----------------------------------------------------------------------------------- `description` ​string `title` ​string ServiceProduct[](https://developers.squarespace.com/commerce-apis/~schemas#serviceproduct) ------------------------------------------------------------------------------------------- `createdOn` ​string · date-time · required `id` ​string · required `modifiedOn` ​string · date-time · required `storePageId` ​string · required `type` ​[ProductTypeV2](https://developers.squarespace.com/commerce-apis/~schemas#producttypev2)  · enum · required Enum values: PHYSICAL SERVICE GIFT\_CARD DIGITAL `description` ​string `images` ​[ProductImage\[\]](https://developers.squarespace.com/commerce-apis/~schemas#productimage) `isVisible` ​boolean `name` ​string `seoOptions` ​[SeoOptions](https://developers.squarespace.com/commerce-apis/~schemas#seooptions) Options for search engine optimization. `tags` ​string\[\] `url` ​string `urlSlug` ​string `variantAttributes` ​string\[\] `variants` ​[ServiceProductVariant\[\]](https://developers.squarespace.com/commerce-apis/~schemas#serviceproductvariant) ServiceProductVariant[](https://developers.squarespace.com/commerce-apis/~schemas#serviceproductvariant) --------------------------------------------------------------------------------------------------------- `attributes` ​object `id` ​string `image` ​[ProductImage](https://developers.squarespace.com/commerce-apis/~schemas#productimage) Product image assigned to the variant. `pricing` ​[FullProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#fullproductpricing) `sku` ​string `stock` ​[ProductStock](https://developers.squarespace.com/commerce-apis/~schemas#productstock) Available stock for the variant. Present for PHYSICAL products only. ShippingLine[](https://developers.squarespace.com/commerce-apis/~schemas#shippingline) --------------------------------------------------------------------------------------- `amount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `method` ​string Description of the shipping option Example: UPS Ground ShopperFulfillmentNotificationBehavior[](https://developers.squarespace.com/commerce-apis/~schemas#shopperfulfillmentnotificationbehavior) ------------------------------------------------------------------------------------------------------------------------------------------- string · enum Enum values: SEND SKIP Indicates whether to send a fulfillment notification email to the customer. Value may be SEND or SKIP. SimpleProductPricing[](https://developers.squarespace.com/commerce-apis/~schemas#simpleproductpricing) ------------------------------------------------------------------------------------------------------- `basePrice` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value StandardErrorPayload[](https://developers.squarespace.com/commerce-apis/~schemas#standarderrorpayload) ------------------------------------------------------------------------------------------------------- `contextId` ​string `details` ​object `message` ​string `subtype` ​string · enum Enum values: MISSING\_ARGUMENT INVALID\_ARGUMENT INVALID\_CONTENT\_TYPE CONCURRENT\_MODIFICATION INSUFFICIENT\_STOCK STOCK\_NOT\_TRACKED STOCK\_EXCEEDS\_MAX CURRENCY\_MISMATCH show 20 more `type` ​string · enum Enum values: INVALID\_REQUEST\_ERROR AUTHORIZATION\_ERROR WEBSITE\_EXPIRED METHOD\_NOT\_ALLOWED CONFLICT TOO\_MANY\_REQUESTS SERVER\_ERROR SERVICE\_UNAVAILABLE StorePage[](https://developers.squarespace.com/commerce-apis/~schemas#storepage) --------------------------------------------------------------------------------- `id` ​string `isEnabled` ​boolean `title` ​string `urlSlug` ​string SubscriptionOptions[](https://developers.squarespace.com/commerce-apis/~schemas#subscriptionoptions) ----------------------------------------------------------------------------------------------------- `type` ​string · enum · required Defines how the discount applies to subscription payments. Enum values: EXCLUDED ALL\_PAYMENTS LIMITED\_PAYMENTS TaxInterpretation[](https://developers.squarespace.com/commerce-apis/~schemas#taxinterpretation) ------------------------------------------------------------------------------------------------- string · enum Enum values: INCLUSIVE EXCLUSIVE Indicates that lineItems.unitPricePaid includes tax. Values may be EXCLUSIVE or INCLUSIVE. TransactionDiscount[](https://developers.squarespace.com/commerce-apis/~schemas#transactiondiscount) ----------------------------------------------------------------------------------------------------- `amount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `description` ​string Discount description. Example: Discount description `name` ​string Discount name. Example: Sales Discount TransactionDocument[](https://developers.squarespace.com/commerce-apis/~schemas#transactiondocument) ----------------------------------------------------------------------------------------------------- `createdOn` ​string · date-time ISO 8601 UTC date and time string; represents when the Document was created. Example: 2019-11-18T21:20:05.354Z `customerEmail` ​string · email Customer or donor email address. May be null for point of sale orders because email wasn't collected. Example: customer@squarespace.com `discounts` ​[TransactionDiscount\[\]](https://developers.squarespace.com/commerce-apis/~schemas#transactiondiscount) Array of discounts for an order payment transaction; empty for donations. `id` ​string Unique Document id. Example: a7e4c6b5-d1fe-4e42-a932-f185b4b86829 `modifiedOn` ​string · date-time ISO 8601 UTC date and time string; represents when the Document was last modified. Example: 2019-11-18T21:23:02.87Z `paymentGatewayError` ​[PaymentGatewayError](https://developers.squarespace.com/commerce-apis/~schemas#paymentgatewayerror)  · enum Captures errors from the payment gateway; value is null if not applicable. Enum values: GATEWAY\_FEE\_PROCEESING\_ERROR GATEWAY\_API\_PERMISSION\_ERROR GATEWAY\_DISCONNNECTED `payments` ​[TransactionPayment\[\]](https://developers.squarespace.com/commerce-apis/~schemas#transactionpayment) Array of payment transactions for the order or donation. `salesLineItems` ​[TransactionSalesLineItem\[\]](https://developers.squarespace.com/commerce-apis/~schemas#transactionsaleslineitem) Array of sales items for an order payment transaction; empty for donations. `salesOrderId` ​string Unique order id; not applicable if payment transaction is a donation. Example: 5d71991aac180c3e7857e1df `shippingLineItems` ​[TransactionShippingLineItem\[\]](https://developers.squarespace.com/commerce-apis/~schemas#transactionshippinglineitem) Array of shipping line items. `total` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `totalNetPayment` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `totalNetSales` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `totalNetShipping` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `totalSales` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `totalTaxes` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `voided` ​boolean Flag; indicates order cancellation. TransactionListResponse[](https://developers.squarespace.com/commerce-apis/~schemas#transactionlistresponse) ------------------------------------------------------------------------------------------------------------- `documents` ​[TransactionDocument\[\]](https://developers.squarespace.com/commerce-apis/~schemas#transactiondocument) Array of Document resources. TransactionPayment[](https://developers.squarespace.com/commerce-apis/~schemas#transactionpayment) --------------------------------------------------------------------------------------------------- `amount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `creditCardType` ​string Payment credit card type; possible values: VISA, MASTERCARD, DISCOVER, AMEX, JCB, and OTHER. null if credit card processing isn't available for the payment gateway. Example: VISA `externalCustomerId` ​string Unique customer id for the payment transaction provided by the payment gateway. Value is null if not available. `externalTransactionId` ​string Unique id for the payment transaction provided by the payment gateway. Example: ch\_1FFCJCLMG4qggZ0BzchTZjwR `externalTransactionProperties` ​[ExternalTransactionProperty\[\]](https://developers.squarespace.com/commerce-apis/~schemas#externaltransactionproperty) Array of properties for the payment transaction provided by the payment gateway. Properties are listed in key/value pairs. `giftCardId` ​string · uuid Unique id for a Squarespace gift card. Value is null if a gift card was not used. Example: ece69479-50bc-4763-9067-4473f3abcf83 `id` ​string Unique payment id. Example: ece69479-50bc-4763-9067-4473f3abcf83 `netAmount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `paidOn` ​string · date-time ISO 8601 UTC date and time string; represents when the payment was made. Example: 2019-09-05T23:24:09.845Z `processingFees` ​[TransactionProcessingFee\[\]](https://developers.squarespace.com/commerce-apis/~schemas#transactionprocessingfee) Array of processing fees associated with the payment. `provider` ​string Payment gateway used for processing. Example: STRIPE `refundedAmount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `refunds` ​[TransactionRefund\[\]](https://developers.squarespace.com/commerce-apis/~schemas#transactionrefund) Array of refunds for the payment transaction. TransactionProcessingFee[](https://developers.squarespace.com/commerce-apis/~schemas#transactionprocessingfee) --------------------------------------------------------------------------------------------------------------- `amount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `amountGatewayCurrency` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `exchangeRate` ​number Foreign exchange rate between the payment gateway's and payment's currencies; determined when the payment is processed. Example: 1 `feeRefunds` ​[TransactionProcessingFeeRefund\[\]](https://developers.squarespace.com/commerce-apis/~schemas#transactionprocessingfeerefund) Array of processing fee refunds for the payment. `id` ​string Unique processing fee id. Example: 2Jdsno3mdk `netAmount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `netAmountGatewayCurrency` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `refundedAmount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `refundedAmountGatewayCurrency` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value TransactionProcessingFeeRefund[](https://developers.squarespace.com/commerce-apis/~schemas#transactionprocessingfeerefund) --------------------------------------------------------------------------------------------------------------------------- `amount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `amountGatewayCurrency` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `exchangeRate` ​number Foreign exchange rate between the payment gateway's and payment's currencies; determined when the payment is processed. Example: 1 `externalTransactionId` ​string Unique id for the processing fee refund transaction provided by the payment gateway. Example: 3fjowGck2f `id` ​string Unique processing fee refund id. Example: c413a46c-b3e8-426d-8e0f-a4bc7a18cdd0 `refundedOn` ​string · date-time ISO 8601 UTC date and time string; represents when the processing fee refund was issued. Example: 2019-11-18T21:22:06.5Z TransactionRefund[](https://developers.squarespace.com/commerce-apis/~schemas#transactionrefund) ------------------------------------------------------------------------------------------------- `amount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `externalTransactionId` ​string Unique id for the refund transaction provided by the payment gateway. Example: re\_1Flhp8J4wh083J8f7qYtzU9m `id` ​string Unique refund id. Example: cfdb6b87-64bf-461a-b48b-eca7bd2389fc `refundedOn` ​string · date-time ISO 8601 UTC date and time string; represents refund issue date. Example: 2019-11-18T21:22:06.5Z TransactionSalesLineItem[](https://developers.squarespace.com/commerce-apis/~schemas#transactionsaleslineitem) --------------------------------------------------------------------------------------------------------------- `discountAmount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `id` ​string Unique id for the sales item. Example: d93f9637-fba6-4e8b-a1f3-24008f60c774 `taxes` ​[TransactionTax\[\]](https://developers.squarespace.com/commerce-apis/~schemas#transactiontax) Array of taxes for the sale item. `total` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `totalNetSales` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `totalSales` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value TransactionShippingLineItem[](https://developers.squarespace.com/commerce-apis/~schemas#transactionshippinglineitem) --------------------------------------------------------------------------------------------------------------------- `amount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `description` ​string Description of the shipping line item as defined by the Squarespace merchant. Example: USPS Flat Rate `discountAmount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `id` ​string Unique id for the shipping line item. Example: bd63d55e-0066-400e-9aa9-e75d4e6215b0 `netAmount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `taxes` ​[TransactionTax\[\]](https://developers.squarespace.com/commerce-apis/~schemas#transactiontax) Array of taxes for the shipping line item. TransactionTax[](https://developers.squarespace.com/commerce-apis/~schemas#transactiontax) ------------------------------------------------------------------------------------------- `amount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `jurisdiction` ​string Tax jurisdiction in COUNTRY:{value},STATE:{value},LOCAL:{value} format. Examples: COUNTRY:US, COUNTRY:US,STATE:NY, and COUNTRY:US,STATE:NY,LOCAL:10001. Example: COUNTRY:US,STATE:NY,LOCAL:10001 `name` ​string Tax classification as defined by the Squarespace merchant. Example: Local Sales Tax `rate` ​string Tax rate as a percent. For example, a value of 7.00 is a 7% tax. Example: 10.0 TransactionsSummary[](https://developers.squarespace.com/commerce-apis/~schemas#transactionssummary) ----------------------------------------------------------------------------------------------------- `donationCount` ​integer · int32 Count of donations submitted. `firstDonationSubmittedOn` ​string · date-time ISO 8601 UTC date and time string; represents when the profile's first donation was submitted. `firstOrderSubmittedOn` ​string · date-time ISO 8601 UTC date and time string; represents when the profile's first order was submitted. `lastDonationSubmittedOn` ​string · date-time ISO 8601 UTC date and time string; represents when the profile's latest donation was submitted. `lastOrderSubmittedOn` ​string · date-time ISO 8601 UTC date and time string; represents when the profile's latest order was submitted. `orderCount` ​integer · int32 Count of orders submitted. `totalDonationAmount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `totalOrderAmount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `totalRefundAmount` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value TransactionsSummaryWrapper[](https://developers.squarespace.com/commerce-apis/~schemas#transactionssummarywrapper) ------------------------------------------------------------------------------------------------------------------- `contactId` ​string Unique contact identifier Example: a6e74e0c-2b4a-4b63-b4a3-9c5d1f3e8a7b `transactionsSummary` ​[TransactionsSummary](https://developers.squarespace.com/commerce-apis/~schemas#transactionssummary) Summary of profile's commerce transactions. If a profile has no commerce transactions, the object is still returned with null or 0 values. This information is calculated asynchronously; there may be a slight delay between when an order is created, and when it's reflected in the object. UpdateAddressBookEntryRequest[](https://developers.squarespace.com/commerce-apis/~schemas#updateaddressbookentryrequest) ------------------------------------------------------------------------------------------------------------------------- `address` ​[ContactAddress](https://developers.squarespace.com/commerce-apis/~schemas#contactaddress)  · required Address properties for a contact. `defaultShipping` ​boolean Whether this entry should be the default shipping address. When updating the entry that is currently the default, changing this value from true to false has no effect. UpdateAddressBookEntryResponse[](https://developers.squarespace.com/commerce-apis/~schemas#updateaddressbookentryresponse) --------------------------------------------------------------------------------------------------------------------------- `addressBookEntry` ​[AddressBookEntry](https://developers.squarespace.com/commerce-apis/~schemas#addressbookentry) An address book entry for a contact. UpdateProductImageOrderRequest[](https://developers.squarespace.com/commerce-apis/~schemas#updateproductimageorderrequest) --------------------------------------------------------------------------------------------------------------------------- `afterImageId` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. UpdateProductImageRequest[](https://developers.squarespace.com/commerce-apis/~schemas#updateproductimagerequest) ----------------------------------------------------------------------------------------------------------------- `altText` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. UpdateProductMeasurements[](https://developers.squarespace.com/commerce-apis/~schemas#updateproductmeasurements) ----------------------------------------------------------------------------------------------------------------- `dimensions` ​[ChangeProductDimensions](https://developers.squarespace.com/commerce-apis/~schemas#changeproductdimensions) `weight` ​[ChangeProductWeight](https://developers.squarespace.com/commerce-apis/~schemas#changeproductweight) UpdateProductPricing[](https://developers.squarespace.com/commerce-apis/~schemas#updateproductpricing) ------------------------------------------------------------------------------------------------------- `basePrice` ​[ChangeMonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#changemonetaryamount) `onSale` ​[ChangeBoolean](https://developers.squarespace.com/commerce-apis/~schemas#changeboolean) `salePrice` ​[ChangeMonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#changemonetaryamount) UpdateProductRequest[](https://developers.squarespace.com/commerce-apis/~schemas#updateproductrequest) ------------------------------------------------------------------------------------------------------- `description` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. `isVisible` ​[ChangeBoolean](https://developers.squarespace.com/commerce-apis/~schemas#changeboolean) `name` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. `pricing` ​[ChangeUpdateProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#changeupdateproductpricing) Pricing data for the product. `productAttributeNames` ​[ChangeListString](https://developers.squarespace.com/commerce-apis/~schemas#changeliststring) Optional; list of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. `seoData` ​[ChangeSeoOptions](https://developers.squarespace.com/commerce-apis/~schemas#changeseooptions) Options for search engine optimization. `tags` ​[ChangeListString](https://developers.squarespace.com/commerce-apis/~schemas#changeliststring) Optional; list of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update. `urlSlug` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. UpdateProductVariantRequest[](https://developers.squarespace.com/commerce-apis/~schemas#updateproductvariantrequest) --------------------------------------------------------------------------------------------------------------------- `attributes` ​[ChangeMapStringString](https://developers.squarespace.com/commerce-apis/~schemas#changemapstringstring) Specifies attribute-value pairs for the variant. Supported for PHYSICAL products only. `pricing` ​[ChangeUpdateProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#changeupdateproductpricing) Pricing data for the product. `shippingMeasurements` ​[ChangeUpdateProductMeasurements](https://developers.squarespace.com/commerce-apis/~schemas#changeupdateproductmeasurements) Measurements of the variant when it's shipped. Supported for PHYSICAL products only. `sku` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. UpdateVariantRequestV2[](https://developers.squarespace.com/commerce-apis/~schemas#updatevariantrequestv2) ----------------------------------------------------------------------------------------------------------- `attributes` ​[ChangeMapStringString](https://developers.squarespace.com/commerce-apis/~schemas#changemapstringstring) Specifies attribute-value pairs for the variant. Supported for PHYSICAL products only. `gtin` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. `mpn` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. `pricing` ​[ChangeUpdateProductPricing](https://developers.squarespace.com/commerce-apis/~schemas#changeupdateproductpricing) Pricing data for the product. `shippingMeasurements` ​[ChangeUpdateProductMeasurements](https://developers.squarespace.com/commerce-apis/~schemas#changeupdateproductmeasurements) Measurements of the variant when it's shipped. Supported for PHYSICAL products only. `sku` ​[ChangeString](https://developers.squarespace.com/commerce-apis/~schemas#changestring) Optional; HTTPS URL to receive webhook notifications. UploadProductImageResponse[](https://developers.squarespace.com/commerce-apis/~schemas#uploadproductimageresponse) ------------------------------------------------------------------------------------------------------------------- `imageId` ​string Unique ProductImage id. VariantOption[](https://developers.squarespace.com/commerce-apis/~schemas#variantoption) ----------------------------------------------------------------------------------------- `optionName` ​string The name of the option (e.g. color, size, material) Example: Size `value` ​string The shopper-selected value for the option (e.g. red, small, cotton) Example: Large WebsiteProfile[](https://developers.squarespace.com/commerce-apis/~schemas#websiteprofile) ------------------------------------------------------------------------------------------- `currency` ​string `id` ​string `language` ​string `location` ​[Location](https://developers.squarespace.com/commerce-apis/~schemas#location) `measurementStandard` ​[MeasurementStandard](https://developers.squarespace.com/commerce-apis/~schemas#measurementstandard)  · enum Enum values: IMPERIAL METRIC `siteId` ​string `timeZone` ​string `title` ​string `url` ​string --- # Unknown ```json { "openapi": "3.1.1", "info": { "title": "Commerce API", "version": "2" }, "servers": [ { "url": "https://api.squarespace.com", "description": "Commerce API" } ], "security": [ { "Authorization": [] } ], "tags": [ { "description": "Manage customer contacts and address book entries for a website: create, read, update, delete, and query contacts; maintain addresses for shipping and fulfillment.", "name": "Contacts", "x-zudoku-collapsed": true }, { "description": "Query analytics for a website", "name": "Analytics", "x-zudoku-collapsed": true }, { "description": "Manage discounts for a website.", "name": "Discounts", "x-zudoku-collapsed": true }, { "name": "Products", "x-zudoku-collapsed": true }, { "name": "Websites", "x-zudoku-collapsed": true }, { "name": "Inventory", "x-zudoku-collapsed": true }, { "name": "Orders", "x-zudoku-collapsed": true }, { "name": "Transactions", "x-zudoku-collapsed": true }, { "name": "Profiles", "x-zudoku-collapsed": true }, { "name": "WebhookSubscriptions", "x-zudoku-collapsed": true } ], "paths": { "/v1/analytics/transaction-summaries": { "post": { "operationId": "getTransactionsSummaries", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RetrieveTransactionsSummariesRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RetrieveTransactionsSummariesResponse" } } }, "description": "Transaction summaries retrieved" }, "400": { "description": "contactIds shouldn't be empty or too big, groupBy should have a valid value" } }, "summary": "Retrieve transaction summaries grouped by contact", "tags": [ "Analytics" ], "parameters": [ { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ] } }, "/v1/commerce/discounts": { "get": { "description": "Returns a paginated list of discounts for the website associated with the access token. Requires website.discounts.read or website.discounts (OAuth or API key).", "operationId": "listDiscounts", "parameters": [ { "description": "Sort field for the result set.", "in": "query", "name": "sortBy", "required": false, "schema": { "type": "string", "default": "CREATED_ON", "enum": [ "CREATED_ON", "PROMO_CODE", "USES_COUNT" ] } }, { "description": "Sort direction.", "in": "query", "name": "sortDirection", "required": false, "schema": { "type": "string", "default": "DESCENDING", "enum": [ "ASCENDING", "DESCENDING" ] } }, { "description": "Free-text search across a discount's name and promo code.", "in": "query", "name": "search", "required": false, "schema": { "type": "string" } }, { "description": "Filter by discount lifecycle status.", "in": "query", "name": "status", "required": false, "schema": { "type": "string", "default": "ALL", "enum": [ "ALL", "ACTIVE", "EXPIRED", "SCHEDULED" ] } }, { "description": "Filter by one or more criteria types (comma-separated). When omitted, defaults to all allowable values.", "in": "query", "name": "criteria", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "ANY_ORDER", "CART_TOTAL", "PRODUCT" ] }, "default": [ "ANY_ORDER", "CART_TOTAL", "PRODUCT" ] } }, { "description": "Filter by one or more template types (comma-separated). When omitted, defaults to all allowable values.", "in": "query", "name": "template", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "FIXED_AMOUNT", "PERCENTAGE" ] }, "default": [ "FIXED_AMOUNT", "PERCENTAGE" ] } }, { "description": "Filter by one or more trigger types (comma-separated): AUTO (auto-applied) or CODE (promo code). When omitted, or when all allowable values are supplied, defaults to all allowable values.", "in": "query", "name": "trigger", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "AUTO", "CODE" ] }, "enum": [ "AUTO", "CODE" ] } }, { "description": "When true, only discounts with limited-use semantics (per product rules) are returned.", "in": "query", "name": "limitedUseOnly", "required": false, "schema": { "type": "boolean", "default": false } }, { "description": "Zero-based offset into the result set. Must be non-negative. Default 0.", "in": "query", "name": "offset", "required": false, "schema": { "minimum": 0, "type": "integer", "format": "int32", "default": 0 } }, { "description": "Page size (1–1000; default 50).", "in": "query", "name": "limit", "required": false, "schema": { "maximum": 1000, "minimum": 1, "type": "integer", "format": "int32", "default": 50 } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedDiscountListResponse" } } }, "description": "Paginated discounts for the website (empty page is a successful response)." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Invalid query parameters (e.g. limit over cap, unknown enum value)." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Forbidden. Insufficient scope (OAuth or API key), or the requested resource is not accessible for the authenticated website." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Rate limit exceeded." } }, "summary": "List discounts", "tags": [ "Discounts" ] }, "post": { "description": "Creates a discount. A successful request returns the created Discount resource.", "operationId": "createDiscount", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDiscountRequest" } } }, "description": "The discount to create.", "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscountResponse" } } }, "description": "The created discount." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. Missing or invalid fields, invalid criteria/template pairing, or promo code reserved for gift cards." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Forbidden. Insufficient scope (OAuth or API key), or the requested resource is not accessible for the authenticated website." }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Conflict. The promo code is already in use by another discount, or the maximum number of auto-trigger discounts has been reached." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Rate limit exceeded." } }, "summary": "Create discount", "tags": [ "Discounts" ], "parameters": [ { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ] } }, "/v1/commerce/discounts/{discountId}": { "delete": { "description": "Deletes the discount for the given discount ID. Deletion is permitted for any discount owned by the website, including discounts whose criteria, template, or trigger types are not supported by this API version; no type validation is performed.", "operationId": "deleteDiscount", "parameters": [ { "description": "The discount's ID.", "in": "path", "name": "discountId", "required": true, "schema": { "type": "string" }, "examples": { "default": { "value": "64b8f4e3d9a2ca6f41b25e3c" } } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "204": { "description": "No content. The discount was deleted successfully." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Forbidden. Insufficient scope (OAuth or API key), or the requested resource is not accessible for the authenticated website." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. The requested discount was not found." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Rate limit exceeded." } }, "summary": "Delete discount", "tags": [ "Discounts" ] }, "get": { "description": "Returns the discount for the given discount ID for the website associated with the access token. Requires website.discounts.read or website.discounts (OAuth or API key).", "operationId": "getDiscount", "parameters": [ { "description": "The discount's ID", "in": "path", "name": "discountId", "required": true, "schema": { "type": "string" }, "examples": { "default": { "value": "64b8f4e3d9a2ca6f41b25e3c" } } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscountResponse" } } }, "description": "Discount found." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Forbidden. Insufficient scope (OAuth or API key), or the requested resource is not accessible for the authenticated website." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Discount not found for this website." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Rate limit exceeded." } }, "summary": "Get discount", "tags": [ "Discounts" ] }, "put": { "description": "Replaces the discount for the given discount ID for the website associated with the access token.", "operationId": "updateDiscount", "parameters": [ { "description": "The discount's unique identifier.", "in": "path", "name": "discountId", "required": true, "schema": { "type": "string" }, "examples": { "default": { "value": "64b8f4e3d9a2ca6f41b25e3c" } } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Discount" } } }, "description": "The discount replacement payload.", "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscountResponse" } } }, "description": "The updated discount." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. Missing or invalid fields, invalid criteria/template pairing, or promo code reserved for gift cards." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Forbidden. Insufficient scope (OAuth or API key), or the requested resource is not accessible for the authenticated website." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Discount not found for this website." }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Conflict. The promo code is already in use by another discount, or the maximum number of auto-trigger discounts has been reached." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Rate limit exceeded." } }, "summary": "Update discount", "tags": [ "Discounts" ] } }, "/v1/contacts": { "get": { "description": "Returns a paginated list of contacts for the website. Requires OAuth website scope website.contacts.read or website.contacts, or API key scope CONTACT_READONLY or CONTACT, or OAuth website scope website.profiles.read or website.profiles (OAuth only).", "operationId": "getContacts", "parameters": [ { "description": "number of contacts to retrieve per request", "in": "query", "name": "pageSize", "required": false, "schema": { "maximum": 1000, "minimum": 0, "type": "integer", "format": "int32", "default": 50 } }, { "description": "where next page of results begins. should be {pagination.nextPageCursor} from previous response.", "in": "query", "name": "cursor", "required": false, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedGetContactsResponse" } } }, "description": "A paginated list of contacts." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Invalid pagination parameters: page size out of range or cursor not from a previous response." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Forbidden. Insufficient scope (OAuth or API key), or the requested resource is not accessible for the authenticated website." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Too many requests. The rate limit for this endpoint has been exceeded." } }, "summary": "List contacts", "tags": [ "Contacts" ] }, "post": { "description": "Creates a new contact. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only).", "operationId": "createContact", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateContactRequest" } } }, "description": "The contact to create.", "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateContactResponse" } } }, "description": "The created contact." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Invalid input or malformed JSON." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Forbidden. Insufficient scope (OAuth or API key), or the requested resource is not accessible for the authenticated website." }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "A contact with the same unique fields already exists." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Too many requests. The rate limit for this endpoint has been exceeded." } }, "summary": "Create contact", "tags": [ "Contacts" ], "parameters": [ { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ] } }, "/v1/contacts/query": { "post": { "description": "Returns a paginated list of contacts matching filters and sort options in the request body. Requires OAuth website scope website.contacts.read or website.contacts, or API key scope CONTACT_READONLY or CONTACT, or OAuth website scope website.profiles.read or website.profiles (OAuth only).", "operationId": "queryContacts", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueryContactsRequest" } } }, "description": "Filters and sort order for the contact query.", "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedQueryContactsResponse" } } }, "description": "A paginated list of contacts matching the query." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Invalid input or malformed JSON." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Forbidden. Insufficient scope (OAuth or API key), or the requested resource is not accessible for the authenticated website." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Too many requests. The rate limit for this endpoint has been exceeded." } }, "summary": "Query contacts", "tags": [ "Contacts" ], "parameters": [ { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ] } }, "/v1/contacts/{contactId}": { "delete": { "description": "Deletes the contact for the given contact ID. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only).", "operationId": "deleteContact", "parameters": [ { "description": "The contact's ID.", "in": "path", "name": "contactId", "required": true, "schema": { "type": "string" }, "examples": { "default": { "value": "64a7e3d2c8f1b95e30a14d2b" } } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "204": { "description": "No content." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Forbidden. Insufficient scope (OAuth or API key), or the requested resource is not accessible for the authenticated website." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The contact was not found." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Too many requests. The rate limit for this endpoint has been exceeded." } }, "summary": "Delete contact", "tags": [ "Contacts" ] }, "get": { "description": "Returns the contact for the given contact ID. Requires OAuth website scope website.contacts.read or website.contacts, or API key scope CONTACT_READONLY or CONTACT, or OAuth website scope website.profiles.read or website.profiles (OAuth only).", "operationId": "getContact", "parameters": [ { "description": "The contact's ID.", "in": "path", "name": "contactId", "required": true, "schema": { "type": "string" }, "examples": { "default": { "value": "64a7e3d2c8f1b95e30a14d2b" } } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetContactResponse" } } }, "description": "The requested contact." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Forbidden. Insufficient scope (OAuth or API key), or the requested resource is not accessible for the authenticated website." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The contact was not found." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Too many requests. The rate limit for this endpoint has been exceeded." } }, "summary": "Get contact", "tags": [ "Contacts" ] }, "patch": { "description": "Updates a contact using JSON merge patch. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only).", "operationId": "patchContact", "parameters": [ { "description": "The contact's ID.", "in": "path", "name": "contactId", "required": true, "schema": { "type": "string" }, "examples": { "default": { "value": "64a7e3d2c8f1b95e30a14d2b" } } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "requestBody": { "content": { "application/merge-patch+json": { "schema": { "$ref": "#/components/schemas/PatchContactRequest" } } }, "description": "Fields to update on the contact.", "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PatchContactResponse" } } }, "description": "The updated contact." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Malformed syntax or invalid request body." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Forbidden. Insufficient scope (OAuth or API key), or the requested resource is not accessible for the authenticated website." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The contact was not found." }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The email address is already associated with another contact." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Too many requests. The rate limit for this endpoint has been exceeded." } }, "summary": "Update contact", "tags": [ "Contacts" ] } }, "/v1/contacts/{contactId}/address-book": { "get": { "description": "Returns paginated addresses for the contact. When there is at least one entry, exactly one is the default shipping address (defaultShippingAddressId and each entry's defaultShipping reflect this). The default shipping address (when present) is always included on the first page of results. Requires OAuth website scope website.contacts.read or website.contacts, or API key scope CONTACT_READONLY or CONTACT, or OAuth website scope website.profiles.read or website.profiles (OAuth only).", "operationId": "getAddressBook", "parameters": [ { "description": "The contact's ID.", "in": "path", "name": "contactId", "required": true, "schema": { "type": "string" }, "examples": { "default": { "value": "64a7e3d2c8f1b95e30a14d2b" } } }, { "description": "number of contacts to retrieve per request", "in": "query", "name": "pageSize", "required": false, "schema": { "maximum": 1000, "minimum": 0, "type": "integer", "format": "int32", "default": 50 } }, { "description": "where next page of results begins. should be {pagination.nextPageCursor} from previous response.", "in": "query", "name": "cursor", "required": false, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAddressBookResponse" } } }, "description": "Paginated list of the contact's addresses. When there is at least one entry, the first page always includes the default shipping address, and defaultShippingAddressId identifies it. On later pages, addressBookEntries is the next slice only; defaultShippingAddressId is present only when the default shipping entry appears in that slice." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Forbidden. Insufficient scope (OAuth or API key), or the requested resource is not accessible for the authenticated website." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The contact was not found." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Too many requests. The rate limit for this endpoint has been exceeded." } }, "summary": "Get address book", "tags": [ "Contacts" ] }, "post": { "description": "Creates a new address book entry for the contact. If this is the contact's only address book entry after creation, it becomes the default shipping address even when defaultShipping is false. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only).", "operationId": "createAddressBookEntry", "parameters": [ { "description": "The contact's ID.", "in": "path", "name": "contactId", "required": true, "schema": { "type": "string" }, "examples": { "default": { "value": "64a7e3d2c8f1b95e30a14d2b" } } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAddressBookEntryRequest" } } }, "description": "The address book entry to create.", "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAddressBookEntryResponse" } } }, "description": "The created address book entry." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Invalid input or malformed JSON." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Forbidden. Insufficient scope (OAuth or API key), or the requested resource is not accessible for the authenticated website." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The contact was not found." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Too many requests. The rate limit for this endpoint has been exceeded." } }, "summary": "Create address book entry", "tags": [ "Contacts" ] } }, "/v1/contacts/{contactId}/address-book/{addressBookEntryId}": { "delete": { "description": "Deletes the address book entry for the contact. If the deleted entry was the default shipping address, another entry is assigned as the default. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only).", "operationId": "deleteAddressBookEntry", "parameters": [ { "description": "The contact's ID.", "in": "path", "name": "contactId", "required": true, "schema": { "type": "string" }, "examples": { "default": { "value": "64a7e3d2c8f1b95e30a14d2b" } } }, { "description": "The address book entry's ID.", "in": "path", "name": "addressBookEntryId", "required": true, "schema": { "type": "string" }, "examples": { "default": { "value": "5f8d0d55b54764421b7156aa" } } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "204": { "description": "No content." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Forbidden. Insufficient scope (OAuth or API key), or the requested resource is not accessible for the authenticated website." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The contact or address book entry was not found." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Too many requests. The rate limit for this endpoint has been exceeded." } }, "summary": "Delete address book entry", "tags": [ "Contacts" ] }, "get": { "description": "Returns a single address book entry for the contact. Requires OAuth website scope website.contacts.read or website.contacts, or API key scope CONTACT_READONLY or CONTACT, or OAuth website scope website.profiles.read or website.profiles (OAuth only).", "operationId": "getAddressBookEntry", "parameters": [ { "description": "The contact's ID.", "in": "path", "name": "contactId", "required": true, "schema": { "type": "string" }, "examples": { "default": { "value": "64a7e3d2c8f1b95e30a14d2b" } } }, { "description": "The address book entry's ID.", "in": "path", "name": "addressBookEntryId", "required": true, "schema": { "type": "string" }, "examples": { "default": { "value": "5f8d0d55b54764421b7156aa" } } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAddressBookEntryResponse" } } }, "description": "The requested address book entry." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Forbidden. Insufficient scope (OAuth or API key), or the requested resource is not accessible for the authenticated website." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The contact or address book entry was not found." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Too many requests. The rate limit for this endpoint has been exceeded." } }, "summary": "Get address book entry", "tags": [ "Contacts" ] }, "put": { "description": "Replaces an address book entry for the contact with a full JSON body. When updating the entry that is currently the default, setting \"defaultShipping\" from true to false has no effect. Requires OAuth website scope website.contacts, or API key scope CONTACT, or OAuth website scope website.profiles (OAuth only).", "operationId": "updateAddressBookEntry", "parameters": [ { "description": "The contact's ID.", "in": "path", "name": "contactId", "required": true, "schema": { "type": "string" }, "examples": { "default": { "value": "64a7e3d2c8f1b95e30a14d2b" } } }, { "description": "The address book entry's ID.", "in": "path", "name": "addressBookEntryId", "required": true, "schema": { "type": "string" }, "examples": { "default": { "value": "5f8d0d55b54764421b7156aa" } } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAddressBookEntryRequest" } } }, "description": "The replacement address book entry.", "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAddressBookEntryResponse" } } }, "description": "The updated address book entry." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Invalid input or malformed JSON." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Forbidden. Insufficient scope (OAuth or API key), or the requested resource is not accessible for the authenticated website." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The contact or address book entry was not found." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Too many requests. The rate limit for this endpoint has been exceeded." } }, "summary": "Replace address book entry", "tags": [ "Contacts" ] } }, "/v2/commerce/products": { "get": { "description": "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.", "operationId": "getProducts", "parameters": [ { "in": "query", "name": "modifiedAfter", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "modifiedBefore", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "cursor", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "query", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "type", "required": false, "schema": { "type": "array", "items": { "type": "string" } } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedProductListResponseV2" } } }, "description": "A paginated list of products." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. The cursor parameter contains an invalid value." } }, "summary": "List products", "tags": [ "Products" ] }, "post": { "description": "Creates a product with appropriate subresources based on product type.", "operationId": "createProduct", "requestBody": { "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/CreateGiftCardProductRequest" }, { "$ref": "#/components/schemas/CreatePhysicalProductRequest" }, { "$ref": "#/components/schemas/CreateServiceProductRequest" } ] } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProductV2" } } }, "description": "The product was created successfully." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. The request body does not conform to the required specification." }, "405": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Method not allowed. The Product requested is not a supported product type for this operation." }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Conflict. The request conflicts with the current state of the resource." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Too many requests. The rate limit for this endpoint has been exceeded." } }, "summary": "Create product", "tags": [ "Products" ], "parameters": [ { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ] } }, "/v2/commerce/products/{productIdCsvs}": { "get": { "description": "Retrieves information for specific products, including information for any variants or images. Up to 50 products can be retrieved per request.", "operationId": "getSpecificProducts", "parameters": [ { "in": "path", "name": "productIdCsvs", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProductListResponseV2" } } }, "description": "The requested products." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. The provided product IDs are invalid or exceed the maximum of 50." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. One or more requested Products were not found." } }, "summary": "Get products", "tags": [ "Products" ] } }, "/v2/commerce/products/{productId}": { "delete": { "description": "Delete specified product", "operationId": "deleteProduct", "parameters": [ { "in": "path", "name": "productId", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "204": { "description": "The Product was deleted successfully." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. The requested Product was not found." }, "405": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Method not allowed. The Product requested is not a supported product type for this operation." } }, "summary": "Delete specified product", "tags": [ "Products" ] }, "post": { "description": "Updates information for a product. The endpoint supports partial updates.", "operationId": "updateProduct", "parameters": [ { "in": "path", "name": "productId", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateProductRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProductV2" } } }, "description": "Return the updated Product" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. The request body does not conform to the required specification." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. The requested Product was not found." }, "405": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Method not allowed. The Product requested is not a supported product type for this operation." }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Conflict. The provided URL slug is already in use." } }, "summary": "Update product", "tags": [ "Products" ] } }, "/v2/commerce/products/{productId}/images": { "post": { "description": "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.", "operationId": "uploadProductImage", "parameters": [ { "in": "path", "name": "productId", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "requestBody": { "content": { "multipart/form-data": {} }, "required": true }, "responses": { "202": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadProductImageResponse" } } }, "description": "The request was accepted and the uploaded image is being processed." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. The request body does not conform to specification." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. The requested Product was not found." }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Conflict. The specified Product has reached its limit of 100 images." } }, "summary": "Upload product image", "tags": [ "Products" ] } }, "/v2/commerce/products/{productId}/images/{imageId}": { "delete": { "description": "Delete one product image", "operationId": "deleteProductImage", "parameters": [ { "in": "path", "name": "productId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "imageId", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "204": { "description": "The ProductImage was deleted successfully." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. Either the Product or the ProductImage was not found." } }, "summary": "Delete one product image", "tags": [ "Products" ] }, "post": { "description": "Updates information for a product image. Currently, the endpoint only supports updates to the alt text for an image.", "operationId": "updateProductImage", "parameters": [ { "in": "path", "name": "productId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "imageId", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateProductImageRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProductImage" } } }, "description": "Return the updated ProductImage" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. The request body does not conform to the required specification." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. Either the Product or the ProductImage was not found." } }, "summary": "Update product image", "tags": [ "Products" ] } }, "/v2/commerce/products/{productId}/images/{imageId}/order": { "post": { "description": "Updates the ordering of a product image on the product details page.", "operationId": "updateProductImageOrder", "parameters": [ { "in": "path", "name": "productId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "imageId", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateProductImageOrderRequest" } } }, "required": true }, "responses": { "204": { "description": "The request was successful." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. The request body does not conform to the required specification." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. The ProductImage specified in the URL was not found." }, "405": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Method not allowed. The Product requested is not a supported product type for this operation." } }, "summary": "Update product image order", "tags": [ "Products" ] } }, "/v2/commerce/products/{productId}/images/{imageId}/status": { "get": { "description": "Retrieves the processing status for an uploaded product image. A successful request indicates that a ProductImage is processing, ready, or in an error state.", "operationId": "getProductImageProcessingStatus", "parameters": [ { "in": "path", "name": "productId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "imageId", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProductImageProcessingStatus" } } }, "description": "Return the processing status for the ProductImage" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. Either the Product or the ProductImage was not found." } }, "summary": "Get image processing status", "tags": [ "Products" ] } }, "/v2/commerce/products/{productId}/variants": { "post": { "description": "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.", "operationId": "createProductVariant", "parameters": [ { "in": "path", "name": "productId", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateVariantRequestV2" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProductVariantV2" } } }, "description": "The ProductVariant was created successfully." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. The request body does not conform to the required specification." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. The requested Product was not found." }, "405": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Method not allowed. The Product requested does not support variants." }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Conflict. The provided SKU is already in use by the requested Product, or the Product has reached its limit of 250 variants." } }, "summary": "Create product variant", "tags": [ "Products" ] } }, "/v2/commerce/products/{productId}/variants/{variantId}": { "delete": { "description": "Delete one product variant", "operationId": "deleteProductVariant", "parameters": [ { "in": "path", "name": "productId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "variantId", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "204": { "description": "The ProductVariant was deleted successfully." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. Either the Product or the ProductVariant was not found." }, "405": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Method not allowed. The Product requested does not support variants." }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Conflict. The ProductVariant requested is the only variant for the Product and cannot be deleted." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Too many requests. The rate limit for this endpoint has been exceeded." } }, "summary": "Delete one product variant", "tags": [ "Products" ] }, "post": { "description": "Updates a variant of a product. The endpoint supports partial updates.", "operationId": "updateProductVariant", "parameters": [ { "in": "path", "name": "productId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "variantId", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateVariantRequestV2" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProductVariantV2" } } }, "description": "Return the updated ProductVariant" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. The request body does not conform to the required specification." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. Either the Product or the ProductVariant was not found." }, "405": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Method not allowed. The Product requested does not support variants." }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Conflict. The provided SKU is already in use by the requested Product." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Too many requests. The rate limit for this endpoint has been exceeded." } }, "summary": "Update product variant", "tags": [ "Products" ] } }, "/v2/commerce/products/{productId}/variants/{variantId}/image": { "post": { "description": "Assigns a product image to a product variant. Specifying imageId of null will delete the association.", "operationId": "associateProductVariantImage", "parameters": [ { "in": "path", "name": "productId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "variantId", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssociateProductImageToVariantRequest" } } } }, "responses": { "204": { "description": "The request was successful." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. The imageId field does not represent a ProductImage belonging to the specified Product." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. Either the Product or the ProductVariant was not found." }, "405": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Method not allowed. The Product requested does not support variants." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Too many requests. The rate limit for this endpoint has been exceeded." } }, "summary": "Associate variant image", "tags": [ "Products" ] } }, "/1.0/authorization/member": { "get": { "description": "Retrieves basic details about the Squarespace member who owns the provided OAuth token", "operationId": "getMemberProfile", "parameters": [ { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemberProfile" } } }, "description": "OK" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemberProfile" } } }, "description": "Authorization error" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. The API version is not supported." } }, "summary": "Retrieves basic details about the Squarespace member who owns the provided OAuth token", "tags": [ "Websites" ] } }, "/1.0/authorization/website": { "get": { "description": "Retrieves basic details about the website that owns the provided API key or OAuth token", "operationId": "getWebsiteProfile", "parameters": [ { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebsiteProfile" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. The API version is not supported." } }, "summary": "Retrieves basic details about the website that owns the provided API key or OAuth token", "tags": [ "Websites" ] } }, "/1.0/commerce/inventory": { "get": { "description": "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.", "operationId": "getInventoryItems", "parameters": [ { "description": "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.", "in": "query", "name": "cursor", "required": false, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedInventoryItemListResponse" } } }, "description": "OK" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad Request. Type: INVALID_REQUEST_ERROR. The cursor parameter contains an invalid value." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. The API version is not supported." } }, "summary": "List inventory", "tags": [ "Inventory" ] } }, "/1.0/commerce/inventory/adjustments": { "post": { "description": "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.", "operationId": "adjustInventoryStockLevels", "parameters": [ { "description": "Required for idempotent requests. Refer to the idempotency key guide for requirements.", "in": "header", "name": "Idempotency-Key", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInventoryAdjustmentRequest" } } } }, "responses": { "204": { "description": "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." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "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": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. The API version is not supported." }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "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)." } }, "summary": "Adjust stock quantities", "tags": [ "Inventory" ] } }, "/1.0/commerce/inventory/{variantIdCsvs}": { "get": { "description": "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.", "operationId": "getSpecificInventoryItems", "parameters": [ { "description": "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.", "in": "path", "name": "variantIdCsvs", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InventoryItemListResponse" } } }, "description": "OK" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad Request. Type: INVALID_REQUEST_ERROR. ids specifies greater than 50 InventoryItems." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not Found. Type: INVALID_REQUEST_ERROR. Subtype: INVALID_ARGUMENT. One or more requested InventoryItems were not found." } }, "summary": "Get inventory", "tags": [ "Inventory" ] } }, "/1.0/commerce/orders": { "get": { "description": "Retrieves information about all orders. Orders can be filtered by Customer ID and date ranges. The response contains order information in an Order, up to 50 Orders ordered by their modification date (modifiedOn), and supports dynamic cursors for pagination.", "operationId": "getOrders", "parameters": [ { "description": "Used to filter Orders by Customer ID.", "in": "query", "name": "customerId", "required": false, "schema": { "type": "string" } }, { "description": "Time-boxes the request to Orders 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.", "in": "query", "name": "modifiedAfter", "required": false, "schema": { "type": "string" } }, { "description": "Time-boxes the request to Orders 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.", "in": "query", "name": "modifiedBefore", "required": false, "schema": { "type": "string" } }, { "description": "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.", "in": "query", "name": "cursor", "required": false, "schema": { "type": "string" } }, { "description": "Used to filter Orders by fulfillment status. Values may be PENDING, FULFILLED, or CANCELED.", "in": "query", "name": "fulfillmentStatus", "required": false, "schema": { "type": "string" } }, { "description": "Used to filter Orders by payment state. Accepts a comma-separated list of values. Possible values are: NOT_CHARGED, AUTHORIZED, PAID, REFUNDED, PENDING, FAILED, REFUND_PENDING, REFUND_FAILED, PARTIALLY_PAID. If not specified, defaults to NOT_CHARGED, AUTHORIZED, PAID, and REFUNDED.", "in": "query", "name": "paymentStates", "required": false, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderListResponse" } } }, "description": "A paginated list of orders." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. The cursor parameter contains an invalid value, cursor was specified with other parameters, modifiedAfter or modifiedBefore is not a valid ISO 8601 UTC date and time string, paymentStates is not a valid value, modifiedBefore occurred before or at the same time as modifiedAfter, fulfillmentStatus is not one of the recognized values, or modifiedAfter or modifiedBefore was specified without the other parameter." } }, "summary": "List orders", "tags": [ "Orders" ] }, "post": { "description": "Creates an order using information from a third-party sales channel. A successful request creates an Order resource.", "operationId": "createOrder", "parameters": [ { "description": "Idempotency key to prevent duplicate order creation.", "in": "header", "name": "Idempotency-Key", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateOrderRequest" } } } }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Order" } } }, "description": "The created order." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. The request body does not conform to the required specification, the Idempotency-Key header is missing or invalid, or the provided Idempotency-Key has already been used by another request bearing a different body." }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Conflict. A request using the provided Idempotency-Key is already in progress, or one or more specified product variants have insufficient stock." }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Too many requests. The rate limit for this endpoint has been exceeded." } }, "summary": "Create order", "tags": [ "Orders" ] } }, "/1.0/commerce/orders/{id}": { "get": { "description": "Retrieves information for a specific order. The response contains order information in an Order.", "operationId": "getOrder", "parameters": [ { "description": "Specifies the Order to retrieve.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Order" } } }, "description": "The requested order." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. The id is not in the expected format." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The requested Order was not found." } }, "summary": "Get order", "tags": [ "Orders" ] } }, "/1.0/commerce/orders/{id}/fulfillments": { "post": { "description": "Updates the status of a specific order to fulfilled, with options to include shipment information and send a customer notification.", "operationId": "fulfillOrder", "parameters": [ { "description": "Specifies the Order to update.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderFulfillmentRequest" } } } }, "responses": { "204": { "description": "No content. The order was successfully fulfilled." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. One or more trackingUrls are invalid, or one or more required fields are missing." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The requested Order was not found." }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Conflict. A request using the provided Order is already in progress." } }, "summary": "Fulfill order", "tags": [ "Orders" ] } }, "/1.0/commerce/store_pages": { "get": { "description": "Retrieves information for all store pages on the website. The response supports dynamic cursors for pagination.", "operationId": "getStorePages", "parameters": [ { "in": "query", "name": "cursor", "required": false, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedStorePagesResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. The API version is not supported." } }, "summary": "List store pages", "tags": [ "Websites" ] } }, "/1.0/commerce/transactions": { "get": { "description": "Retrieves all financial transactions for orders and donations. Per order and donation, the response groups transactions into a Document, contains up to 50 Documents ordered by their modification date (modifiedOn), and supports dynamic cursors for pagination.", "operationId": "getDocumentsByUpdatedOn", "parameters": [ { "description": "Identifies where the next page of results should begin. Should be the value of pagination.nextPageCursor from a previous response.", "in": "query", "name": "cursor", "required": false, "schema": { "type": "string" } }, { "description": "Time-boxes the request to Documents that were modified after a given ISO 8601 UTC date and time string (YYYY-MM-DDThh:mm:ss.sZ).", "in": "query", "name": "modifiedAfter", "required": false, "schema": { "type": "string" } }, { "description": "Time-boxes the request to Documents that were modified before a given ISO 8601 UTC date and time string (YYYY-MM-DDThh:mm:ss.sZ).", "in": "query", "name": "modifiedBefore", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "orderId", "required": false, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedTransactionListResponse" } } }, "description": "A paginated list of transaction documents." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. The cursor parameter contains an invalid value." } }, "summary": "List transactions", "tags": [ "Transactions" ] } }, "/1.0/commerce/transactions/{documentIds}": { "get": { "description": "Retrieves information for specific transaction Documents. The response contains up to 50 Documents. Multiple Documents can be retrieved by providing a comma-separated list of Document ids.", "operationId": "getDocumentsById", "parameters": [ { "description": "Specifies the Documents to retrieve. Multiple Documents can be retrieved by providing a comma-separated list of Document ids.", "in": "path", "name": "documentIds", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionListResponse" } } }, "description": "The requested transaction documents." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. ids specifies greater than 50 Documents." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. One or more requested Documents were not found." } }, "summary": "Get transactions", "tags": [ "Transactions" ] } }, "/1.0/profiles": { "get": { "description": "Retrieves all profiles; profiles can be filtered and sorted. The response contains up to 50 Profiles and supports dynamic cursors for pagination.", "operationId": "getProfiles", "parameters": [ { "description": "Identifies the sort direction of the result list; asc for ascending or dsc for descending. If not specified, the returned list is in descending order.", "in": "query", "name": "sortDirection", "required": false, "schema": { "type": "string" } }, { "description": "Identifies the sort field of the result list. Values include: createdOn, id, email, or lastName. If not specified, the returned list is sorted by id.", "in": "query", "name": "sortField", "required": false, "schema": { "type": "string" } }, { "description": "Semicolon separated list used to filter profile results. Values include: isCustomer and/or hasAccount, or email. The email filter cannot be used with isCustomer or hasAccount.", "in": "query", "name": "filter", "required": false, "schema": { "type": "string" } }, { "description": "Email address filter (URL-encoded, case insensitive).", "in": "query", "name": "email", "required": false, "schema": { "type": "string" } }, { "description": "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.", "in": "query", "name": "cursor", "required": false, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedProfileListResponse" } } }, "description": "A paginated list of profiles." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. The API version is not supported." } }, "summary": "List profiles", "tags": [ "Profiles" ] } }, "/1.0/profiles/{profileIdCsvs}": { "get": { "description": "Retrieves information for specific profiles. The response contains a list of up to 50 Profiles. Multiple Profiles can be retrieved by providing a comma-separated list of profile ids.", "operationId": "getSpecificProfiles", "parameters": [ { "description": "Specifies the profiles to retrieve. Multiple Profiles can be retrieved by providing a comma-separated list of profile ids.", "in": "path", "name": "profileIdCsvs", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProfileListResponse" } } }, "description": "The requested profiles." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Bad request. ids specifies greater than 50 profiles." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. One or more profiles were not found." } }, "summary": "Get profiles", "tags": [ "Profiles" ] } }, "/1.0/webhook_subscriptions": { "get": { "description": "Retrieves information for all webhook subscriptions. The response contains up to 25 Webhook Subscriptions. Requires an OAuth access token; API keys are not supported.", "operationId": "getWebhookSubscriptions", "parameters": [ { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalWebhookSubscriptionListResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. The API version is not supported." } }, "summary": "List webhook subscriptions", "tags": [ "WebhookSubscriptions" ] }, "post": { "callbacks": { "address.create": { "{$request.body#/endpointUrl}": { "post": { "description": "Address created details pushed to the registered callback URL", "operationId": "createAddressEvent", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddressCreatePayload" } } }, "description": "address.create event details payload", "required": true }, "responses": { "200": { "description": "Notification received by the external service." } } } } }, "address.delete": { "{$request.body#/endpointUrl}": { "post": { "description": "Address delete details pushed to the registered callback URL", "operationId": "deleteAddressEvent", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddressDeletePayload" } } }, "description": "address.delete event details payload", "required": true }, "responses": { "200": { "description": "Notification received by the external service." } } } } }, "address.update": { "{$request.body#/endpointUrl}": { "post": { "description": "Address update details pushed to the registered callback URL", "operationId": "updateAddressEvent", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddressUpdatePayload" } } }, "description": "address.update event details payload", "required": true }, "responses": { "200": { "description": "Notification received by the external service." } } } } }, "contact.create": { "{$request.body#/endpointUrl}": { "post": { "description": "Contact created details pushed to the registered callback URL", "operationId": "createContactEvent", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactCreatePayload" } } }, "description": "contact.create event details payload", "required": true }, "responses": { "200": { "description": "Notification received by the external service." } } } } }, "contact.delete": { "{$request.body#/endpointUrl}": { "post": { "description": "Contact delete details pushed to the registered callback URL", "operationId": "deleteContactEvent", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactDeletePayload" } } }, "description": "contact.delete event details payload", "required": true }, "responses": { "200": { "description": "Notification received by the external service." } } } } }, "contact.update": { "{$request.body#/endpointUrl}": { "post": { "description": "Contact update details pushed to the registered callback URL", "operationId": "updateContactEvent", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactUpdatePayload" } } }, "description": "contact.update event details payload", "required": true }, "responses": { "200": { "description": "Notification received by the external service." } } } } }, "extension.uninstall": { "{$request.body#/endpointUrl}": { "post": { "description": "Extension uninstalled details pushed to the registered callback URL", "operationId": "uninstallExtensionEvent", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExtensionUninstallPayload" } } }, "description": "extension.uninstall event details payload", "required": true }, "responses": { "200": { "description": "Notification received by the external service." } } } } }, "order.create": { "{$request.body#/endpointUrl}": { "post": { "description": "Order created details pushed to the registered callback URL", "operationId": "createOrderEvent", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderCreatePayload" } } }, "description": "order.create event details payload", "required": true }, "responses": { "200": { "description": "Notification received by the external service." } } } } }, "order.update": { "{$request.body#/endpointUrl}": { "post": { "description": "Order update details pushed to the registered callback URL", "operationId": "updateOrderEvent", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderUpdatePayload" } } }, "description": "order.update event details payload", "required": true }, "responses": { "200": { "description": "Notification received by the external service." } } } } } }, "description": "Creates a webhook subscription. A successful request returns the created Webhook Subscription resource. Requires an OAuth access token; API keys are not supported. The OAuth token must hold scopes appropriate for each subscribed event topic: order.create and order.update require website.orders or website.orders.read; contact.create, contact.update, contact.delete, address.create, address.update, and address.delete require website.contacts; extension.uninstall requires no event-specific scope.", "operationId": "createWebhookSubscription", "parameters": [ { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalCreateWebhookSubscriptionRequest" } } }, "description": "Subscription details", "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalCreateWebhookSubscriptionResponse" } } }, "description": "The created webhook subscription." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Invalid input or malformed JSON" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "Not found. The API version is not supported." }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The Squarespace website has reached its limit of 25 webhook subscriptions." } }, "summary": "Create webhook subscription", "tags": [ "WebhookSubscriptions" ] } }, "/1.0/webhook_subscriptions/{subscriptionId}": { "delete": { "description": "Deletes a webhook subscription. Requires an OAuth access token; API keys are not supported.", "operationId": "deleteWebhookSubscription", "parameters": [ { "description": "Specifies the Webhook Subscription to delete.", "in": "path", "name": "subscriptionId", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "204": { "description": "No content. The webhook subscription was deleted successfully." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The requested Webhook Subscription was not found." } }, "summary": "Delete webhook subscription", "tags": [ "WebhookSubscriptions" ] }, "get": { "description": "Retrieves information for a specific webhook subscription. Requires an OAuth access token; API keys are not supported.", "operationId": "getWebhookSubscription", "parameters": [ { "description": "Specifies the Webhook Subscription to retrieve.", "in": "path", "name": "subscriptionId", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalWebhookSubscriptionResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The requested Webhook Subscription was not found." } }, "summary": "Get webhook subscription", "tags": [ "WebhookSubscriptions" ] }, "post": { "description": "Updates information for a webhook subscription. A successful request returns the updated Webhook Subscription resource. Requires an OAuth access token; API keys are not supported. The OAuth token must hold scopes appropriate for each subscribed event topic: order.create and order.update require website.orders or website.orders.read; contact.create, contact.update, contact.delete, address.create, address.update, and address.delete require website.contacts; extension.uninstall requires no event-specific scope.", "operationId": "updateWebhookSubscription", "parameters": [ { "description": "Specifies the Webhook Subscription to update.", "in": "path", "name": "subscriptionId", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalUpdateWebhookSubscriptionRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalWebhookSubscriptionResponse" } } }, "description": "OK" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The request body does not conform to the required specification." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The requested Webhook Subscription was not found." } }, "summary": "Update webhook subscription", "tags": [ "WebhookSubscriptions" ] } }, "/1.0/webhook_subscriptions/{subscriptionId}/actions/rotateSecret": { "post": { "description": "Rotates a webhook subscription's secret. The previous secret for a subscription is no longer valid after a new one is generated. Requires an OAuth access token; API keys are not supported.", "operationId": "rotateSubscriptionSecret", "parameters": [ { "description": "Specifies the Webhook Subscription to update.", "in": "path", "name": "subscriptionId", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalRotateSecretResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The requested Webhook Subscription was not found." } }, "summary": "Rotate webhook subscription secret", "tags": [ "WebhookSubscriptions" ] } }, "/1.0/webhook_subscriptions/{subscriptionId}/actions/sendTestNotification": { "post": { "description": "Sends a notification to a subscribed webhook endpoint for testing purposes. This is a one-time notification, and will not be retried if it fails or times out. Requires an OAuth access token; API keys are not supported.", "operationId": "sendTestNotificationForWebhookSubscription", "parameters": [ { "description": "Specifies the Webhook Subscription to send a notification to.", "in": "path", "name": "subscriptionId", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "Authorization", "required": true, "description": "API key or OAuth access token", "schema": { "type": "string", "default": "Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" } }, { "in": "header", "name": "User-Agent", "required": true, "description": "User Agent", "schema": { "type": "string", "default": "YOUR_CUSTOM_APP_DESCRIPTION" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalSendTestNotificationRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalTestNotificationResponse" } } }, "description": "OK" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The request body does not conform to the required specification." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorPayload" } } }, "description": "The requested Webhook Subscription was not found." } }, "summary": "Send test notification", "tags": [ "WebhookSubscriptions" ] } } }, "components": { "schemas": { "AcceptsMarketing": { "type": "object", "properties": { "acceptsMarketing": { "type": "boolean", "description": "Whether the contact accepts marketing email." }, "joinedOn": { "type": "string", "description": "The date and time the contact was added to the marketing list.The value returned in the creation response is a near-real-time estimate; the Get Contact endpoint should be used to verify the exact persisted timestamp.", "format": "date-time" }, "leftOn": { "type": "string", "description": "The date and time the contact left Marketing list", "format": "date-time" } }, "description": "Marketing subscription state for the contact's email." }, "AcceptsMarketingWithDate": { "type": "object", "properties": { "acceptsMarketing": { "type": "boolean", "description": "If contact's email accepts marketing" }, "joinedOn": { "$ref": "#/components/schemas/DateFilter" } }, "description": "Contact's marketing settings with joined on date" }, "Address": { "type": "object", "properties": { "address1": { "type": "string", "description": "Primary street address", "examples": [ "459 Broadway" ] }, "address2": { "type": "string", "description": "Secondary address line" }, "city": { "type": "string", "description": "City", "examples": [ "New York" ] }, "countryCode": { "type": "string", "description": "ISO 3166-1 alpha-2 country code", "examples": [ "US" ] }, "firstName": { "type": "string", "description": "First name", "examples": [ "Bob" ] }, "lastName": { "type": "string", "description": "Last name", "examples": [ "Loblaw" ] }, "phone": { "type": "string", "description": "Phone number", "examples": [ "5553334444" ] }, "postalCode": { "type": "string", "description": "Postal or ZIP code", "examples": [ "10003" ] }, "state": { "type": "string", "description": "State or province", "examples": [ "NY" ] } }, "description": "Customer's shipping address provided at checkout or, for recurring subscription orders, the customer's current mailing address." }, "AddressBook": { "type": "object", "properties": { "addressBookEntries": { "type": "array", "description": "List of Address Book Entries", "items": { "$ref": "#/components/schemas/AddressBookEntry" } }, "defaultShippingAddressId": { "type": "string", "description": "The id of the address book entry that is the default shipping address." } }, "description": "Address settings for a contact. When there is at least one address book entry, exactly one is the default shipping address; default shipping address is always returned on the first page of paginated results)." }, "AddressBookEntry": { "type": "object", "properties": { "address": { "$ref": "#/components/schemas/ContactAddress" }, "defaultShipping": { "type": "boolean", "description": "Whether this entry is the current default shipping address. When the contact has any address book entries, exactly one entry has this value set to true." }, "id": { "type": "string", "description": "The address book entry's ID.", "readOnly": true, "examples": [ "5f8d0d55b54764421b7156aa" ] } }, "description": "An address book entry for a contact." }, "AddressCreateData": { "required": [ "addressBookEntries", "contactId" ], "type": "object", "properties": { "addressBookEntries": { "type": "array", "description": "The address book entries that were created.", "items": { "$ref": "#/components/schemas/AddressBookEntry" } }, "contactId": { "type": "string", "description": "The contact's ID.", "examples": [ "64a7e3d2c8f1b95e30a14d2b" ] }, "createdOn": { "type": "string", "description": "Creation date and time in UTC (ISO 8601 format) of the address book entries.", "format": "date-time", "examples": [ "2024-01-28T10:44:00Z" ] } }, "description": "The address data for the created address book entries." }, "AddressCreatePayload": { "required": [ "createdOn", "id", "subscriptionsId", "topic", "websiteId" ], "type": "object", "properties": { "createdOn": { "type": "string", "description": "Creation date and time in UTC (ISO 8601 format) of this message.", "format": "date-time", "examples": [ "2024-01-28T10:44:00Z" ] }, "data": { "$ref": "#/components/schemas/AddressCreateData" }, "id": { "type": "string", "description": "Unique notification id.", "examples": [ "5c2ba184b63ed3cb411ce2b1" ] }, "subscriptionsId": { "type": "string", "description": "Unique Webhook Subscriptions id.", "examples": [ "5f3c2155d947844beedda991" ] }, "topic": { "type": "string", "description": "Description of the event that triggered the notification.\n* `order.create` - always value for OrderCreatePayload.topic ref\n* `order.update` - always value for OrderUpdatePayload.topic\n* `extension.uninstall` - always value for ExtensionUninstallPayload.topic\n* `contact.create` - always value for ContactCreatePayload.topic\n* `contact.update` - always value for ContactUpdatePayload.topic\n* `contact.delete` - always value for ContactDeletePayload.topic\n* `address.create` - always value for AddressCreatePayload.topic\n* `address.update` - always value for AddressUpdatePayload.topic\n* `address.delete` - always value for AddressDeletePayload.topic\n", "default": "address.create", "enum": [ "address.create" ], "examples": [ "address.create" ] }, "websiteId": { "type": "string", "description": "Squarespace website id that triggered the notification.", "examples": [ "5f3c3d55ac435e1a051f77b3" ] } } }, "AddressDeleteData": { "required": [ "addressBookEntryIds", "contactId" ], "type": "object", "properties": { "addressBookEntryIds": { "type": "array", "description": "The IDs of the deleted address book entries.", "items": { "type": "string", "description": "The IDs of the deleted address book entries." } }, "contactId": { "type": "string", "description": "The contact's ID.", "examples": [ "64a7e3d2c8f1b95e30a14d2b" ] }, "deletedOn": { "type": "string", "description": "Deletion date and time in UTC (ISO 8601 format) of the address book entries.", "format": "date-time", "examples": [ "2024-01-28T10:44:00Z" ] } }, "description": "Identifiers and metadata for the deleted address book entries." }, "AddressDeletePayload": { "required": [ "createdOn", "id", "subscriptionsId", "topic", "websiteId" ], "type": "object", "properties": { "createdOn": { "type": "string", "description": "Creation date and time in UTC (ISO 8601 format) of this message.", "format": "date-time", "examples": [ "2024-01-28T10:44:00Z" ] }, "data": { "$ref": "#/components/schemas/AddressDeleteData" }, "id": { "type": "string", "description": "Unique notification id.", "examples": [ "5c2ba184b63ed3cb411ce2b1" ] }, "subscriptionsId": { "type": "string", "description": "Unique Webhook Subscriptions id.", "examples": [ "5f3c2155d947844beedda991" ] }, "topic": { "type": "string", "description": "Description of the event that triggered the notification.\n* `order.create` - always value for OrderCreatePayload.topic ref\n* `order.update` - always value for OrderUpdatePayload.topic\n* `extension.uninstall` - always value for ExtensionUninstallPayload.topic\n* `contact.create` - always value for ContactCreatePayload.topic\n* `contact.update` - always value for ContactUpdatePayload.topic\n* `contact.delete` - always value for ContactDeletePayload.topic\n* `address.create` - always value for AddressCreatePayload.topic\n* `address.update` - always value for AddressUpdatePayload.topic\n* `address.delete` - always value for AddressDeletePayload.topic\n", "default": "address.delete", "enum": [ "address.delete" ], "examples": [ "address.delete" ] }, "websiteId": { "type": "string", "description": "Squarespace website id that triggered the notification.", "examples": [ "5f3c3d55ac435e1a051f77b3" ] } } }, "AddressRequest": { "type": "object", "properties": { "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "countryCode": { "type": "string" }, "firstName": { "type": "string" }, "lastName": { "type": "string" }, "phone": { "type": "string" }, "postalCode": { "type": "string" }, "state": { "type": "string" } }, "description": "Customer's shipping address." }, "AddressUpdateData": { "required": [ "addressBookEntries", "contactId" ], "type": "object", "properties": { "addressBookEntries": { "type": "array", "description": "The address book entries after the update.", "items": { "$ref": "#/components/schemas/AddressBookEntry" } }, "contactId": { "type": "string", "description": "The contact's ID.", "examples": [ "64a7e3d2c8f1b95e30a14d2b" ] }, "createdOn": { "type": "string", "description": "Creation date and time in UTC (ISO 8601 format) of the address book entries.", "format": "date-time", "examples": [ "2024-01-28T10:44:00Z" ] }, "updatedOn": { "type": "string", "description": "Last update date and time in UTC (ISO 8601 format) of the address book entries.", "format": "date-time", "examples": [ "2024-02-15T14:30:00Z" ] } }, "description": "The address data after the update." }, "AddressUpdatePayload": { "required": [ "createdOn", "id", "subscriptionsId", "topic", "websiteId" ], "type": "object", "properties": { "createdOn": { "type": "string", "description": "Creation date and time in UTC (ISO 8601 format) of this message.", "format": "date-time", "examples": [ "2024-01-28T10:44:00Z" ] }, "data": { "$ref": "#/components/schemas/AddressUpdateData" }, "id": { "type": "string", "description": "Unique notification id.", "examples": [ "5c2ba184b63ed3cb411ce2b1" ] }, "subscriptionsId": { "type": "string", "description": "Unique Webhook Subscriptions id.", "examples": [ "5f3c2155d947844beedda991" ] }, "topic": { "type": "string", "description": "Description of the event that triggered the notification.\n* `order.create` - always value for OrderCreatePayload.topic ref\n* `order.update` - always value for OrderUpdatePayload.topic\n* `extension.uninstall` - always value for ExtensionUninstallPayload.topic\n* `contact.create` - always value for ContactCreatePayload.topic\n* `contact.update` - always value for ContactUpdatePayload.topic\n* `contact.delete` - always value for ContactDeletePayload.topic\n* `address.create` - always value for AddressCreatePayload.topic\n* `address.update` - always value for AddressUpdatePayload.topic\n* `address.delete` - always value for AddressDeletePayload.topic\n", "default": "address.update", "enum": [ "address.update" ], "examples": [ "address.update" ] }, "websiteId": { "type": "string", "description": "Squarespace website id that triggered the notification.", "examples": [ "5f3c3d55ac435e1a051f77b3" ] } } }, "AnyOrderCriteria": { "title": "AnyOrderCriteria", "type": "object", "description": "Discount applies to any order. No additional conditions.", "required": [ "type" ], "properties": { "type": { "type": "string" } }, "discriminator": { "propertyName": "type" } }, "AssociateProductImageToVariantRequest": { "required": [ "imageId" ], "type": "object", "properties": { "imageId": { "$ref": "#/components/schemas/ChangeString" } } }, "AutoTrigger": { "title": "AutoTrigger", "type": "object", "description": "Trigger for a discount that is automatically applied; no promo code required.", "required": [ "type" ], "properties": { "type": { "type": "string" } }, "discriminator": { "propertyName": "type" } }, "CartTotalCriteria": { "title": "CartTotalCriteria", "required": [ "minimumCartTotal", "type" ], "type": "object", "description": "Discount applies when the cart total meets or exceeds a minimum.", "properties": { "type": { "type": "string" }, "minimumCartTotal": { "$ref": "#/components/schemas/MonetaryAmount" } }, "discriminator": { "propertyName": "type" } }, "ChangeBoolean": { "type": "object", "properties": { "present": { "type": "boolean" }, "value": { "type": "boolean" } } }, "ChangeListString": { "type": "object", "properties": { "present": { "type": "boolean" }, "value": { "type": "array", "items": { "type": "string" } } }, "description": "Optional; list of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update." }, "ChangeMapStringString": { "type": "object", "properties": { "present": { "type": "boolean" }, "value": { "type": "object", "additionalProperties": { "type": "string" } } }, "description": "Specifies attribute-value pairs for the variant. Supported for PHYSICAL products only." }, "ChangeMonetaryAmount": { "type": "object", "properties": { "present": { "type": "boolean" }, "value": { "$ref": "#/components/schemas/MonetaryAmount" } } }, "ChangeProductDimensions": { "type": "object", "properties": { "present": { "type": "boolean" }, "value": { "$ref": "#/components/schemas/ProductDimensions" } } }, "ChangeProductWeight": { "type": "object", "properties": { "present": { "type": "boolean" }, "value": { "$ref": "#/components/schemas/ProductWeight" } } }, "ChangeSeoOptions": { "type": "object", "properties": { "present": { "type": "boolean" }, "value": { "$ref": "#/components/schemas/SeoOptions" } }, "description": "Options for search engine optimization." }, "ChangeString": { "type": "object", "properties": { "present": { "type": "boolean" }, "value": { "type": "string" } }, "description": "Optional; HTTPS URL to receive webhook notifications." }, "ChangeUpdateProductMeasurements": { "type": "object", "properties": { "present": { "type": "boolean" }, "value": { "$ref": "#/components/schemas/UpdateProductMeasurements" } }, "description": "Measurements of the variant when it's shipped. Supported for PHYSICAL products only." }, "ChangeUpdateProductPricing": { "type": "object", "properties": { "present": { "type": "boolean" }, "value": { "$ref": "#/components/schemas/UpdateProductPricing" } }, "description": "Pricing data for the product." }, "Contact": { "type": "object", "properties": { "createdOn": { "type": "string", "description": "The date and time when the contact was created.", "format": "date-time", "readOnly": true }, "defaultShippingAddress": { "$ref": "#/components/schemas/AddressBookEntry" }, "firstName": { "type": "string", "description": "The contact's first name." }, "id": { "type": "string", "description": "The contact's ID.", "readOnly": true, "examples": [ "64a7e3d2c8f1b95e30a14d2b" ] }, "lastName": { "type": "string", "description": "The contact's last name." }, "locale": { "type": "string", "description": "The contact's locale.", "examples": [ "en-US" ] }, "primaryEmail": { "$ref": "#/components/schemas/Email" } }, "description": "A contact." }, "ContactAddress": { "required": [ "countryCode" ], "type": "object", "properties": { "city": { "type": "string", "description": "Address' city", "examples": [ "Springfield" ] }, "countryCode": { "type": "string", "description": "ISO 3166 alpha-2 country code string.", "enum": [ "AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "BQ", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "CW", "HR", "CU", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "XK", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MF", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "AN", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SK", "SI", "SB", "SO", "SX", "ZA", "GS", "ES", "LK", "SD", "SR", "SJ", "SS", "SZ", "SY", "SE", "CH", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW" ], "examples": [ "US" ] }, "firstName": { "type": "string", "description": "Contact's first name", "examples": [ "John" ] }, "lastName": { "type": "string", "description": "Contact's last name", "examples": [ "Doe" ] }, "line1": { "type": "string", "description": "First line of address", "examples": [ "100 Main St" ] }, "line2": { "type": "string", "description": "Second line of address", "examples": [ "Apt 1A" ] }, "phoneNumber": { "type": "string", "description": "Contact's phone number", "examples": [ "215-555-4321" ] }, "postalCode": { "type": "string", "description": "zip/postal code", "examples": [ "10900" ] }, "region": { "type": "string", "description": "General region (State, Province, County, etc...)", "examples": [ "IL" ] } }, "description": "Address properties for a contact." }, "ContactCreatePayload": { "required": [ "createdOn", "id", "subscriptionsId", "topic", "websiteId" ], "type": "object", "properties": { "createdOn": { "type": "string", "description": "Creation date and time in UTC (ISO 8601 format) of this message.", "format": "date-time", "examples": [ "2024-01-28T10:44:00Z" ] }, "data": { "$ref": "#/components/schemas/Contact" }, "id": { "type": "string", "description": "Unique notification id.", "examples": [ "5c2ba184b63ed3cb411ce2b1" ] }, "subscriptionsId": { "type": "string", "description": "Unique Webhook Subscriptions id.", "examples": [ "5f3c2155d947844beedda991" ] }, "topic": { "type": "string", "description": "Description of the event that triggered the notification.\n* `order.create` - always value for OrderCreatePayload.topic ref\n* `order.update` - always value for OrderUpdatePayload.topic\n* `extension.uninstall` - always value for ExtensionUninstallPayload.topic\n* `contact.create` - always value for ContactCreatePayload.topic\n* `contact.update` - always value for ContactUpdatePayload.topic\n* `contact.delete` - always value for ContactDeletePayload.topic\n* `address.create` - always value for AddressCreatePayload.topic\n* `address.update` - always value for AddressUpdatePayload.topic\n* `address.delete` - always value for AddressDeletePayload.topic\n", "default": "contact.create", "enum": [ "contact.create" ], "examples": [ "contact.create" ] }, "websiteId": { "type": "string", "description": "Squarespace website id that triggered the notification.", "examples": [ "5f3c3d55ac435e1a051f77b3" ] } } }, "ContactDeleteData": { "required": [ "deletedOn", "id" ], "type": "object", "properties": { "deletedOn": { "type": "string", "description": "Deletion date and time in UTC (ISO 8601 format) of the contact.", "format": "date-time", "examples": [ "2024-01-28T10:44:00Z" ] }, "id": { "type": "string", "description": "The contact's ID.", "examples": [ "64a7e3d2c8f1b95e30a14d2b" ] } }, "description": "Identifiers and metadata for the deleted contact." }, "ContactDeletePayload": { "required": [ "createdOn", "id", "subscriptionsId", "topic", "websiteId" ], "type": "object", "properties": { "createdOn": { "type": "string", "description": "Creation date and time in UTC (ISO 8601 format) of this message.", "format": "date-time", "examples": [ "2024-01-28T10:44:00Z" ] }, "data": { "$ref": "#/components/schemas/ContactDeleteData" }, "id": { "type": "string", "description": "Unique notification id.", "examples": [ "5c2ba184b63ed3cb411ce2b1" ] }, "subscriptionsId": { "type": "string", "description": "Unique Webhook Subscriptions id.", "examples": [ "5f3c2155d947844beedda991" ] }, "topic": { "type": "string", "description": "Description of the event that triggered the notification.\n* `order.create` - always value for OrderCreatePayload.topic ref\n* `order.update` - always value for OrderUpdatePayload.topic\n* `extension.uninstall` - always value for ExtensionUninstallPayload.topic\n* `contact.create` - always value for ContactCreatePayload.topic\n* `contact.update` - always value for ContactUpdatePayload.topic\n* `contact.delete` - always value for ContactDeletePayload.topic\n* `address.create` - always value for AddressCreatePayload.topic\n* `address.update` - always value for AddressUpdatePayload.topic\n* `address.delete` - always value for AddressDeletePayload.topic\n", "default": "contact.delete", "enum": [ "contact.delete" ], "examples": [ "contact.delete" ] }, "websiteId": { "type": "string", "description": "Squarespace website id that triggered the notification.", "examples": [ "5f3c3d55ac435e1a051f77b3" ] } } }, "ContactUpdatePayload": { "required": [ "createdOn", "id", "subscriptionsId", "topic", "websiteId" ], "type": "object", "properties": { "createdOn": { "type": "string", "description": "Creation date and time in UTC (ISO 8601 format) of this message.", "format": "date-time", "examples": [ "2024-01-28T10:44:00Z" ] }, "data": { "$ref": "#/components/schemas/Contact" }, "id": { "type": "string", "description": "Unique notification id.", "examples": [ "5c2ba184b63ed3cb411ce2b1" ] }, "subscriptionsId": { "type": "string", "description": "Unique Webhook Subscriptions id.", "examples": [ "5f3c2155d947844beedda991" ] }, "topic": { "type": "string", "description": "Description of the event that triggered the notification.\n* `order.create` - always value for OrderCreatePayload.topic ref\n* `order.update` - always value for OrderUpdatePayload.topic\n* `extension.uninstall` - always value for ExtensionUninstallPayload.topic\n* `contact.create` - always value for ContactCreatePayload.topic\n* `contact.update` - always value for ContactUpdatePayload.topic\n* `contact.delete` - always value for ContactDeletePayload.topic\n* `address.create` - always value for AddressCreatePayload.topic\n* `address.update` - always value for AddressUpdatePayload.topic\n* `address.delete` - always value for AddressDeletePayload.topic\n", "default": "contact.update", "enum": [ "contact.update" ], "examples": [ "contact.update" ] }, "websiteId": { "type": "string", "description": "Squarespace website id that triggered the notification.", "examples": [ "5f3c3d55ac435e1a051f77b3" ] } } }, "CreateAddressBookEntryRequest": { "required": [ "address" ], "type": "object", "properties": { "address": { "$ref": "#/components/schemas/ContactAddress" }, "defaultShipping": { "type": "boolean", "description": "Whether this entry should be the default shipping address. If this is the only address book entry for the contact after creation, it becomes the default even when set to false." } } }, "CreateAddressBookEntryResponse": { "type": "object", "properties": { "addressBookEntry": { "$ref": "#/components/schemas/AddressBookEntry" } } }, "CreateContactRequest": { "required": [ "firstName", "lastName", "locale", "primaryEmail" ], "type": "object", "properties": { "firstName": { "type": "string", "description": "Contact's first name", "examples": [ "john" ] }, "lastName": { "type": "string", "description": "Contact's last name", "examples": [ "doe" ] }, "locale": { "type": "string", "description": "Contact's locale", "examples": [ "en-US" ] }, "primaryEmail": { "$ref": "#/components/schemas/CreateEmail" } } }, "CreateContactResponse": { "type": "object", "properties": { "contact": { "$ref": "#/components/schemas/Contact" } } }, "CreateDiscountLineRequest": { "type": "object", "properties": { "amount": { "$ref": "#/components/schemas/MonetaryAmount" }, "name": { "type": "string" }, "promoCode": { "type": "string" } }, "description": "Array of discount line items. Describes the promotions redeemed during checkout." }, "CreateDiscountRequest": { "required": [ "criteria", "name", "template", "trigger", "validFrom" ], "type": "object", "properties": { "criteria": { "oneOf": [ { "$ref": "#/components/schemas/AnyOrderCriteria" }, { "$ref": "#/components/schemas/CartTotalCriteria" }, { "$ref": "#/components/schemas/ProductCriteria" } ] }, "isLimitedUses": { "type": "boolean", "description": "If true, the discount can only be used `maxUsesAllowed` times site-wide." }, "isOncePerCustomer": { "type": "boolean", "description": "If true, a given customer can only use this discount once." }, "maxUsesAllowed": { "type": "integer", "description": "Maximum site-wide redemptions. Required when isLimitedUses=true; null otherwise.", "format": "int32" }, "name": { "type": "string", "description": "Display name for the discount." }, "paymentPlanOptions": { "$ref": "#/components/schemas/PaymentPlanOptions" }, "subscriptionOptions": { "$ref": "#/components/schemas/SubscriptionOptions" }, "template": { "oneOf": [ { "$ref": "#/components/schemas/FixedAmountTemplate" }, { "$ref": "#/components/schemas/PercentageTemplate" } ] }, "trigger": { "oneOf": [ { "$ref": "#/components/schemas/AutoTrigger" }, { "$ref": "#/components/schemas/PromoCodeTrigger" } ] }, "validFrom": { "type": "string", "description": "When the discount becomes active.", "format": "date-time" }, "validTo": { "type": "string", "description": "When the discount expires. Null = no expiry.", "format": "date-time" } }, "description": "Request body for creating a discount." }, "CreateEmail": { "required": [ "email" ], "type": "object", "properties": { "acceptsMarketing": { "type": "boolean", "description": "If contact's email accepts marketing", "default": false }, "email": { "type": "string", "format": "email", "description": "The email address.", "examples": [ "jane.doe@example.com" ] } }, "description": "Primary email supplied when creating a contact." }, "CreateGiftCardProductRequest": { "title": "CreateGiftCardProductRequest", "type": "object", "description": "Request payload to create a GIFT_CARD product.", "properties": { "description": { "type": "string" }, "isVisible": { "type": "boolean" }, "name": { "type": "string" }, "storePageId": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "type": { "type": "string" }, "urlSlug": { "type": "string" }, "variants": { "type": "array", "items": { "$ref": "#/components/schemas/CreateGiftCardProductVariantRequest" } } }, "discriminator": { "propertyName": "type" } }, "CreateGiftCardProductVariantRequest": { "type": "object", "properties": { "pricing": { "$ref": "#/components/schemas/SimpleProductPricing" }, "sku": { "type": "string" } } }, "CreateInventoryAdjustmentRequest": { "type": "object", "properties": { "decrementOperations": { "type": "array", "description": "Optional; array of objects. Subtracts stock quantity for InventoryItems.", "items": { "$ref": "#/components/schemas/InventoryQuantityExpression" } }, "incrementOperations": { "type": "array", "description": "Optional; array of objects. Increments stock quantity for InventoryItems.", "items": { "$ref": "#/components/schemas/InventoryQuantityExpression" } }, "setFiniteOperations": { "type": "array", "description": "Optional; array of objects. Sets the exact stock quantity for InventoryItems.", "items": { "$ref": "#/components/schemas/InventoryQuantityExpression" } }, "setUnlimitedOperations": { "type": "array", "description": "Optional; array of InventoryItem ids. Marks stock quantity as \"unlimited\" for the given InventoryItems.", "items": { "type": "string", "description": "Optional; array of InventoryItem ids. Marks stock quantity as \"unlimited\" for the given InventoryItems." } } } }, "CreateLineItemRequest": { "required": [ "lineItemType", "quantity", "unitPricePaid" ], "type": "object", "properties": { "lineItemType": { "$ref": "#/components/schemas/OrderCreateLineItemType" }, "nonSaleUnitPrice": { "$ref": "#/components/schemas/MonetaryAmount" }, "quantity": { "type": "integer", "description": "Amount of the item purchased. 1,000,000 limit.", "format": "int32" }, "title": { "type": "string", "description": "Title of the custom line item." }, "unitPricePaid": { "$ref": "#/components/schemas/MonetaryAmount" }, "variantId": { "type": "string", "description": "Required if lineItemType is PHYSICAL_PRODUCT. Unique id of the ProductVariant sold." } }, "description": "Array of purchased line items; cannot be empty." }, "CreateOrderInventoryBehavior": { "type": "string", "description": "Indicates whether to deduct stock quantity for the product variant upon Order creation. Values may be DEDUCT or SKIP. Defaults to SKIP.", "enum": [ "DEDUCT", "SKIP" ] }, "CreateOrderRequest": { "required": [ "channelName", "createdOn", "externalOrderReference", "fulfillments", "grandTotal", "lineItems", "priceTaxInterpretation" ], "type": "object", "properties": { "billingAddress": { "$ref": "#/components/schemas/AddressRequest" }, "channelName": { "maxLength": 30, "type": "string", "description": "Name of third-party sales channel." }, "createdOn": { "type": "string", "description": "ISO 8601 UTC date and time string. Represents the date and time when the order was placed through the third-party sales channel.", "format": "date-time" }, "customerEmail": { "type": "string", "format": "email", "description": "Email address provided at checkout on the third-party sales channel.", "examples": [ "john.doe@example.com" ] }, "discountLines": { "type": "array", "description": "Array of discount line items. Describes the promotions redeemed during checkout.", "items": { "$ref": "#/components/schemas/CreateDiscountLineRequest" } }, "discountTotal": { "$ref": "#/components/schemas/MonetaryAmount" }, "externalOrderReference": { "maxLength": 200, "type": "string", "description": "Order reference identifier used by the third-party sales channel." }, "fulfilledOn": { "type": "string", "description": "ISO 8601 UTC date and time string. Represents the moment the order was fulfilled. Required if fulfillmentStatus is FULFILLED.", "format": "date-time" }, "fulfillmentStatus": { "$ref": "#/components/schemas/OrderCreateFulfillmentStatus" }, "fulfillments": { "type": "array", "description": "Array of shipping fulfillments; up to 100 entries. Describes shipment information for the order.", "items": { "$ref": "#/components/schemas/CreateOrderShipmentRequest" } }, "grandTotal": { "$ref": "#/components/schemas/MonetaryAmount" }, "inventoryBehavior": { "$ref": "#/components/schemas/CreateOrderInventoryBehavior" }, "lineItems": { "type": "array", "description": "Array of purchased line items; cannot be empty.", "items": { "$ref": "#/components/schemas/CreateLineItemRequest" } }, "priceTaxInterpretation": { "$ref": "#/components/schemas/TaxInterpretation" }, "shippingAddress": { "$ref": "#/components/schemas/AddressRequest" }, "shippingLines": { "type": "array", "description": "Array of shipping line items. Describes the shipping options chosen at checkout. Currently accepts only one shipping entry.", "items": { "$ref": "#/components/schemas/CreateShippingLineRequest" } }, "shippingTotal": { "$ref": "#/components/schemas/MonetaryAmount" }, "shopperFulfillmentNotificationBehavior": { "$ref": "#/components/schemas/ShopperFulfillmentNotificationBehavior" }, "subtotal": { "$ref": "#/components/schemas/MonetaryAmount" }, "taxTotal": { "$ref": "#/components/schemas/MonetaryAmount" } } }, "CreateOrderShipmentRequest": { "required": [ "carrierName", "service", "shipDate", "trackingNumber" ], "type": "object", "properties": { "carrierName": { "maxLength": 100, "type": "string", "description": "Name of the carrier handling the shipment." }, "service": { "maxLength": 100, "type": "string", "description": "Carrier's level of service for shipping." }, "shipDate": { "type": "string", "description": "ISO 8601 UTC date and time string. Represents the moment the shipment occurred.", "format": "date-time" }, "trackingNumber": { "maxLength": 100, "type": "string", "description": "Carrier's parcel tracking number." }, "trackingUrl": { "type": "string", "description": "URL provided by carrier to track the shipment; must adhere to valid URL formatting." } }, "description": "Array of shipping fulfillments; up to 100 entries. Describes shipment information for the order." }, "CreatePhysicalProductRequest": { "title": "CreatePhysicalProductRequest", "type": "object", "description": "Request payload to create a PHYSICAL product.", "properties": { "description": { "type": "string" }, "isVisible": { "type": "boolean" }, "name": { "type": "string" }, "storePageId": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "type": { "type": "string" }, "urlSlug": { "type": "string" }, "variantAttributes": { "type": "array", "items": { "type": "string" } }, "variants": { "type": "array", "items": { "$ref": "#/components/schemas/CreatePhysicalProductVariantRequest" } } }, "discriminator": { "propertyName": "type" } }, "CreatePhysicalProductVariantRequest": { "type": "object", "properties": { "attributes": { "type": "object", "additionalProperties": { "type": "string" } }, "gtin": { "type": "string", "description": "Global Trade Item Number (GTIN). Optional. Must be 8, 12, 13, or 14 numeric digits. Whitespace, hyphens, and underscores are stripped before validation." }, "mpn": { "type": "string", "description": "Manufacturer Part Number (MPN). Optional. Must be alphanumeric and 70 characters or fewer. Whitespace, hyphens, and underscores are stripped before validation." }, "pricing": { "$ref": "#/components/schemas/FullProductPricing" }, "shippingMeasurements": { "$ref": "#/components/schemas/ProductMeasurements" }, "sku": { "type": "string" }, "stock": { "$ref": "#/components/schemas/ProductStock" } } }, "CreateProductRequest": { "required": [ "storePageId", "type", "variants" ], "type": "object", "properties": { "description": { "maxLength": 102400, "type": "string", "description": "Long-form product description represented in HTML." }, "isVisible": { "type": "boolean", "description": "Indicates whether the product is available for purchase. If not specified, the new product is marked as Hidden." }, "name": { "maxLength": 200, "type": "string", "description": "Product name." }, "pricing": { "$ref": "#/components/schemas/ProductPricing" }, "storePageId": { "type": "string", "description": "Identifier of the product's Store Page." }, "tags": { "type": "array", "description": "Keywords for search and organization purposes.", "items": { "type": "string", "description": "Keywords for search and organization purposes." } }, "type": { "$ref": "#/components/schemas/ProductType" }, "urlSlug": { "maxLength": 200, "type": "string", "description": "URL slug for the new product. Value can only consist of alphanumeric characters and non-contiguous hyphens." }, "variantAttributes": { "type": "array", "description": "List of attributes to distinguish variants of the product. Supported for PHYSICAL products only.", "items": { "type": "string", "description": "List of attributes to distinguish variants of the product. Supported for PHYSICAL products only." } }, "variants": { "type": "array", "description": "List of variants of the product. Array must contain at least one object but no more than 100 objects.", "items": { "$ref": "#/components/schemas/CreateProductVariantRequest" } } } }, "CreateProductVariantRequest": { "required": [ "pricing", "sku" ], "type": "object", "properties": { "attributes": { "type": "object", "additionalProperties": { "type": "string", "description": "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." }, "description": "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." }, "pricing": { "$ref": "#/components/schemas/ProductPricing" }, "shippingMeasurements": { "$ref": "#/components/schemas/ProductMeasurements" }, "sku": { "maxLength": 60, "type": "string", "description": "Merchant-defined code that identifies the product variant. Value must be unique among variants. Leading and trailing whitespace is removed." }, "stock": { "$ref": "#/components/schemas/ProductStock" } } }, "CreateServiceProductRequest": { "title": "CreateServiceProductRequest", "type": "object", "description": "Request payload to create a SERVICE product.", "properties": { "description": { "type": "string" }, "isVisible": { "type": "boolean" }, "name": { "type": "string" }, "storePageId": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "type": { "type": "string" }, "urlSlug": { "type": "string" }, "variantAttributes": { "type": "array", "items": { "type": "string" } }, "variants": { "type": "array", "items": { "$ref": "#/components/schemas/CreateServiceProductVariantRequest" } } }, "discriminator": { "propertyName": "type" } }, "CreateServiceProductVariantRequest": { "type": "object", "properties": { "attributes": { "type": "object", "additionalProperties": { "type": "string" } }, "pricing": { "$ref": "#/components/schemas/FullProductPricing" }, "sku": { "type": "string" }, "stock": { "$ref": "#/components/schemas/ProductStock" } } }, "CreateShippingLineRequest": { "required": [ "amount", "method" ], "type": "object", "properties": { "amount": { "$ref": "#/components/schemas/MonetaryAmount" }, "method": { "maxLength": 100, "type": "string", "description": "Description of the shipping option." } }, "description": "Array of shipping line items. Describes the shipping options chosen at checkout. Currently accepts only one shipping entry." }, "CreateVariantRequestV2": { "required": [ "pricing", "sku" ], "type": "object", "properties": { "attributes": { "type": "object", "additionalProperties": { "type": "string", "description": "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." }, "description": "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." }, "gtin": { "type": "string", "description": "Global Trade Item Number (GTIN). Optional. Must be 8, 12, 13, or 14 numeric digits. Whitespace, hyphens, and underscores are stripped before validation. Supported for PHYSICAL products only.", "examples": [ "01234567890128" ] }, "mpn": { "type": "string", "description": "Manufacturer Part Number (MPN). Optional. Must be alphanumeric and 70 characters or fewer. Whitespace, hyphens, and underscores are stripped before validation. Supported for PHYSICAL products only.", "examples": [ "MPN-1234" ] }, "pricing": { "$ref": "#/components/schemas/ProductPricing" }, "shippingMeasurements": { "$ref": "#/components/schemas/ProductMeasurements" }, "sku": { "maxLength": 60, "type": "string", "description": "Merchant-defined code that identifies the product variant. Value must be unique among variants. Leading and trailing whitespace is removed." }, "stock": { "$ref": "#/components/schemas/ProductStock" } } }, "DateFilter": { "type": "object", "properties": { "after": { "type": "string", "description": "Filter out any dates after", "format": "date-time" }, "before": { "type": "string", "description": "Filter out any dates before", "format": "date-time" } }, "description": "Object for filtering by before and after dates" }, "DigitalGood": { "type": "object", "properties": { "filename": { "type": "string", "description": "Filename of the downloadable file." }, "id": { "type": "string", "description": "Unique DigitalGood id." } }, "description": "Present for DIGITAL products only." }, "DigitalProduct": { "title": "DigitalProduct", "required": [ "createdOn", "id", "modifiedOn", "storePageId", "type" ], "type": "object", "description": "A DIGITAL product.", "properties": { "createdOn": { "type": "string", "format": "date-time" }, "description": { "type": "string" }, "id": { "type": "string" }, "images": { "type": "array", "items": { "$ref": "#/components/schemas/ProductImage" } }, "isVisible": { "type": "boolean" }, "modifiedOn": { "type": "string", "format": "date-time" }, "name": { "type": "string" }, "seoOptions": { "$ref": "#/components/schemas/SeoOptions" }, "storePageId": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "type": { "$ref": "#/components/schemas/ProductTypeV2" }, "url": { "type": "string" }, "urlSlug": { "type": "string" }, "digitalGood": { "$ref": "#/components/schemas/DigitalGood" }, "pricing": { "$ref": "#/components/schemas/ProductPricing" } }, "discriminator": { "propertyName": "type" } }, "Discount": { "required": [ "criteria", "name", "template", "trigger", "validFrom" ], "type": "object", "properties": { "criteria": { "oneOf": [ { "$ref": "#/components/schemas/AnyOrderCriteria" }, { "$ref": "#/components/schemas/CartTotalCriteria" }, { "$ref": "#/components/schemas/ProductCriteria" } ] }, "id": { "type": "string", "description": "Discount id.", "readOnly": true }, "isLimitedUses": { "type": "boolean", "description": "If true, the discount can only be used `maxUsesAllowed` times site-wide." }, "isOncePerCustomer": { "type": "boolean", "description": "If true, a given customer can only use this discount once." }, "lastRedeemedAt": { "type": "string", "description": "Timestamp of the most recent redemption. Null if never redeemed.", "format": "date-time", "readOnly": true }, "maxUsesAllowed": { "type": "integer", "description": "Maximum site-wide redemptions. Required when isLimitedUses=true; null otherwise.", "format": "int32" }, "name": { "type": "string", "description": "Display name for the discount." }, "numberOfUses": { "type": "integer", "description": "Number of times this discount has been redeemed.", "format": "int32", "readOnly": true }, "paymentPlanOptions": { "$ref": "#/components/schemas/PaymentPlanOptions" }, "status": { "type": "string", "description": "Defines the lifecycle status of a discount.", "readOnly": true, "enum": [ "ACTIVE", "SCHEDULED", "EXPIRED" ] }, "subscriptionOptions": { "$ref": "#/components/schemas/SubscriptionOptions" }, "template": { "oneOf": [ { "$ref": "#/components/schemas/FixedAmountTemplate" }, { "$ref": "#/components/schemas/PercentageTemplate" } ] }, "trigger": { "oneOf": [ { "$ref": "#/components/schemas/AutoTrigger" }, { "$ref": "#/components/schemas/PromoCodeTrigger" } ] }, "validFrom": { "type": "string", "description": "When the discount becomes active.", "format": "date-time" }, "validTo": { "type": "string", "description": "When the discount expires. Null = no expiry.", "format": "date-time" }, "websiteId": { "type": "string", "description": "24-char website id.", "readOnly": true } }, "description": "Discount configured for a Commerce store." }, "DiscountLine": { "type": "object", "properties": { "amount": { "$ref": "#/components/schemas/MonetaryAmount" }, "description": { "type": "string", "description": "A plain-English description of the promotion", "examples": [ "20% off all orders over $50" ] }, "name": { "type": "string", "description": "Name of the promotion", "examples": [ "Summer Sale - 20% Off" ] }, "promoCode": { "type": "string", "description": "The user-entered promo code that triggered the discount", "examples": [ "SUMMER20" ] } }, "description": "Array of discount line items; describes the promotions redeemed during checkout." }, "DiscountResponse": { "required": [ "discount" ], "type": "object", "properties": { "discount": { "$ref": "#/components/schemas/Discount" } }, "description": "Envelope for a single discount response." }, "Email": { "type": "object", "properties": { "acceptsMarketing": { "$ref": "#/components/schemas/AcceptsMarketing" }, "createdOn": { "type": "string", "description": "The date and time when the email was created.", "format": "date-time", "readOnly": true }, "email": { "type": "string", "format": "email", "description": "The email address.", "examples": [ "jane.doe@example.com" ] } }, "description": "The contact's primary email." }, "ExtensionUninstallData": { "required": [ "clientId" ], "type": "object", "properties": { "clientId": { "type": "string", "description": "Third-party client id.", "examples": [ "A125dfPqdKJDqPAcJQgLo3A5mwcKIq2G" ] } }, "description": "The extension uninstall details." }, "ExtensionUninstallPayload": { "required": [ "createdOn", "id", "subscriptionsId", "topic", "websiteId" ], "type": "object", "properties": { "createdOn": { "type": "string", "description": "Creation date and time in UTC (ISO 8601 format) of this message.", "format": "date-time", "examples": [ "2024-01-28T10:44:00Z" ] }, "data": { "$ref": "#/components/schemas/ExtensionUninstallData" }, "id": { "type": "string", "description": "Unique notification id.", "examples": [ "5c2ba184b63ed3cb411ce2b1" ] }, "subscriptionsId": { "type": "string", "description": "Unique Webhook Subscriptions id.", "examples": [ "5f3c2155d947844beedda991" ] }, "topic": { "type": "string", "description": "Description of the event that triggered the notification.\n* `order.create` - always value for OrderCreatePayload.topic ref\n* `order.update` - always value for OrderUpdatePayload.topic\n* `extension.uninstall` - always value for ExtensionUninstallPayload.topic\n* `contact.create` - always value for ContactCreatePayload.topic\n* `contact.update` - always value for ContactUpdatePayload.topic\n* `contact.delete` - always value for ContactDeletePayload.topic\n* `address.create` - always value for AddressCreatePayload.topic\n* `address.update` - always value for AddressUpdatePayload.topic\n* `address.delete` - always value for AddressDeletePayload.topic\n", "enum": [ "extension.uninstall" ], "examples": [ "extension.uninstall" ] }, "websiteId": { "type": "string", "description": "Squarespace website id that triggered the notification.", "examples": [ "5f3c3d55ac435e1a051f77b3" ] } } }, "ExternalCreateWebhookSubscriptionRequest": { "required": [ "endpointUrl" ], "type": "object", "properties": { "endpointUrl": { "type": "string", "description": "HTTPS URL to POST webhook notifications.", "examples": [ "https://example-extension.com/uninstall" ] }, "topics": { "type": "array", "description": "List of event topics that trigger a webhook notification.", "items": { "type": "string", "description": "Description of the event that triggered the notification.\n* `order.create` - always value for OrderCreatePayload.topic ref\n* `order.update` - always value for OrderUpdatePayload.topic\n* `extension.uninstall` - always value for ExtensionUninstallPayload.topic\n* `contact.create` - always value for ContactCreatePayload.topic\n* `contact.update` - always value for ContactUpdatePayload.topic\n* `contact.delete` - always value for ContactDeletePayload.topic\n* `address.create` - always value for AddressCreatePayload.topic\n* `address.update` - always value for AddressUpdatePayload.topic\n* `address.delete` - always value for AddressDeletePayload.topic\n", "enum": [ "order.create", "order.update", "extension.uninstall", "contact.create", "contact.update", "contact.delete", "address.create", "address.update", "address.delete" ], "examples": [ "extension.uninstall" ] } } } }, "ExternalCreateWebhookSubscriptionResponse": { "required": [ "clientId", "createdOn", "endpointUrl", "id", "secret", "updatedOn", "websiteId" ], "type": "object", "properties": { "clientId": { "type": "string", "description": "Third-party client id.", "readOnly": true, "examples": [ "A125dfPqdKJDqPAcJQgLo3A5mwcKIq2G" ] }, "createdOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents when the webhook subscription was created.", "format": "date-time", "readOnly": true, "examples": [ "2020-04-22T22:18:00Z" ] }, "endpointUrl": { "type": "string", "description": "HTTPS URL to POST webhook notifications.", "examples": [ "https://example-extension.com/uninstall" ] }, "id": { "type": "string", "description": "Unique Webhook Subscription id.", "readOnly": true, "examples": [ "7aff04bb-90e0-4002-96c2-69d8162c8dae" ] }, "secret": { "type": "string", "description": "Hexadecimal value used to generate a signature for a webhook notification;\nfield is only returned when creating a new subscription or rotating a secret.\nStore the secret in a safe location to verify notifications from Squarespace.\nSee the 'Verifying notifications' guide under Webhooks for details.\n", "readOnly": true, "examples": [ "F3F9B981C78E7A6187E42853F6CE2804177E98206164779423B02DEC981ACD6B" ] }, "topics": { "type": "array", "description": "List of event topics that trigger a webhook notification.", "items": { "type": "string", "description": "Description of the event that triggered the notification.\n* `order.create` - always value for OrderCreatePayload.topic ref\n* `order.update` - always value for OrderUpdatePayload.topic\n* `extension.uninstall` - always value for ExtensionUninstallPayload.topic\n* `contact.create` - always value for ContactCreatePayload.topic\n* `contact.update` - always value for ContactUpdatePayload.topic\n* `contact.delete` - always value for ContactDeletePayload.topic\n* `address.create` - always value for AddressCreatePayload.topic\n* `address.update` - always value for AddressUpdatePayload.topic\n* `address.delete` - always value for AddressDeletePayload.topic\n", "enum": [ "order.create", "order.update", "extension.uninstall", "contact.create", "contact.update", "contact.delete", "address.create", "address.update", "address.delete" ], "examples": [ "extension.uninstall" ] } }, "updatedOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents when the webhook subscription was last modified.", "format": "date-time", "readOnly": true, "examples": [ "2020-04-22T22:18:00Z" ] }, "websiteId": { "type": "string", "description": "Unique Webhook Subscription id.", "readOnly": true, "examples": [ "7aff04bb-90e0-4002-96c2-69d8162c8dae" ] } } }, "ExternalRotateSecretResponse": { "type": "object", "properties": { "secret": { "type": "string", "description": "Hexadecimal value used to generate a signature for a webhook notification; field is only returned when creating a new subscription or rotating a secret. Store the secret in a safe location to verify notifications from Squarespace." } } }, "ExternalSendTestNotificationRequest": { "required": [ "topic" ], "type": "object", "properties": { "topic": { "type": "string", "description": "Required; Squarespace event topic that triggers a webhook notification. Possible values include: extension.uninstall, order.create, order.update." } } }, "ExternalTestNotificationResponse": { "type": "object", "properties": { "statusCode": { "type": "integer", "description": "Status code returned by the subscribed webhook endpoint.", "format": "int32" } } }, "ExternalTransactionProperty": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "description": "Array of properties for the payment transaction provided by the payment gateway. Properties are listed in key/value pairs." }, "ExternalUpdateWebhookSubscriptionRequest": { "type": "object", "properties": { "endpointUrl": { "$ref": "#/components/schemas/ChangeString" }, "topics": { "$ref": "#/components/schemas/ChangeListString" } } }, "ExternalWebhookSubscriptionListResponse": { "type": "object", "properties": { "webhookSubscriptions": { "type": "array", "description": "Array of Webhook Subscription resources. If the merchant site doesn't have any webhook subscriptions, this array is empty.", "items": { "$ref": "#/components/schemas/ExternalWebhookSubscriptionResponse" } } } }, "ExternalWebhookSubscriptionResponse": { "type": "object", "properties": { "clientId": { "type": "string", "description": "Third-party client id." }, "createdOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents when the webhook subscription was created." }, "endpointUrl": { "type": "string", "description": "HTTPS URL that receives webhook notifications." }, "id": { "type": "string", "description": "Unique Webhook Subscription id." }, "topics": { "type": "array", "description": "List of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update.", "items": { "type": "string", "description": "List of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update." } }, "updatedOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents when the webhook subscription was last modified." }, "websiteId": { "type": "string", "description": "Unique website id." } } }, "FixedAmountTemplate": { "title": "FixedAmountTemplate", "required": [ "discountAmount", "type" ], "type": "object", "description": "Apply a fixed monetary amount off the cart total.", "properties": { "type": { "type": "string" }, "discountAmount": { "$ref": "#/components/schemas/MonetaryAmount" } }, "discriminator": { "propertyName": "type" } }, "FormItem": { "type": "object", "properties": { "label": { "type": "string", "description": "The name of the form field", "examples": [ "How did you hear about us?" ] }, "value": { "type": "string", "description": "The value of the field, as entered by the shopper", "examples": [ "Facebook" ] } }, "description": "Array of form data submitted via the checkout page." }, "Fulfillment": { "type": "object", "properties": { "carrierName": { "type": "string", "description": "Name of the carrier handling the shipment.", "examples": [ "FedEx" ] }, "service": { "type": "string", "description": "Carrier's level of service for shipping.", "examples": [ "Same-Day Delivery" ] }, "shipDate": { "type": "string", "description": "ISO 8601 UTC date and time string; represents the moment the fulfillment was shipped.", "format": "date-time", "examples": [ "2017-01-29T22:19:26.98Z" ] }, "trackingNumber": { "type": "string", "description": "Carrier's parcel tracking number.", "examples": [ "103932814692659" ] }, "trackingUrl": { "type": "string", "description": "URL provided by the carrier to track the shipment.", "examples": [ "https://www.fedex.com/apps/fedextrack/?tracknumbers=103932814692659" ] } }, "description": "Array of shipping fulfillments; describes shipment information for the order." }, "FulfillmentStatus": { "type": "string", "description": "Current fulfillment status of the order. Value may be: PENDING, FULFILLED, or CANCELED.", "enum": [ "PENDING", "FULFILLED", "CANCELED" ] }, "FullProductPricing": { "type": "object", "properties": { "basePrice": { "$ref": "#/components/schemas/MonetaryAmount" }, "onSale": { "type": "boolean" }, "salePrice": { "$ref": "#/components/schemas/MonetaryAmount" } } }, "GetAddressBookEntryResponse": { "type": "object", "properties": { "addressBookEntry": { "$ref": "#/components/schemas/AddressBookEntry" } } }, "GetAddressBookResponse": { "type": "object", "properties": { "addressBook": { "$ref": "#/components/schemas/AddressBook" }, "pagination": { "$ref": "#/components/schemas/PaginationDetails" } } }, "GetContactResponse": { "type": "object", "properties": { "contact": { "$ref": "#/components/schemas/Contact" } } }, "GiftCardProduct": { "title": "GiftCardProduct", "required": [ "createdOn", "id", "modifiedOn", "storePageId", "type" ], "type": "object", "description": "A GIFT_CARD product.", "properties": { "createdOn": { "type": "string", "format": "date-time" }, "description": { "type": "string" }, "id": { "type": "string" }, "images": { "type": "array", "items": { "$ref": "#/components/schemas/ProductImage" } }, "isVisible": { "type": "boolean" }, "modifiedOn": { "type": "string", "format": "date-time" }, "name": { "type": "string" }, "seoOptions": { "$ref": "#/components/schemas/SeoOptions" }, "storePageId": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "type": { "$ref": "#/components/schemas/ProductTypeV2" }, "url": { "type": "string" }, "urlSlug": { "type": "string" }, "variants": { "type": "array", "items": { "$ref": "#/components/schemas/GiftCardProductVariant" } } }, "discriminator": { "propertyName": "type" } }, "GiftCardProductVariant": { "title": "GiftCardProductVariant", "type": "object", "properties": { "id": { "type": "string" }, "image": { "$ref": "#/components/schemas/ProductImage" }, "pricing": { "$ref": "#/components/schemas/SimpleProductPricing" }, "sku": { "type": "string" } }, "description": "A variant of a GIFT_CARD product." }, "ImageProcessingStatus": { "type": "string", "enum": [ "QUEUED", "PROCESSING", "READY", "ERROR" ] }, "IntegerFilter": { "type": "object", "properties": { "max": { "type": "integer", "description": "Filter out any numbers greater", "format": "int32" }, "min": { "type": "integer", "description": "Filter out any numbers lower", "format": "int32" } }, "description": "Object for filtering by a min and max integer" }, "InventoryItem": { "type": "object", "properties": { "descriptor": { "type": "string", "description": "Generated description using the product's title and any available variant attributes including, but not limited to, color and size." }, "isUnlimited": { "type": "boolean", "description": "Indicates whether stock is currently tracked for the item." }, "quantity": { "type": "integer", "description": "Current amount in stock, or the last known stock amount prior to becoming unlimited. This value is modified by purchases and returns only when `isUnlimited` is `false`.", "format": "int32" }, "sku": { "type": "string", "description": "Stock keeping unit (SKU) code assigned by the Squarespace merchant for the variant; used to identify an exact variant of a product using a naming scheme preferred by the merchant." }, "variantId": { "type": "string", "description": "The product variant id, which also serves as a unique id for the InventoryItem." } }, "description": "Array of InventoryItem resources. If the merchant site doesn't have any physical or service products, this array is empty." }, "InventoryItemListResponse": { "type": "object", "properties": { "inventory": { "type": "array", "description": "Array of InventoryItem resources. If the merchant site doesn't have any physical or service products, this array is empty.", "items": { "$ref": "#/components/schemas/InventoryItem" } } } }, "InventoryQuantityExpression": { "type": "object", "properties": { "quantity": { "type": "integer", "description": "Quantity value for the inventory operation.", "format": "int32" }, "variantId": { "type": "string", "description": "Unique id for the InventoryItem." } }, "description": "Optional; array of objects. Sets the exact stock quantity for InventoryItems." }, "LineItem": { "type": "object", "properties": { "customizations": { "type": "array", "description": "Array of form data submitted via a product's custom form prior to being added to the cart.", "items": { "$ref": "#/components/schemas/FormItem" } }, "height": { "type": "number", "description": "Shipping height of the physical product variant. 0.0 when not specified or when the variant is not a physical product.", "format": "float", "examples": [ 4 ] }, "id": { "type": "string", "description": "Unique line item id.", "examples": [ "585d4975dee9f31a60284a16" ] }, "imageUrl": { "type": "string", "description": "URL of the primary image for the item.", "examples": [ "https://static.squarespace.com/universal/commerce/images/brine-32oz-spring-mix-v2.jpg?format=300w" ] }, "length": { "type": "number", "description": "Shipping length of the physical product variant. 0.0 when not specified or when the variant is not a physical product.", "format": "float", "examples": [ 3 ] }, "lineItemType": { "type": "string", "description": "Product type of the item.", "examples": [ "PHYSICAL_PRODUCT" ] }, "productId": { "type": "string", "description": "Unique product id; unless null, every line item with a variantId is a variant of a product with productId.", "examples": [ "565c8f3da7c8a3cf71d5fd0a" ] }, "productName": { "type": "string", "description": "Name of the purchased product.", "examples": [ "Product" ] }, "quantity": { "type": "integer", "description": "Amount of the item purchased.", "format": "int32", "examples": [ 1 ] }, "sku": { "type": "string", "description": "Stock keeping unit (SKU) code assigned by the Squarespace merchant for a variant. Null for digital products.", "examples": [ "SQ3381024" ] }, "unitPricePaid": { "$ref": "#/components/schemas/MonetaryAmount" }, "variantId": { "type": "string", "description": "Unique id of the ProductVariant sold. Populated for physical, service, or gift card line items created on or after May 28, 2019.", "examples": [ "88c16ee4-547b-445e-a392-bded9991ae30" ] }, "variantOptions": { "type": "array", "description": "Array of variant options; represents variant choices made by the customer. Null for download and gift card products.", "items": { "$ref": "#/components/schemas/VariantOption" } }, "weight": { "type": "number", "description": "Shipping weight of the physical product variant. 0.0 when not specified or when the variant is not a physical product.", "format": "float", "examples": [ 1 ] }, "width": { "type": "number", "description": "Shipping width of the physical product variant. 0.0 when not specified or when the variant is not a physical product.", "format": "float", "examples": [ 2 ] } }, "description": "Array of purchased line items; line items describe what product or product variant was purchased, how many of that item were purchased, and additional details." }, "Location": { "type": "object", "properties": { "country": { "type": "string" }, "region": { "type": "string" } } }, "MeasurementStandard": { "type": "string", "enum": [ "IMPERIAL", "METRIC" ] }, "MemberProfile": { "type": "object", "properties": { "email": { "type": "string", "description": "Profile email address." }, "firstName": { "type": "string", "description": "Profile first name." }, "id": { "type": "string", "description": "Unique Profile id." }, "lastName": { "type": "string", "description": "Profile last name." } } }, "MonetaryAmount": { "type": "object", "properties": { "currency": { "type": "object", "description": "ISO 4217 currency code", "properties": { "currencyCode": { "type": "string" }, "defaultFractionDigits": { "type": "integer", "format": "int32" }, "displayName": { "type": "string" }, "numericCode": { "type": "integer", "format": "int32" }, "numericCodeAsString": { "type": "string" }, "symbol": { "type": "string" } }, "examples": [ "USD" ] }, "value": { "type": "number", "description": "Decimal monetary value", "examples": [ 49.99 ] } }, "description": "A monetary amount with currency code and decimal value" }, "Order": { "type": "object", "properties": { "billingAddress": { "$ref": "#/components/schemas/Address" }, "channel": { "type": "string", "description": "Where the order originated; possible values are: web and pos.", "examples": [ "web" ] }, "channelName": { "type": "string", "description": "Name of the third-party sales channel.", "examples": [ "Faire Wholesale" ] }, "createdOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents the moment when the order was placed.", "format": "date-time", "examples": [ "2016-12-23T15:58:07.187Z" ] }, "customerEmail": { "type": "string", "description": "Email address entered at checkout or, for recurring subscription orders, the customer's current email address.", "examples": [ "foo@example.com" ] }, "customerId": { "type": "string", "description": "Unique customer id.", "examples": [ "585d498fdee9f31a60284a38" ] }, "discountLines": { "type": "array", "description": "Array of discount line items; describes the promotions redeemed during checkout.", "items": { "$ref": "#/components/schemas/DiscountLine" } }, "discountTotal": { "$ref": "#/components/schemas/MonetaryAmount" }, "externalOrderReference": { "type": "string", "description": "Order reference identifier used by the third-party sales channel.", "examples": [ "EXT-98765" ] }, "formSubmission": { "type": "array", "description": "Array of form data submitted via the checkout page.", "items": { "$ref": "#/components/schemas/FormItem" } }, "fulfilledOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents the moment the order was fulfilled.", "format": "date-time" }, "fulfillmentStatus": { "$ref": "#/components/schemas/FulfillmentStatus" }, "fulfillments": { "type": "array", "description": "Array of shipping fulfillments; describes shipment information for the order.", "items": { "$ref": "#/components/schemas/Fulfillment" } }, "grandTotal": { "$ref": "#/components/schemas/MonetaryAmount" }, "id": { "type": "string", "description": "Unique Order id.", "examples": [ "585d498fdee9f31a60284a37" ] }, "internalNotes": { "type": "array", "description": "Array of internal notes added to the order by the merchant.", "items": { "$ref": "#/components/schemas/OrderNote" } }, "lineItems": { "type": "array", "description": "Array of purchased line items; line items describe what product or product variant was purchased, how many of that item were purchased, and additional details.", "items": { "$ref": "#/components/schemas/LineItem" } }, "modifiedOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents when the order was last modified.", "format": "date-time", "examples": [ "2016-12-23T15:58:07.187Z" ] }, "orderNumber": { "type": "string", "description": "Unique, sequential number for the Order.", "examples": [ "3" ] }, "paymentState": { "$ref": "#/components/schemas/PaymentState" }, "priceTaxInterpretation": { "type": "string", "description": "Indicates whether lineItems.unitPricePaid includes tax. Values may be EXCLUSIVE or INCLUSIVE.", "examples": [ "EXCLUSIVE" ] }, "refundedTotal": { "$ref": "#/components/schemas/MonetaryAmount" }, "shippingAddress": { "$ref": "#/components/schemas/Address" }, "shippingLines": { "type": "array", "description": "Array of shipping line items; describes the shipping options chosen at checkout.", "items": { "$ref": "#/components/schemas/ShippingLine" } }, "shippingOptionName": { "type": "string", "description": "the specific shipping service name selected at checkout (e.g. \"USPS Ground Advantage\", \"Royal Mail Tracked 48\")." }, "shippingOptionServiceType": { "type": "string", "description": "The carrier service type identifier.", "enum": [ "FEDEX_GROUND", "FEDEX_GROUND_HOME_DELIVERY", "FEDEX_PRIORITY_OVERNIGHT", "FEDEX_STANDARD_OVERNIGHT", "FEDEX_2_DAY", "FEDEX_2_DAY_AM", "FEDEX_EXPRESS_SAVER", "FEDEX_FIRST_FREIGHT", "FEDEX_FREIGHT_PRIORITY", "FEDEX_FREIGHT_ECONOMY", "FEDEX_FIRST_OVERNIGHT", "FEDEX_SAME_DAY", "FEDEX_SAME_DAY_CITY", "FEDEX_EUROPE_FIRST_INTERNATIONAL_PRIORITY", "FEDEX_INTERNATIONAL_ECONOMY", "FEDEX_INTERNATIONAL_FIRST", "FEDEX_INTERNATIONAL_PRIORITY", "FEDEX_INTERNATIONAL_ECONOMY_FREIGHT", "FEDEX_INTERNATIONAL_PRIORITY_FREIGHT", "UPS_GROUND", "UPS_NEXT_DAY_AIR", "UPS_NEXT_DAY_AIR_SAVER", "UPS_NEXT_DAY_AIR_EARLY_AM", "UPS_TWO_DAY_AIR", "UPS_THREE_DAY_SELECT", "UPS_TWO_DAY_AIR_AM", "USPS_UNKNOWN", "USPS_FIRST_CLASS", "USPS_PRIORITY", "USPS_EXPRESS", "USPS_STANDARD", "USPS_ALL", "USPS_ONLINE", "OTHER" ] }, "shippingTotal": { "$ref": "#/components/schemas/MonetaryAmount" }, "subtotal": { "$ref": "#/components/schemas/MonetaryAmount" }, "taxTotal": { "$ref": "#/components/schemas/MonetaryAmount" }, "testmode": { "type": "boolean", "description": "If true, the order is a test order created using a payment method in test mode." } } }, "OrderCreateData": { "required": [ "orderId" ], "type": "object", "properties": { "orderId": { "type": "string", "description": "Unique order id.", "examples": [ "5f3c39ce69e11e796f19990e" ] } }, "description": "The created order details." }, "OrderCreateFulfillmentStatus": { "type": "string", "description": "Current fulfillment status of the order. Value may be PENDING or FULFILLED.", "enum": [ "PENDING", "FULFILLED" ] }, "OrderCreateLineItemType": { "type": "string", "description": "Product type sold; values may be PHYSICAL_PRODUCT or CUSTOM.", "enum": [ "PHYSICAL_PRODUCT", "CUSTOM" ] }, "OrderCreatePayload": { "required": [ "createdOn", "id", "subscriptionsId", "topic", "websiteId" ], "type": "object", "properties": { "createdOn": { "type": "string", "description": "Creation date and time in UTC (ISO 8601 format) of this message.", "format": "date-time", "examples": [ "2024-01-28T10:44:00Z" ] }, "data": { "$ref": "#/components/schemas/OrderCreateData" }, "id": { "type": "string", "description": "Unique notification id.", "examples": [ "5c2ba184b63ed3cb411ce2b1" ] }, "subscriptionsId": { "type": "string", "description": "Unique Webhook Subscriptions id.", "examples": [ "5f3c2155d947844beedda991" ] }, "topic": { "type": "string", "description": "Description of the event that triggered the notification.\n* `order.create` - always value for OrderCreatePayload.topic ref\n* `order.update` - always value for OrderUpdatePayload.topic\n* `extension.uninstall` - always value for ExtensionUninstallPayload.topic\n* `contact.create` - always value for ContactCreatePayload.topic\n* `contact.update` - always value for ContactUpdatePayload.topic\n* `contact.delete` - always value for ContactDeletePayload.topic\n* `address.create` - always value for AddressCreatePayload.topic\n* `address.update` - always value for AddressUpdatePayload.topic\n* `address.delete` - always value for AddressDeletePayload.topic\n", "default": "order.create", "enum": [ "order.create" ], "examples": [ "order.create" ] }, "websiteId": { "type": "string", "description": "Squarespace website id that triggered the notification.", "examples": [ "5f3c3d55ac435e1a051f77b3" ] } } }, "OrderFulfillmentRequest": { "type": "object", "properties": { "shipments": { "type": "array", "description": "Array of shipment data.", "items": { "$ref": "#/components/schemas/CreateOrderShipmentRequest" } }, "shouldSendNotification": { "type": "boolean", "description": "Indicates whether the customer should receive an email notification about the added shipments." } } }, "OrderListResponse": { "type": "object", "properties": { "pagination": { "examples": [ { "hasNextPage": true, "nextPageCursor": "ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ", "nextPageUrl": "/1.0/commerce/orders?cursor=ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ" } ], "type": "object", "properties": { "hasNextPage": { "type": "boolean" }, "nextPageCursor": { "type": "string" }, "nextPageUrl": { "type": "string" } } }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/Order" } } } }, "OrderNote": { "type": "object", "properties": { "content": { "type": "string", "description": "Content for the note", "examples": [ "First note" ] } }, "description": "Array of internal notes added to the order by the merchant." }, "OrderUpdateData": { "required": [ "orderId", "update" ], "type": "object", "properties": { "orderId": { "type": "string", "description": "Unique order id.", "examples": [ "5f3c39ce69e11e796f19990e" ] }, "update": { "type": "string", "description": "The type of update on the order.", "enum": [ "FULFILLED", "REFUNDED", "CANCELED", "MARKED_PENDING", "EMAIL_UPDATED" ], "examples": [ "FULFILLED" ] } }, "description": "The updated order details." }, "OrderUpdatePayload": { "required": [ "createdOn", "id", "subscriptionsId", "topic", "websiteId" ], "type": "object", "properties": { "createdOn": { "type": "string", "description": "Creation date and time in UTC (ISO 8601 format) of this message.", "format": "date-time", "examples": [ "2024-01-28T10:44:00Z" ] }, "data": { "$ref": "#/components/schemas/OrderUpdateData" }, "id": { "type": "string", "description": "Unique notification id.", "examples": [ "5c2ba184b63ed3cb411ce2b1" ] }, "subscriptionsId": { "type": "string", "description": "Unique Webhook Subscriptions id.", "examples": [ "5f3c2155d947844beedda991" ] }, "topic": { "type": "string", "description": "Description of the event that triggered the notification.\n* `order.create` - always value for OrderCreatePayload.topic ref\n* `order.update` - always value for OrderUpdatePayload.topic\n* `extension.uninstall` - always value for ExtensionUninstallPayload.topic\n* `contact.create` - always value for ContactCreatePayload.topic\n* `contact.update` - always value for ContactUpdatePayload.topic\n* `contact.delete` - always value for ContactDeletePayload.topic\n* `address.create` - always value for AddressCreatePayload.topic\n* `address.update` - always value for AddressUpdatePayload.topic\n* `address.delete` - always value for AddressDeletePayload.topic\n", "default": "order.update", "enum": [ "order.update" ], "examples": [ "order.update" ] }, "websiteId": { "type": "string", "description": "Squarespace website id that triggered the notification.", "examples": [ "5f3c3d55ac435e1a051f77b3" ] } } }, "PaginatedDiscountListResponse": { "required": [ "discounts" ], "type": "object", "properties": { "discounts": { "type": "array", "description": "Discounts for this page.", "items": { "$ref": "#/components/schemas/Discount" } }, "hasNextPage": { "type": "boolean", "description": "True when more results exist after the current window." }, "hasPreviousPage": { "type": "boolean", "description": "True when a page of results exists before the current window." } }, "description": "Offset-paginated list of discounts for a website." }, "PaginatedGetContactsResponse": { "type": "object", "properties": { "contacts": { "type": "array", "description": "paginated list of contacts retrieved", "items": { "$ref": "#/components/schemas/Contact" } }, "pagination": { "examples": [ { "hasNextPage": true, "nextPageCursor": "ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ", "nextPageUrl": "/v1/contacts?cursor=ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ" } ], "type": "object", "properties": { "hasNextPage": { "type": "boolean" }, "nextPageCursor": { "type": "string" }, "nextPageUrl": { "type": "string" } } } } }, "PaginatedInventoryItemListResponse": { "type": "object", "properties": { "inventory": { "type": "array", "description": "Array of InventoryItem resources. If the merchant site doesn't have any physical or service product variants, this array is empty.", "items": { "$ref": "#/components/schemas/InventoryItem" } }, "pagination": { "examples": [ { "hasNextPage": true, "nextPageCursor": "ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ", "nextPageUrl": "/1.0/commerce/inventory?cursor=ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ" } ], "type": "object", "properties": { "hasNextPage": { "type": "boolean" }, "nextPageCursor": { "type": "string" }, "nextPageUrl": { "type": "string" } } } } }, "PaginatedProductListResponse": { "type": "object", "properties": { "pagination": { "examples": [ { "hasNextPage": true, "nextPageCursor": "ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ", "nextPageUrl": "/1.0/commerce/products?cursor=ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ" } ], "type": "object", "properties": { "hasNextPage": { "type": "boolean" }, "nextPageCursor": { "type": "string" }, "nextPageUrl": { "type": "string" } } }, "products": { "type": "array", "items": { "$ref": "#/components/schemas/Product" } } } }, "PaginatedProductListResponseV2": { "type": "object", "properties": { "pagination": { "examples": [ { "hasNextPage": true, "nextPageCursor": "ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ", "nextPageUrl": "/v2/commerce/products?cursor=ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ" } ], "type": "object", "properties": { "hasNextPage": { "type": "boolean" }, "nextPageCursor": { "type": "string" }, "nextPageUrl": { "type": "string" } } }, "products": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/DigitalProduct" }, { "$ref": "#/components/schemas/GiftCardProduct" }, { "$ref": "#/components/schemas/PhysicalProduct" }, { "$ref": "#/components/schemas/ServiceProduct" } ] } } } }, "PaginatedProfileListResponse": { "type": "object", "properties": { "pagination": { "examples": [ { "hasNextPage": true, "nextPageCursor": "ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ", "nextPageUrl": "/1.0/profiles?cursor=ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ" } ], "type": "object", "properties": { "hasNextPage": { "type": "boolean" }, "nextPageCursor": { "type": "string" }, "nextPageUrl": { "type": "string" } } }, "profiles": { "type": "array", "items": { "$ref": "#/components/schemas/Profile" } } } }, "PaginatedQueryContactsResponse": { "type": "object", "properties": { "contacts": { "type": "array", "description": "paginated list of contacts retrieved", "items": { "$ref": "#/components/schemas/Contact" } }, "pagination": { "examples": [ { "hasNextPage": true, "nextPageCursor": "ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ", "nextPageUrl": "/v1/contacts?cursor=ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ" } ], "type": "object", "properties": { "hasNextPage": { "type": "boolean" }, "nextPageCursor": { "type": "string" }, "nextPageUrl": { "type": "string" } } } } }, "PaginatedStorePagesResponse": { "type": "object", "properties": { "pagination": { "examples": [ { "hasNextPage": true, "nextPageCursor": "ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ", "nextPageUrl": "/1.0/commerce/store_pages?cursor=ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ" } ], "type": "object", "properties": { "hasNextPage": { "type": "boolean" }, "nextPageCursor": { "type": "string" }, "nextPageUrl": { "type": "string" } } }, "storePages": { "type": "array", "items": { "$ref": "#/components/schemas/StorePage" } } } }, "PaginatedTransactionListResponse": { "type": "object", "properties": { "documents": { "type": "array", "description": "Array of Document resources. If the merchant site doesn't have any payment transactions for orders or donations, this array is empty.", "items": { "$ref": "#/components/schemas/TransactionDocument" } }, "pagination": { "examples": [ { "hasNextPage": true, "nextPageCursor": "ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ", "nextPageUrl": "/1.0/commerce/transactions?cursor=ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ" } ], "type": "object", "properties": { "hasNextPage": { "type": "boolean" }, "nextPageCursor": { "type": "string" }, "nextPageUrl": { "type": "string" } } } } }, "PaginationDetails": { "type": "object", "properties": { "hasNextPage": { "type": "boolean" }, "nextPageCursor": { "type": "string" }, "nextPageUrl": { "type": "string" } } }, "PatchContactRequest": { "type": "object", "properties": { "firstName": { "type": "string", "description": "The contact's first name.", "examples": [ "John" ] }, "lastName": { "type": "string", "description": "The contact's last name.", "examples": [ "Smith" ] }, "locale": { "type": "string", "description": "The contact's locale.", "examples": [ "en-US" ] }, "primaryEmail": { "$ref": "#/components/schemas/PatchEmail" } }, "description": "Fields to update on an existing contact.", "examples": [ { "firstName": "John", "lastName": "Smith", "locale": "en-US", "primaryEmail": { "email": "johnsmith@mail.com", "acceptsMarketing": true } } ] }, "PatchContactResponse": { "type": "object", "properties": { "contact": { "$ref": "#/components/schemas/Contact" } } }, "PatchEmail": { "type": "object", "properties": { "acceptsMarketing": { "type": "boolean", "description": "If contact's email accepts marketing", "examples": [ true ] }, "email": { "type": "string", "format": "email", "description": "The email address.", "examples": [ "jane.doe@example.com" ] } }, "description": "Primary email fields for an update request.", "examples": [ { "email": "johnsmith@mail.com", "acceptsMarketing": true } ] }, "PaymentGatewayError": { "type": "string", "description": "Captures errors from the payment gateway; value is null if not applicable.", "enum": [ "GATEWAY_FEE_PROCEESING_ERROR", "GATEWAY_API_PERMISSION_ERROR", "GATEWAY_DISCONNNECTED" ] }, "PaymentPlanOptions": { "required": [ "type" ], "type": "object", "properties": { "type": { "type": "string", "description": "Defines how the discount applies to payment-plan payments.", "enum": [ "NONE", "ALL_PAYMENTS" ] } }, "description": "Payment-plan applicability settings for this discount. When omitted from a create or update request, defaults to NONE." }, "PaymentState": { "type": "string", "description": "Current state of payment for the order.", "enum": [ "NOT_CHARGED", "AUTHORIZED", "PAID", "REFUNDED", "PENDING", "FAILED", "REFUND_PENDING", "REFUND_FAILED", "PARTIALLY_PAID" ] }, "PercentageTemplate": { "title": "PercentageTemplate", "required": [ "percentage", "type" ], "type": "object", "description": "Apply a percentage discount off the cart total.", "properties": { "type": { "type": "string" }, "percentage": { "maximum": 100, "exclusiveMinimum": 0, "type": "number", "description": "Percentage to subtract from the cart total. Range (0, 100]." } }, "discriminator": { "propertyName": "type" } }, "PhysicalProduct": { "title": "PhysicalProduct", "required": [ "createdOn", "id", "modifiedOn", "storePageId", "type" ], "type": "object", "description": "A PHYSICAL product.", "properties": { "createdOn": { "type": "string", "format": "date-time" }, "description": { "type": "string" }, "id": { "type": "string" }, "images": { "type": "array", "items": { "$ref": "#/components/schemas/ProductImage" } }, "isVisible": { "type": "boolean" }, "modifiedOn": { "type": "string", "format": "date-time" }, "name": { "type": "string" }, "seoOptions": { "$ref": "#/components/schemas/SeoOptions" }, "storePageId": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "type": { "$ref": "#/components/schemas/ProductTypeV2" }, "url": { "type": "string" }, "urlSlug": { "type": "string" }, "variantAttributes": { "type": "array", "items": { "type": "string" } }, "variants": { "type": "array", "items": { "$ref": "#/components/schemas/PhysicalProductVariant" } } }, "discriminator": { "propertyName": "type" } }, "PhysicalProductVariant": { "title": "PhysicalProductVariant", "type": "object", "properties": { "attributes": { "type": "object", "additionalProperties": { "type": "string" } }, "gtin": { "type": "string" }, "id": { "type": "string" }, "image": { "$ref": "#/components/schemas/ProductImage" }, "mpn": { "type": "string" }, "pricing": { "$ref": "#/components/schemas/FullProductPricing" }, "shippingMeasurements": { "$ref": "#/components/schemas/ProductMeasurements" }, "sku": { "type": "string" }, "stock": { "$ref": "#/components/schemas/ProductStock" } }, "description": "A variant of a PHYSICAL product." }, "Product": { "type": "object", "properties": { "createdOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents when the Product was created.", "format": "date-time" }, "description": { "type": "string", "description": "Long-form product description represented in HTML." }, "digitalGood": { "$ref": "#/components/schemas/DigitalGood" }, "id": { "type": "string", "description": "Unique Product id." }, "images": { "type": "array", "description": "List of product images.", "items": { "$ref": "#/components/schemas/ProductImage" } }, "isVisible": { "type": "boolean", "description": "Indicates whether the product is available for purchase." }, "modifiedOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents when the Product was last modified.", "format": "date-time" }, "name": { "type": "string", "description": "Product name." }, "pricing": { "$ref": "#/components/schemas/ProductPricing" }, "seoOptions": { "$ref": "#/components/schemas/SeoOptions" }, "storePageId": { "type": "string", "description": "Identifier of the product's Store Page." }, "tags": { "type": "array", "description": "Keywords for search and organization purposes.", "items": { "type": "string", "description": "Keywords for search and organization purposes." } }, "type": { "$ref": "#/components/schemas/ProductType" }, "url": { "type": "string", "description": "Absolute URL of the product details page." }, "urlSlug": { "type": "string", "description": "URL slug for the new product." }, "variantAttributes": { "type": "array", "description": "List of attributes to distinguish variants of the product. Present for PHYSICAL products only.", "items": { "type": "string", "description": "List of attributes to distinguish variants of the product. Present for PHYSICAL products only." } }, "variants": { "type": "array", "description": "List of variants of the product. Present for PHYSICAL and GIFT_CARD products only.", "items": { "$ref": "#/components/schemas/ProductVariant" } } } }, "ProductCriteria": { "title": "ProductCriteria", "type": "object", "description": "Discount applies when the cart contains a specific product.", "required": [ "type" ], "properties": { "type": { "type": "string" }, "productId": { "type": "string", "description": "Identifier of the product the discount targets." }, "productName": { "type": "string", "description": "Display-time snapshot of the product name at the time the discount was created." } }, "discriminator": { "propertyName": "type" } }, "ProductDimensions": { "type": "object", "properties": { "height": { "type": "number", "description": "Height of the variant.", "format": "float" }, "length": { "type": "number", "description": "Length of the variant.", "format": "float" }, "unit": { "$ref": "#/components/schemas/ProductDimensionsUnit" }, "width": { "type": "number", "description": "Width of the variant.", "format": "float" } }, "description": "Physical dimensions of the variant." }, "ProductDimensionsUnit": { "type": "string", "description": "Unit of measurement. Supported values: `INCH`, `CENTIMETER`.", "enum": [ "CENTIMETER", "INCH" ] }, "ProductImage": { "type": "object", "properties": { "altText": { "type": "string", "description": "Alt text for the image; impacts SEO and appears in search results." }, "availableFormats": { "type": "array", "description": "Available image sizes. Use with `images.url` and a `format` query parameter to retrieve the image at a particular width.", "items": { "type": "string", "description": "Available image sizes. Use with `images.url` and a `format` query parameter to retrieve the image at a particular width." } }, "id": { "type": "string", "description": "Unique ProductImage id." }, "orderIndex": { "type": "integer", "description": "Position of the image in the product's image list.", "format": "int32" }, "originalSize": { "type": "object", "description": "Image size when first uploaded." }, "url": { "type": "string", "description": "Absolute URL of the image hosted on Squarespace." } }, "description": "Product image assigned to the variant." }, "ProductImageProcessingStatus": { "type": "object", "properties": { "id": { "type": "string" }, "status": { "$ref": "#/components/schemas/ImageProcessingStatus" } } }, "ProductListResponse": { "type": "object", "properties": { "products": { "type": "array", "items": { "$ref": "#/components/schemas/Product" } } } }, "ProductListResponseV2": { "type": "object", "properties": { "products": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/DigitalProduct" }, { "$ref": "#/components/schemas/GiftCardProduct" }, { "$ref": "#/components/schemas/PhysicalProduct" }, { "$ref": "#/components/schemas/ServiceProduct" } ] } } } }, "ProductMeasurements": { "type": "object", "properties": { "dimensions": { "$ref": "#/components/schemas/ProductDimensions" }, "weight": { "$ref": "#/components/schemas/ProductWeight" } }, "description": "Measurements of the variant when it's shipped. Present for PHYSICAL products only." }, "ProductPricing": { "type": "object", "properties": { "basePrice": { "$ref": "#/components/schemas/MonetaryAmount" }, "onSale": { "type": "boolean", "description": "Indicates whether the variant is sold according to its sale price. Present for PHYSICAL products only." }, "salePrice": { "$ref": "#/components/schemas/MonetaryAmount" } }, "description": "Present for DIGITAL products only. Digital products don't have variants, so pricing is at the product level." }, "ProductStock": { "type": "object", "properties": { "quantity": { "type": "integer", "description": "Number of units that can be purchased.", "format": "int32" }, "unlimited": { "type": "boolean", "description": "Indicates whether the variant has unlimited stock." } }, "description": "Available stock for the variant. Present for PHYSICAL products only." }, "ProductType": { "type": "string", "description": "Product type indicator. Value may be: `PHYSICAL` or `DIGITAL`.", "enum": [ "PHYSICAL", "DIGITAL" ] }, "ProductTypeV2": { "type": "string", "enum": [ "PHYSICAL", "SERVICE", "GIFT_CARD", "DIGITAL" ] }, "ProductV2": { "required": [ "createdOn", "id", "modifiedOn", "storePageId", "type" ], "type": "object", "properties": { "createdOn": { "type": "string", "format": "date-time" }, "description": { "type": "string" }, "id": { "type": "string" }, "images": { "type": "array", "items": { "$ref": "#/components/schemas/ProductImage" } }, "isVisible": { "type": "boolean" }, "modifiedOn": { "type": "string", "format": "date-time" }, "name": { "type": "string" }, "seoOptions": { "$ref": "#/components/schemas/SeoOptions" }, "storePageId": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "type": { "$ref": "#/components/schemas/ProductTypeV2" }, "url": { "type": "string" }, "urlSlug": { "type": "string" } }, "discriminator": { "propertyName": "type" } }, "ProductVariant": { "type": "object", "properties": { "attributes": { "type": "object", "description": "Specifies attribute-value pairs for the variant. Present for PHYSICAL products only." }, "id": { "type": "string", "description": "Unique ProductVariant id." }, "image": { "$ref": "#/components/schemas/ProductImage" }, "pricing": { "$ref": "#/components/schemas/ProductPricing" }, "shippingMeasurements": { "$ref": "#/components/schemas/ProductMeasurements" }, "sku": { "type": "string", "description": "Merchant-defined code that identifies the product variant." }, "stock": { "$ref": "#/components/schemas/ProductStock" } }, "description": "List of variants of the product. Present for PHYSICAL and GIFT_CARD products only." }, "ProductVariantV2": { "type": "object", "properties": { "id": { "type": "string" }, "image": { "$ref": "#/components/schemas/ProductImage" }, "sku": { "type": "string" } }, "description": "A product variant. The shape depends on the product type.", "oneOf": [ { "$ref": "#/components/schemas/PhysicalProductVariant" }, { "$ref": "#/components/schemas/GiftCardProductVariant" }, { "$ref": "#/components/schemas/ServiceProductVariant" } ] }, "ProductWeight": { "type": "object", "properties": { "unit": { "$ref": "#/components/schemas/ProductWeightUnit" }, "value": { "type": "number", "description": "Weight amount.", "format": "float" } }, "description": "Weight of the variant." }, "ProductWeightUnit": { "type": "string", "description": "Unit of measurement. Supported values: `KILOGRAM`, `POUND`.", "enum": [ "KILOGRAM", "POUND" ] }, "Profile": { "type": "object", "properties": { "acceptsMarketing": { "type": "boolean", "description": "Indicates whether the profile opted to receive marketing." }, "address": { "$ref": "#/components/schemas/Address" }, "createdOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents when the profile was created.", "format": "date-time" }, "email": { "type": "string", "description": "Profile email address." }, "firstName": { "type": "string", "description": "Profile first name." }, "hasAccount": { "type": "boolean", "description": "Indicates whether the profile has an account with the website." }, "id": { "type": "string", "description": "Unique Profile id." }, "isCustomer": { "type": "boolean", "description": "Indicates whether the profile has any commerce orders or donations with the website." }, "lastName": { "type": "string", "description": "Profile last name." }, "transactionsSummary": { "$ref": "#/components/schemas/TransactionsSummary" } } }, "ProfileListResponse": { "type": "object", "properties": { "profiles": { "type": "array", "items": { "$ref": "#/components/schemas/Profile" } } } }, "PromoCodeTrigger": { "title": "PromoCodeTrigger", "required": [ "promoCode", "type" ], "type": "object", "description": "Trigger for a discount that is unlocked by a shopper-entered promo code.", "properties": { "type": { "type": "string" }, "promoCode": { "pattern": "^[A-Za-z0-9_\\-]{1,50}$", "type": "string", "description": "Shopper-entered promo code. Required, non-empty, 1–50 characters; allowed characters: letters, digits, underscore, hyphen." } }, "discriminator": { "propertyName": "type" } }, "QueryContactsRequest": { "type": "object", "properties": { "acceptsMarketingWithDate": { "$ref": "#/components/schemas/AcceptsMarketingWithDate" }, "cursor": { "type": "string", "description": "The cursor for the next page of results. Use the value of `pagination.nextPageCursor` from the previous response." }, "donationAmount": { "$ref": "#/components/schemas/IntegerFilter" }, "donationCount": { "$ref": "#/components/schemas/IntegerFilter" }, "firstDonationOn": { "$ref": "#/components/schemas/DateFilter" }, "firstOrderOn": { "$ref": "#/components/schemas/DateFilter" }, "lastDonationOn": { "$ref": "#/components/schemas/DateFilter" }, "lastOrderOn": { "$ref": "#/components/schemas/DateFilter" }, "orderAmount": { "$ref": "#/components/schemas/IntegerFilter" }, "orderCount": { "$ref": "#/components/schemas/IntegerFilter" }, "pageSize": { "maximum": 1000, "minimum": 1, "type": "integer", "description": "The number of contacts to return per request.", "format": "int32", "default": 50 }, "searchString": { "type": "string", "description": "Search string for Name and Email address" }, "sortDirection": { "type": "string", "description": "Direction to sort results, ASCENDING or DESCENDING", "enum": [ "ASCENDING", "DESCENDING" ] }, "sortField": { "type": "string", "description": "Field to sort results by", "enum": [ "ID", "CREATED_ON", "EMAIL", "ACCEPTS_MARKETING_JOINED_ON", "FIRST_NAME", "LAST_NAME", "ORDER_COUNT", "LAST_ORDER_ON", "ORDER_AMOUNT", "DONATION_COUNT", "LAST_DONATION_ON", "DONATION_AMOUNT" ] } }, "examples": [ { "acceptsMarketingWithDate": { "acceptsMarketing": true, "joinedOn": { "before": "2025-11-21T10:00:00Z", "after": "2020-11-26T14:30:00Z" } }, "searchString": "jane", "firstOrderOn": { "before": "2025-11-21T10:00:00Z", "after": "2025-11-26T14:30:00Z" }, "lastOrderOn": { "before": "2025-11-21T10:00:00Z", "after": "2025-11-26T14:30:00Z" }, "orderCount": { "min": 1, "max": 10 }, "firstDonationOn": { "before": "2025-11-21T10:00:00Z", "after": "2025-11-26T14:30:00Z" }, "lastDonationOn": { "before": "2025-11-21T10:00:00Z", "after": "2025-11-26T14:30:00Z" }, "donationCount": { "min": 1, "max": 10 }, "pageSize": 50, "cursor": "abc", "sortField": "createdOn", "sortDirection": "ASCENDING" } ] }, "RetrieveTransactionsSummariesRequest": { "required": [ "contactIds", "groupBy" ], "type": "object", "properties": { "contactIds": { "maxItems": 1000, "minItems": 1, "type": "array", "items": { "type": "string", "description": "Unique contactId" } }, "groupBy": { "minLength": 1, "type": "string", "description": "Field to group results by, should be a contactId", "enum": [ "contactId" ], "examples": [ "contactId" ] } } }, "RetrieveTransactionsSummariesResponse": { "type": "object", "properties": { "transactionsSummaryWrappers": { "type": "array", "description": "List of transaction summary wrappers", "items": { "$ref": "#/components/schemas/TransactionsSummaryWrapper" } } } }, "SeoOptions": { "type": "object", "properties": { "description": { "type": "string" }, "title": { "type": "string" } }, "description": "Options for search engine optimization." }, "ServiceProduct": { "title": "ServiceProduct", "required": [ "createdOn", "id", "modifiedOn", "storePageId", "type" ], "type": "object", "description": "A SERVICE product.", "properties": { "createdOn": { "type": "string", "format": "date-time" }, "description": { "type": "string" }, "id": { "type": "string" }, "images": { "type": "array", "items": { "$ref": "#/components/schemas/ProductImage" } }, "isVisible": { "type": "boolean" }, "modifiedOn": { "type": "string", "format": "date-time" }, "name": { "type": "string" }, "seoOptions": { "$ref": "#/components/schemas/SeoOptions" }, "storePageId": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "type": { "$ref": "#/components/schemas/ProductTypeV2" }, "url": { "type": "string" }, "urlSlug": { "type": "string" }, "variantAttributes": { "type": "array", "items": { "type": "string" } }, "variants": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceProductVariant" } } }, "discriminator": { "propertyName": "type" } }, "ServiceProductVariant": { "title": "ServiceProductVariant", "type": "object", "properties": { "attributes": { "type": "object", "additionalProperties": { "type": "string" } }, "id": { "type": "string" }, "image": { "$ref": "#/components/schemas/ProductImage" }, "pricing": { "$ref": "#/components/schemas/FullProductPricing" }, "sku": { "type": "string" }, "stock": { "$ref": "#/components/schemas/ProductStock" } }, "description": "A variant of a SERVICE product." }, "ShippingLine": { "type": "object", "properties": { "amount": { "$ref": "#/components/schemas/MonetaryAmount" }, "method": { "type": "string", "description": "Description of the shipping option", "examples": [ "UPS Ground" ] } }, "description": "Array of shipping line items; describes the shipping options chosen at checkout." }, "ShopperFulfillmentNotificationBehavior": { "type": "string", "description": "Indicates whether to send a fulfillment notification email to the customer. Value may be SEND or SKIP.", "enum": [ "SEND", "SKIP" ] }, "SimpleProductPricing": { "type": "object", "properties": { "basePrice": { "$ref": "#/components/schemas/MonetaryAmount" } } }, "StandardErrorPayload": { "type": "object", "properties": { "contextId": { "type": "string" }, "details": { "type": "object" }, "message": { "type": "string" }, "subtype": { "type": "string", "enum": [ "MISSING_ARGUMENT", "INVALID_ARGUMENT", "INVALID_CONTENT_TYPE", "CONCURRENT_MODIFICATION", "INSUFFICIENT_STOCK", "STOCK_NOT_TRACKED", "STOCK_EXCEEDS_MAX", "CURRENCY_MISMATCH", "MEASUREMENT_STANDARD_MISMATCH", "INSUFFICIENT_PRODUCT_VARIANTS", "URL_SLUG_UNAVAILABLE", "SKU_UNAVAILABLE", "STORE_PAGE_NOT_FOUND", "STORE_PAGE_PRODUCT_LIMIT_REACHED", "IMAGE_LIMIT_REACHED", "WEBHOOK_SUBSCRIPTION_LIMIT_REACHED", "MISSING_SCOPE", "PROFILE_CANNOT_ACCEPT_MARKETING", "ENTITY_LIMIT_REACHED", "PRODUCT_UPDATE_CONFLICT", "DUPLICATE_USER_CONFLICT", "PROMO_CODE_CONFLICT", "INVENTORY_ITEM_NOT_FOUND", "PRODUCT_IMAGE_NOT_FOUND", "PRODUCT_VARIANT_NOT_FOUND", "OAUTH_TOKEN_REQUIRED", "FORBIDDEN_RESOURCE", "OPERATION_NOT_ALLOWED_FOR_PRODUCT_TYPE" ] }, "type": { "type": "string", "enum": [ "INVALID_REQUEST_ERROR", "AUTHORIZATION_ERROR", "WEBSITE_EXPIRED", "METHOD_NOT_ALLOWED", "CONFLICT", "TOO_MANY_REQUESTS", "SERVER_ERROR", "SERVICE_UNAVAILABLE" ] } } }, "StorePage": { "type": "object", "properties": { "id": { "type": "string" }, "isEnabled": { "type": "boolean" }, "title": { "type": "string" }, "urlSlug": { "type": "string" } } }, "SubscriptionOptions": { "required": [ "type" ], "type": "object", "properties": { "type": { "type": "string", "description": "Defines how the discount applies to subscription payments.", "enum": [ "EXCLUDED", "ALL_PAYMENTS", "LIMITED_PAYMENTS" ] } }, "description": "Subscription applicability settings for this discount. When omitted from a create or update request, defaults to EXCLUDED." }, "TaxInterpretation": { "type": "string", "description": "Indicates that lineItems.unitPricePaid includes tax. Values may be EXCLUSIVE or INCLUSIVE.", "enum": [ "INCLUSIVE", "EXCLUSIVE" ] }, "TransactionDiscount": { "type": "object", "properties": { "amount": { "$ref": "#/components/schemas/MonetaryAmount" }, "description": { "type": "string", "description": "Discount description.", "examples": [ "Discount description" ] }, "name": { "type": "string", "description": "Discount name.", "examples": [ "Sales Discount" ] } }, "description": "Array of discounts for an order payment transaction; empty for donations." }, "TransactionDocument": { "type": "object", "properties": { "createdOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents when the Document was created.", "format": "date-time", "examples": [ "2019-11-18T21:20:05.354Z" ] }, "customerEmail": { "type": "string", "format": "email", "description": "Customer or donor email address. May be null for point of sale orders because email wasn't collected.", "examples": [ "customer@squarespace.com" ] }, "discounts": { "type": "array", "description": "Array of discounts for an order payment transaction; empty for donations.", "items": { "$ref": "#/components/schemas/TransactionDiscount" } }, "id": { "type": "string", "description": "Unique Document id.", "examples": [ "a7e4c6b5-d1fe-4e42-a932-f185b4b86829" ] }, "modifiedOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents when the Document was last modified.", "format": "date-time", "examples": [ "2019-11-18T21:23:02.87Z" ] }, "paymentGatewayError": { "$ref": "#/components/schemas/PaymentGatewayError" }, "payments": { "type": "array", "description": "Array of payment transactions for the order or donation.", "items": { "$ref": "#/components/schemas/TransactionPayment" } }, "salesLineItems": { "type": "array", "description": "Array of sales items for an order payment transaction; empty for donations.", "items": { "$ref": "#/components/schemas/TransactionSalesLineItem" } }, "salesOrderId": { "type": "string", "description": "Unique order id; not applicable if payment transaction is a donation.", "examples": [ "5d71991aac180c3e7857e1df" ] }, "shippingLineItems": { "type": "array", "description": "Array of shipping line items.", "items": { "$ref": "#/components/schemas/TransactionShippingLineItem" } }, "total": { "$ref": "#/components/schemas/MonetaryAmount" }, "totalNetPayment": { "$ref": "#/components/schemas/MonetaryAmount" }, "totalNetSales": { "$ref": "#/components/schemas/MonetaryAmount" }, "totalNetShipping": { "$ref": "#/components/schemas/MonetaryAmount" }, "totalSales": { "$ref": "#/components/schemas/MonetaryAmount" }, "totalTaxes": { "$ref": "#/components/schemas/MonetaryAmount" }, "voided": { "type": "boolean", "description": "Flag; indicates order cancellation." } }, "description": "Array of Document resources." }, "TransactionListResponse": { "type": "object", "properties": { "documents": { "type": "array", "description": "Array of Document resources.", "items": { "$ref": "#/components/schemas/TransactionDocument" } } } }, "TransactionPayment": { "type": "object", "properties": { "amount": { "$ref": "#/components/schemas/MonetaryAmount" }, "creditCardType": { "type": "string", "description": "Payment credit card type; possible values: VISA, MASTERCARD, DISCOVER, AMEX, JCB, and OTHER. null if credit card processing isn't available for the payment gateway.", "examples": [ "VISA" ] }, "externalCustomerId": { "type": "string", "description": "Unique customer id for the payment transaction provided by the payment gateway. Value is null if not available." }, "externalTransactionId": { "type": "string", "description": "Unique id for the payment transaction provided by the payment gateway.", "examples": [ "ch_1FFCJCLMG4qggZ0BzchTZjwR" ] }, "externalTransactionProperties": { "type": "array", "description": "Array of properties for the payment transaction provided by the payment gateway. Properties are listed in key/value pairs.", "items": { "$ref": "#/components/schemas/ExternalTransactionProperty" } }, "giftCardId": { "type": "string", "description": "Unique id for a Squarespace gift card. Value is null if a gift card was not used.", "format": "uuid", "examples": [ "ece69479-50bc-4763-9067-4473f3abcf83" ] }, "id": { "type": "string", "description": "Unique payment id.", "examples": [ "ece69479-50bc-4763-9067-4473f3abcf83" ] }, "netAmount": { "$ref": "#/components/schemas/MonetaryAmount" }, "paidOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents when the payment was made.", "format": "date-time", "examples": [ "2019-09-05T23:24:09.845Z" ] }, "processingFees": { "type": "array", "description": "Array of processing fees associated with the payment.", "items": { "$ref": "#/components/schemas/TransactionProcessingFee" } }, "provider": { "type": "string", "description": "Payment gateway used for processing.", "examples": [ "STRIPE" ] }, "refundedAmount": { "$ref": "#/components/schemas/MonetaryAmount" }, "refunds": { "type": "array", "description": "Array of refunds for the payment transaction.", "items": { "$ref": "#/components/schemas/TransactionRefund" } } }, "description": "Array of payment transactions for the order or donation." }, "TransactionProcessingFee": { "type": "object", "properties": { "amount": { "$ref": "#/components/schemas/MonetaryAmount" }, "amountGatewayCurrency": { "$ref": "#/components/schemas/MonetaryAmount" }, "exchangeRate": { "type": "number", "description": "Foreign exchange rate between the payment gateway's and payment's currencies; determined when the payment is processed.", "examples": [ 1 ] }, "feeRefunds": { "type": "array", "description": "Array of processing fee refunds for the payment.", "items": { "$ref": "#/components/schemas/TransactionProcessingFeeRefund" } }, "id": { "type": "string", "description": "Unique processing fee id.", "examples": [ "2Jdsno3mdk" ] }, "netAmount": { "$ref": "#/components/schemas/MonetaryAmount" }, "netAmountGatewayCurrency": { "$ref": "#/components/schemas/MonetaryAmount" }, "refundedAmount": { "$ref": "#/components/schemas/MonetaryAmount" }, "refundedAmountGatewayCurrency": { "$ref": "#/components/schemas/MonetaryAmount" } }, "description": "Array of processing fees associated with the payment." }, "TransactionProcessingFeeRefund": { "type": "object", "properties": { "amount": { "$ref": "#/components/schemas/MonetaryAmount" }, "amountGatewayCurrency": { "$ref": "#/components/schemas/MonetaryAmount" }, "exchangeRate": { "type": "number", "description": "Foreign exchange rate between the payment gateway's and payment's currencies; determined when the payment is processed.", "examples": [ 1 ] }, "externalTransactionId": { "type": "string", "description": "Unique id for the processing fee refund transaction provided by the payment gateway.", "examples": [ "3fjowGck2f" ] }, "id": { "type": "string", "description": "Unique processing fee refund id.", "examples": [ "c413a46c-b3e8-426d-8e0f-a4bc7a18cdd0" ] }, "refundedOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents when the processing fee refund was issued.", "format": "date-time", "examples": [ "2019-11-18T21:22:06.5Z" ] } }, "description": "Array of processing fee refunds for the payment." }, "TransactionRefund": { "type": "object", "properties": { "amount": { "$ref": "#/components/schemas/MonetaryAmount" }, "externalTransactionId": { "type": "string", "description": "Unique id for the refund transaction provided by the payment gateway.", "examples": [ "re_1Flhp8J4wh083J8f7qYtzU9m" ] }, "id": { "type": "string", "description": "Unique refund id.", "examples": [ "cfdb6b87-64bf-461a-b48b-eca7bd2389fc" ] }, "refundedOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents refund issue date.", "format": "date-time", "examples": [ "2019-11-18T21:22:06.5Z" ] } }, "description": "Array of refunds for the payment transaction." }, "TransactionSalesLineItem": { "type": "object", "properties": { "discountAmount": { "$ref": "#/components/schemas/MonetaryAmount" }, "id": { "type": "string", "description": "Unique id for the sales item.", "examples": [ "d93f9637-fba6-4e8b-a1f3-24008f60c774" ] }, "taxes": { "type": "array", "description": "Array of taxes for the sale item.", "items": { "$ref": "#/components/schemas/TransactionTax" } }, "total": { "$ref": "#/components/schemas/MonetaryAmount" }, "totalNetSales": { "$ref": "#/components/schemas/MonetaryAmount" }, "totalSales": { "$ref": "#/components/schemas/MonetaryAmount" } }, "description": "Array of sales items for an order payment transaction; empty for donations." }, "TransactionShippingLineItem": { "type": "object", "properties": { "amount": { "$ref": "#/components/schemas/MonetaryAmount" }, "description": { "type": "string", "description": "Description of the shipping line item as defined by the Squarespace merchant.", "examples": [ "USPS Flat Rate" ] }, "discountAmount": { "$ref": "#/components/schemas/MonetaryAmount" }, "id": { "type": "string", "description": "Unique id for the shipping line item.", "examples": [ "bd63d55e-0066-400e-9aa9-e75d4e6215b0" ] }, "netAmount": { "$ref": "#/components/schemas/MonetaryAmount" }, "taxes": { "type": "array", "description": "Array of taxes for the shipping line item.", "items": { "$ref": "#/components/schemas/TransactionTax" } } }, "description": "Array of shipping line items." }, "TransactionTax": { "type": "object", "properties": { "amount": { "$ref": "#/components/schemas/MonetaryAmount" }, "jurisdiction": { "type": "string", "description": "Tax jurisdiction in COUNTRY:{value},STATE:{value},LOCAL:{value} format. Examples: COUNTRY:US, COUNTRY:US,STATE:NY, and COUNTRY:US,STATE:NY,LOCAL:10001.", "examples": [ "COUNTRY:US,STATE:NY,LOCAL:10001" ] }, "name": { "type": "string", "description": "Tax classification as defined by the Squarespace merchant.", "examples": [ "Local Sales Tax" ] }, "rate": { "type": "string", "description": "Tax rate as a percent. For example, a value of 7.00 is a 7% tax.", "examples": [ "10.0" ] } }, "description": "Array of taxes for the shipping line item." }, "TransactionsSummary": { "type": "object", "properties": { "donationCount": { "type": "integer", "description": "Count of donations submitted.", "format": "int32" }, "firstDonationSubmittedOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents when the profile's first donation was submitted.", "format": "date-time" }, "firstOrderSubmittedOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents when the profile's first order was submitted.", "format": "date-time" }, "lastDonationSubmittedOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents when the profile's latest donation was submitted.", "format": "date-time" }, "lastOrderSubmittedOn": { "type": "string", "description": "ISO 8601 UTC date and time string; represents when the profile's latest order was submitted.", "format": "date-time" }, "orderCount": { "type": "integer", "description": "Count of orders submitted.", "format": "int32" }, "totalDonationAmount": { "$ref": "#/components/schemas/MonetaryAmount" }, "totalOrderAmount": { "$ref": "#/components/schemas/MonetaryAmount" }, "totalRefundAmount": { "$ref": "#/components/schemas/MonetaryAmount" } }, "description": "Summary of profile's commerce transactions. If a profile has no commerce transactions, the object is still returned with null or 0 values. This information is calculated asynchronously; there may be a slight delay between when an order is created, and when it's reflected in the object." }, "TransactionsSummaryWrapper": { "type": "object", "properties": { "contactId": { "type": "string", "description": "Unique contact identifier", "examples": [ "a6e74e0c-2b4a-4b63-b4a3-9c5d1f3e8a7b" ] }, "transactionsSummary": { "$ref": "#/components/schemas/TransactionsSummary" } }, "description": "List of transaction summary wrappers" }, "UpdateAddressBookEntryRequest": { "required": [ "address" ], "type": "object", "properties": { "address": { "$ref": "#/components/schemas/ContactAddress" }, "defaultShipping": { "type": "boolean", "description": "Whether this entry should be the default shipping address. When updating the entry that is currently the default, changing this value from true to false has no effect." } } }, "UpdateAddressBookEntryResponse": { "type": "object", "properties": { "addressBookEntry": { "$ref": "#/components/schemas/AddressBookEntry" } } }, "UpdateProductImageOrderRequest": { "type": "object", "properties": { "afterImageId": { "$ref": "#/components/schemas/ChangeString" } } }, "UpdateProductImageRequest": { "type": "object", "properties": { "altText": { "$ref": "#/components/schemas/ChangeString" } } }, "UpdateProductMeasurements": { "type": "object", "properties": { "dimensions": { "$ref": "#/components/schemas/ChangeProductDimensions" }, "weight": { "$ref": "#/components/schemas/ChangeProductWeight" } } }, "UpdateProductPricing": { "type": "object", "properties": { "basePrice": { "$ref": "#/components/schemas/ChangeMonetaryAmount" }, "onSale": { "$ref": "#/components/schemas/ChangeBoolean" }, "salePrice": { "$ref": "#/components/schemas/ChangeMonetaryAmount" } } }, "UpdateProductRequest": { "type": "object", "properties": { "description": { "$ref": "#/components/schemas/ChangeString" }, "isVisible": { "$ref": "#/components/schemas/ChangeBoolean" }, "name": { "$ref": "#/components/schemas/ChangeString" }, "pricing": { "$ref": "#/components/schemas/ChangeUpdateProductPricing" }, "productAttributeNames": { "$ref": "#/components/schemas/ChangeListString" }, "seoData": { "$ref": "#/components/schemas/ChangeSeoOptions" }, "tags": { "$ref": "#/components/schemas/ChangeListString" }, "urlSlug": { "$ref": "#/components/schemas/ChangeString" } } }, "UpdateProductVariantRequest": { "type": "object", "properties": { "attributes": { "$ref": "#/components/schemas/ChangeMapStringString" }, "pricing": { "$ref": "#/components/schemas/ChangeUpdateProductPricing" }, "shippingMeasurements": { "$ref": "#/components/schemas/ChangeUpdateProductMeasurements" }, "sku": { "$ref": "#/components/schemas/ChangeString" } } }, "UpdateVariantRequestV2": { "type": "object", "properties": { "attributes": { "$ref": "#/components/schemas/ChangeMapStringString" }, "gtin": { "$ref": "#/components/schemas/ChangeString" }, "mpn": { "$ref": "#/components/schemas/ChangeString" }, "pricing": { "$ref": "#/components/schemas/ChangeUpdateProductPricing" }, "shippingMeasurements": { "$ref": "#/components/schemas/ChangeUpdateProductMeasurements" }, "sku": { "$ref": "#/components/schemas/ChangeString" } } }, "UploadProductImageResponse": { "type": "object", "properties": { "imageId": { "type": "string", "description": "Unique ProductImage id." } } }, "VariantOption": { "type": "object", "properties": { "optionName": { "type": "string", "description": "The name of the option (e.g. color, size, material)", "examples": [ "Size" ] }, "value": { "type": "string", "description": "The shopper-selected value for the option (e.g. red, small, cotton)", "examples": [ "Large" ] } }, "description": "Array of variant options; represents variant choices made by the customer. Null for download and gift card products." }, "WebsiteProfile": { "type": "object", "properties": { "currency": { "type": "string" }, "id": { "type": "string" }, "language": { "type": "string" }, "location": { "$ref": "#/components/schemas/Location" }, "measurementStandard": { "$ref": "#/components/schemas/MeasurementStandard" }, "siteId": { "type": "string" }, "timeZone": { "type": "string" }, "title": { "type": "string" }, "url": { "type": "string" } } } }, "securitySchemes": { "Authorization": { "in": "header", "scheme": "bearer", "type": "http" } } } } ``` --- # Developer Portal Menu Accessing Squarespace APIs using OAuth 2.0[](https://developers.squarespace.com/oauth#accessing-squarespace-apis-using-oauth-20) ================================================================================================================================= Squarespace uses [OAuth 2.0](https://tools.ietf.org/html/rfc6749) to authorize third-party applications to integrate with Squarespace and consume Squarespace APIs. Terms[](https://developers.squarespace.com/oauth#terms) -------------------------------------------------------- | | | | --- | --- | | **Client** | Third-party application that needs to make Squarespace API calls. | | **User** | Squarespace customer who wants to integrate their site with a client. | | **Confirmation page** | Page created by Squarespace for the user to authorize (**Allow** or **Deny**) client access to their Squarespace account. | | **Access token** | Short-term token to make authenticated API requests. | | **Refresh token** | Long-term token to obtain new access tokens. | Instructions[](https://developers.squarespace.com/oauth#instructions) ---------------------------------------------------------------------- ### 1\. Register the client and obtain OAuth 2.0 credentials[](https://developers.squarespace.com/oauth#1-register-the-client-and-obtain-oauth-20-credentials) Before a client can make Squarespace API calls, the client must be registered with Squarespace as an OAuth client. Submit the following information via [this form](https://support.squarespace.com/hc/en-us/requests/new?ticket_form_id=28554433855373) . * Client name * Icon image (.png or .svg format, max size 200kb, 1:1 ratio) * Redirect URI(s) - For example, `https://thirdpartyapp.com/oauth/connect` * Initiate URL\* - For example, `https://thirdpartyapp.com/oauth/initiate`. * Link to Client's Terms and Conditions * Link to Client's Privacy Policy \*Applies only to Squarespace partner apps. These will be linked from inside Squarespace. We will review your registration and respond with `your_client_id` and `your_client_secret` as soon as possible. These credentials are used in the subsequent steps. ### 2\. Prompt the user to authorize client access[](https://developers.squarespace.com/oauth#2-prompt-the-user-to-authorize-client-access) The `/authorize` URL prompts the user to authorize client access to their Squarespace data and serves as the confirmation page. If a user selects **Allow**, OAuth 2.0 authentication is started between the client and Squarespace APIs. Append required and any optional parameters to the `GET /authorize` endpoint; **all parameter values should be URL-encoded**. Code `GET https://login.squarespace.com/api/1/login/oauth/provider/authorize` Query parameterRequirementValue`client_id`Required Alphanumeric value for your\_client\_id that was supplied by Squarespace in [Step 1](https://developers.squarespace.com/oauth#1-register-the-client-and-obtain-oauth-20-credentials) . `redirect_uri`RequiredString; the full redirect URI sent to Squarespace in [Step 1](https://developers.squarespace.com/oauth#1-register-the-client-and-obtain-oauth-20-credentials) .`scope`Required String; comma-separated list of client permission values (see below) for API access. The confirmation page always displays website(s) for user selection for `scope=website.*` | | | | --- | --- | | `website.orders` | Send order data and mark orders as fulfilled. | | `website.orders.read` | View order and fulfillment information. | | `website.transactions.read` | Access transactional order and donation data. | | `website.inventory` | View and update inventory stock levels. | | `website.inventory.read` | View inventory stock levels. | | `website.products` | View product information and modify products. | | `website.products.read` | View product information. | | `website.contacts` | View customer contact information and address book entries; create, update, and delete contacts and address book entries. | | `website.contacts.read` | View customer contact information and address book entries. | | `website.discounts` | View and manage discounts. | | `website.discounts.read` | View discounts. | **Example:** `&scope=website.inventory,website.orders` `state`Required Alphanumeric random value generated by client. You'll use it in Step 3, [Implement redirect URI](https://developers.squarespace.com/oauth#3-implement-redirect-uri) , to prevent CSRF attacks. `website_id`Conditionally Required Alphanumeric value for a Squarespace site ID. When a logged-in user initiates an OAuth connection from Squarespace, this value is appended as a query parameter on the provided initiate URL. Partners must pass this parameter back to the `GET /authorize` endpoint. If an OAuth connection is initiated by a logged-out user, Squarespace will not include a website\_id parameter on the initiate URL. Partners should not pass any `website_id` parameter back to the `GET /authorize` endpoint in these cases. Instead, the user will be prompted to select a website on the confirmation page. `access_type`Optional String; use `offline` for long-term API access. For more information, see [Token expiration and long-term access](https://developers.squarespace.com/oauth#token-expiration-and-long-term-access) . Omit parameter for short-term API access. **Authorize URL example with parameters** _Note: Parameter values are in plain text and not URL-encoded for example purposes._ Code `https://login.squarespace.com/api/1/login/oauth/provider/authorize?client_id=fGBjMDBaUHli&redirect_uri=http://localhost:8090/oauth/callback&scope=website.inventory,website.orders&state=2BsmGS9AAzFppUmcoIagOLj4iKII` ### 3\. Implement redirect URI[](https://developers.squarespace.com/oauth#3-implement-redirect-uri) Both **Allow** or **Deny** on the confirmation page directs the user to the client redirect URI (i.e., the `redirect_uri` specified in [Step 2](https://developers.squarespace.com/commerce-apis/oauth#2-prompt-the-user-to-authorize-client-access) ) with query parameters appended by Squarespace. For **Allow**, the redirect URI should verify the `state` parameter and match it against `state` value that was appended for the `/authorize` endpoint. This verification prevents CSRF attacks. Squarespace doesn't provide guidelines for **Deny** implementation. | Parameter | Value | | --- | --- | | `error` | String; `access_denied` if user selects **Deny** on confirmation page. Parameter isn't appended if user selects **Allow**. | | `state` | Alphanumeric value; not present if user selects **Deny**. | | `code` | Alphanumeric value used in [step 4. Request access token](https://developers.squarespace.com/oauth#4-request-access-token)
    . Value is initially URL-encoded and should be decoded prior to sending in the access token request. Valid for two minutes and only for one-time use. Not present if user selects **Deny**. | ### 4\. Request access token[](https://developers.squarespace.com/oauth#4-request-access-token) Code `POST https://login.squarespace.com/api/1/login/oauth/provider/tokens` The client makes a `POST /tokens` call with required and any optional parameters for an access token from Squarespace. Access tokens in the response are only valid for 30 minutes. For more information, see [Token expiration and long-term access](https://developers.squarespace.com/commerce-apis/oauth#token-expiration-and-long-term-access) . **Parameters** | Body | Requirement | Value | | --- | --- | --- | | `grant_type` | Optional | String; default is `authorization_code`; use `authorization_code` for your first request. For [long-term API access](https://developers.squarespace.com/oauth#token-expiration-and-long-term-access)
    , use `refresh_token` for all subsequent requests. | | `code` | Required if `grant_type=authorization_code` | Alphanumeric value of code passed to redirect URI. | | `redirect_uri` | Required if `grant_type=authorization_code` | String; redirect\_uri used for the `/authorize` endpoint. | | `refresh_token` | Required if `grant_type=refresh_token` | String; use application/json or application/x-www-form-urlencoded | | Header | | | | --- | --- | --- | | `Authorization` | Required | Follow the steps below to build the header value:



    1. [Use your Squarespace OAuth 2.0 credentials](https://developers.squarespace.com/oauth#1-register-the-client-and-obtain-oauth-20-credentials)
    to construct a string in the format: `your_client_id:your_client_secret`

    2. Encode the string from Step 1 into base-64



    3. Add Basic as a prefix to the encoded string from Step 2



    **Example**

    your\_client\_id: abc123



    your\_client\_secret: 12secret345



    **Authorization after base-64**

    Basic YWJjMTIzOjEyc2VjcmV0MzQ1 | | `Content-Type` | Required | String; use application/json or application/x-www-form-urlencoded | | `User-Agent` | Required | String; If you see an error referencing SEC-43, a User-Agent header is missing | **Example Response** JavascriptCode `{ "token_type": "bearer", "access_token": "T1|Rr0Wc95uu3cSeBh06yB...", // expires 30 minutes after it's created ... "access_token_expires_at": "1553532363.542", }` ### 5\. Make API requests[](https://developers.squarespace.com/oauth#5-make-api-requests) After you obtain an access token, you can make API requests. **Endpoint:** `https://api.squarespace.com/...` **Authorization format:** `Bearer` Using the sample response from Step 4, `Authorization` would have the value: `Bearer T1|Rr0Wc95uu3cSeBh06yB...` Token expiration and long-term access[](https://developers.squarespace.com/oauth#token-expiration-and-long-term-access) ------------------------------------------------------------------------------------------------------------------------ When a response from `POST /tokens` is received, `access_token` is only valid for 30 minutes. For long-term Squarespace API access, the client has to prompt the user to reauthorize using the `GET /authorize` endpoint or use refresh tokens. ### Refresh tokens[](https://developers.squarespace.com/oauth#refresh-tokens) To get a refresh token, add `access_type=offline` as a parameter to the `GET /authorize` request. When the client makes a `POST /tokens` call, the response includes `refresh_token`. Use the refresh token to get new tokens by making another `POST /tokens` call with the parameters below. The refresh token expires after seven days. * `grant_type=refresh_token` * `refresh_token=` _**Note**: Each `POST /tokens` call with a `refresh_token` parameter results in a new `refresh_token` and `access_token`. Refresh tokens are effectively one-time use—the original refresh token is invalidated as soon as the new access token is used. If long-term API access is required, the client should replace the stored refresh token with the most recent `refresh_token`. Note that obtaining new tokens doesn't revoke existing access tokens._ **Sample response from `/tokens`:** Code `{ "token": "T1|Rr0Wc95uu3cSeBh06yB...", "token_type": "bearer", // expires 30 mins after creation "access_token": "T1|Rr0Wc95uu3cSeBh06yB...", "access_token_expires_at": "1553532363.542", // expires 7 days after creation "refresh_token": "1|KYUYh35zcwzx4Zt/oty3...", "refresh_token_expires_at": "1554135363.542" }` **Sample use case with refresh tokens** Client has to poll orders from a user site indefinitely and needs to call the Squarespace API once per minute. 1. User authorizes client access to Squarespace APIs via confirmation page; client makes a `POST /tokens` call and obtains access and refresh tokens in response. 2. Client secures and stores the values below for current record (`CR`): * `access_token=` * `access_token_expires_at=` * `refresh_token=` 3. Prior to each API call, client checks if: `CR.access_token_expires_at - currentTime > 10 seconds` If true, client makes an API call with `CR.access_token`. If false, client makes a `POST /tokens` call with `refresh_token=CR.refresh_token` as a parameter for new access and refreshntokens; client stores new token values in CR: * `access_token=` * `access_token_expires_at=` * `refresh_token=` 4. Client repeats Steps 2 and 3 indefinitely. ### Invalid tokens and revoking access[](https://developers.squarespace.com/oauth#invalid-tokens-and-revoking-access) Tokens become invalid in two ways: the tokens expire or the user revokes client access from the Squarespace UI. In either case, the user has to reauthorize client access to get new access tokens. When an access token is invalid, Squarespace responds to API requests with `401 Unauthorized`. If a client receives a 401, they should notify the user that their Squarespace integration requires reauthorization. [Authentication and permissions](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) [Making requests](https://developers.squarespace.com/commerce-apis/making-requests) --- # Developer Portal Menu Template Overview[](https://developers.squarespace.com/template-overview#template-overview) ============================================================================================ Each Squarespace Template is made up of a series of predefined folders and files structured very similarly to a static website. This section will explain the purpose of each file and how they are organized into folders. Languages and Filetypes[](https://developers.squarespace.com/template-overview#languages-and-filetypes) -------------------------------------------------------------------------------------------------------- In addition to standard front-end code languages (HTML, CSS, JavaScript), our templates are powered by the following languages and pre-processors: ### JSON Template[](https://developers.squarespace.com/template-overview#json-template) Most template files are written in [JSON Template](https://developers.squarespace.com/what-is-json-t) . It is an easy to use, easy to read, minimalist template language. These are templates for HTML so they can be opened as HTML files in your editor. ### LESS CSS[](https://developers.squarespace.com/template-overview#less-css) Template CSS files (.css or .less) are processed through [LESS](http://lesscss.org/) . LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions. Template File Structure[](https://developers.squarespace.com/template-overview#template-file-structure) -------------------------------------------------------------------------------------------------------- Squarespace template files are organized using the following folder (or directory) structure at the root of your site: * **assets** design assets — _example: images, fonts and icons_ * **blocks** block files — _navigation.block_ * **collections** collection files — _\[collection\].list, \[collection\].item, \[collection\].conf_ * **pages** static page files — _\[static\].page, \[static\].page.conf_ * **scripts** JavaScript files — _site.js_ * **styles** stylesheet files — _styles.css, styles.less_ * \[root\] sitewide files — _site.region, template.conf_ Each template is made up of a collection of template files. Template files fall into three categories: site-wide files, collection-specific files, and block-specific files. Templates may or may not include all of the folders listed above, and missing folders can be added using Git. Template Directories[](https://developers.squarespace.com/template-overview#template-directories) -------------------------------------------------------------------------------------------------- A deeper look at the (pre-defined) folders that are used to structure the files in every Squarespace template. ### /assets/[](https://developers.squarespace.com/template-overview#assets) This folder is intended to be used for template-specific assets such as small images, icons, web fonts, etc. There is a 10MB file size limit on each individual file uploaded to /assets. After uploading, your template assets are accessible via: Code `http://yoursitename.com/assets/your-asset-file.png` Warning: Do not upload large binary assets such as images, PDFs or videos to the assets directory. The template repository provided by Developer Mode is not a file storage system. As an alternative, we recommend uploading content via the Custom CSS panel, or third-party object storage. For additional information on uploading content, please review these articles on uploading [files](https://support.squarespace.com/hc/en-us/articles/205813928-Uploading-and-managing-files) and [images](https://support.squarespace.com/hc/en-us/articles/206543047-Gallery-Pages) . ### /blocks/[](https://developers.squarespace.com/template-overview#blocks) In this folder, you will find the templates and configuration files for Squarespace block files. Block files as pertaining to templates let you create reusable partials or 'includes'. These are primarily used to create and configure navigations. * **.block** - Block template files. (JSON Template) * **.block.conf** - Block template configuration settings. (JSON) ### /collections/[](https://developers.squarespace.com/template-overview#collections) In this folder you can define the presentation for the various kinds of content in your template. You can have an unlimited number of collection types in each site. Each collection can be configured to support specific post types and can be sorted chronologically (like a blog) or user ordered (like a gallery). Each collection must have a configuration file and at least one `.list` or `.item` file. **All .list and .item files are written in [JSON Template](http://jsont.squarespace.com/) .** * **.list** - Templates for the list view of a collection. Example: `blog.list` templates a list of blog posts. This is the default view of every collection. (JSON Template) * **.item** - Templates for the individual page view (permalink) of a collection item. Example: `blog.item` templates a single blog post page. If a .list file is not provided, the .item will become the default template for the collection (redirecting visitors on the first individual item page instead of the item list page). (JSON Template) * **.conf** - Contains the configuration settings for a collection. There is one configuration file for each collection. (JSON) See [Collections](https://developers.squarespace.com/collections) for more details. ### /pages/[](https://developers.squarespace.com/template-overview#pages) This folder contains static site HTML pages. These are a special type of collection that do not inherently have data of their own. These pages can not be modified within the Squarespace interface by the end user. * **.page** - HTML markup for a page. (JSON Template) * **.page.conf** - Contains configuration settings for a page. (JSON) ### /scripts/[](https://developers.squarespace.com/template-overview#scripts) This folder contains the scripts for your website. To include a script in your template, in the area of your template, use: Code `` This syntax will ensure that your script is loaded via the proper URL, and Squarespace will automatically attempt to merge multiple scripts into a single download if the **combo** parameter is set to true. See [Custom JavaScript](https://developers.squarespace.com/custom-javascript) for more details. ### /styles/[](https://developers.squarespace.com/template-overview#styles) This folder contains the CSS styles for your website. All Squarespace CSS is processed using [less.css](http://lesscss.org/) syntax. To include CSS files in your template, edit the **template.conf** and list the files in the order you wish to include them. For example: Code `"stylesheets" : [ "global.css", "my-site.less", "another-style.less" ]` All stylesheets added to the **template.conf** in this way will be merged and served as one CSS file automatically. You do not need to add any stylesheet links to the HEAD section of your site. **NOTE:** If you add a file named `reset.css` to the /styles folder it will automatically be added to the top of the `site.css` file and it **should not** be listed in the `stylesheets` variable in the `template.conf` file. ### /site.region[](https://developers.squarespace.com/template-overview#siteregion) Typically this file is used as the global site wrapper template – containing the site header, footer, and sidebars. Every template must have at least one .region file. Simple templates will have a single .region, more advanced templates will have multiple .region files describing header, body, and footer variants. _Regions files live in the root directory of a template._ See [Layouts & Regions](https://developers.squarespace.com/layouts-regions) for more details. ### /template.conf[](https://developers.squarespace.com/template-overview#templateconf) Contains the configuration settings for the template. This is where you can name your template, specify layouts, add navigation sections, specify stylesheets to be rolled up into `site.css`, and other general site options. _Template configuration files must live in the root directory of a template._ See [Template Configuration](https://developers.squarespace.com/template-configuration) for more details. [Beginner Tutorial](https://developers.squarespace.com/beginner-tutorial) [What is JSON?](https://developers.squarespace.com/what-is-json) --- # Developer Portal Menu What is JSON?[](https://developers.squarespace.com/what-is-json#what-is-json) ============================================================================== JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. Squarespace uses JSON to store and organize site content created with the CMS. Example[](https://developers.squarespace.com/what-is-json#example) ------------------------------------------------------------------- Append `?format=json-pretty` to the URL of any page on your Squarespace site and you'll be able to [view the JSON data](https://developers.squarespace.com/view-json-data) for the site. Keys and Values[](https://developers.squarespace.com/what-is-json#keys-and-values) ----------------------------------------------------------------------------------- The two primary parts that make up JSON are keys and values. Together they make a key/value pair. * **Key:** A key is always a string enclosed in quotation marks. * **Value:** A value can be a string, number, boolean expression, array, or object. * **Key/Value Pair:** A key value pair follows a specific syntax, with the key followed by a colon followed by the value. Key/value pairs are comma separated. Let's take one line from the JSON sample above and identify each part of the code. JavascriptCode `"foo" : "bar"` This example is a key/value pair. The key is "foo" and the value is "bar". Types of Values[](https://developers.squarespace.com/what-is-json#types-of-values) ----------------------------------------------------------------------------------- * **Array:** An associative array of values. * **Boolean:** True or false. * **Number:** An integer. * **Object:** An associative array of key/value pairs. * **String:** Several plain text characters which usually form a word. Numbers, booleans and strings are self-evident, so we'll skip over those sections. Arrays and Objects are explained in more depth below. ### Arrays[](https://developers.squarespace.com/what-is-json#arrays) Almost every blog has categories and tags. In this example we've added a categories key, but the value might look unfamiliar. Since each post in a blog can have more than one category, an array of multiple strings is returned. JavascriptCode `"foo" : { "bar" : "Hello", "baz" : [ "quuz", "norf" ] }` ### Objects[](https://developers.squarespace.com/what-is-json#objects) An object is indicated by curly brackets. Everything inside of the curly brackets is part of the object. We already learned a value can be an object. So that means "foo" and the corresponding object are a key/value pair. JavascriptCode `"foo" : { "bar" : "Hello" }` The key/value pair "bar" : "Hello" is nested inside the key/value pair "foo" : { ... }. That's an example of a hierarchy in JSON data. Recap[](https://developers.squarespace.com/what-is-json#recap) --------------------------------------------------------------- We said at the beginning of this tutorial that JSON is a minimal data format. Just by learning a few key principles you can decode an entire site's worth of JSON. And now you can apply that knowledge to [developing Squarespace sites with JSON-T](https://developers.squarespace.com/templating-basics) , the template language behind the Squarespace Developer platform. [Template Overview](https://developers.squarespace.com/template-overview) [View JSON Data](https://developers.squarespace.com/view-json-data) --- # Developer Portal Menu Discounts API overview[](https://developers.squarespace.com/commerce-apis/discounts-overview#discounts-api-overview) ===================================================================================================================== **Current version: v1** _For versioning details, read the [Versioning](https://developers.squarespace.com/commerce-apis/versioning) guide._ Use the Discounts API to manage discounts for a Squarespace merchant site. The Discounts API provides create, read, update, delete and list (CRUDL) access to discount records. API resources[](https://developers.squarespace.com/commerce-apis/discounts-overview#api-resources) --------------------------------------------------------------------------------------------------- ### Discounts[](https://developers.squarespace.com/commerce-apis/discounts-overview#discounts) `Discount` represents a discount configured for a merchant site. Every discount also has three required, independently-configurable parts: * **`criteria`** - the conditions an order must meet for the discount to apply * **`template`** - the shape of the discount itself (fixed amount or percentage) * **`trigger`** - how the discount is activated (automatically or via a promo code) Optional `subscriptionOptions` and `paymentPlanOptions` control how the discount applies to subscription and payment-plan payments, respectively. ### Criteria[](https://developers.squarespace.com/commerce-apis/discounts-overview#criteria) `Criteria` is a polymorphic field, discriminated by a `type` property: | Type | Fields | Description | | --- | --- | --- | | `ANY_ORDER` | _(none)_ | Applies to any order with no additional conditions. | | `CART_TOTAL` | `minimumCartTotal` (monetary amount, required, greater than 0) | Applies when the cart total meets or exceeds a minimum. | | `PRODUCT` | `productId`, `productName` (display snapshot) | Applies when the cart contains a specific product. | ### Template[](https://developers.squarespace.com/commerce-apis/discounts-overview#template) `DiscountTemplate` is a polymorphic field, discriminated by a `type` property: | Type | Fields | Description | | --- | --- | --- | | `FIXED_AMOUNT` | `discountAmount` (monetary amount, required, greater than 0) | Reduces the order by a fixed monetary amount. | | `PERCENTAGE` | `percentage` (1–100, required) | Reduces the order by a percentage. | ### Trigger[](https://developers.squarespace.com/commerce-apis/discounts-overview#trigger) `Trigger` is a polymorphic field, discriminated by a `type` property: | Type | Fields | Description | | --- | --- | --- | | `AUTO` | _(none)_ | Automatically applied - no promo code required. | | `CODE` | `promoCode` (required, 1–50 characters; letters, digits, underscore, hyphen) | Unlocked by a shopper-entered promo code. Codes that match the Squarespace gift card format (`GC` followed by 14 alphanumerics, with or without hyphens) are rejected, since promo codes and gift card codes share the same checkout input. | ### Subscription and payment plan options[](https://developers.squarespace.com/commerce-apis/discounts-overview#subscription-and-payment-plan-options) `subscriptionOptions.type` controls how the discount applies to subscription payments: `EXCLUDED` (subscriptions don't receive the discount), `ALL_PAYMENTS` (every subscription payment), or `LIMITED_PAYMENTS` (only the first `maxPaymentsToApplyDiscount` payments, which is required when this type is used). `paymentPlanOptions.type` controls how the discount applies to [Payment Plan](https://developers.squarespace.com/commerce-apis/orders-overview#payment-plans) payments: `NONE` or `ALL_PAYMENTS`. Cross-API resource relationships[](https://developers.squarespace.com/commerce-apis/discounts-overview#cross-api-resource-relationships) ----------------------------------------------------------------------------------------------------------------------------------------- | API | Field | Relationship | | --- | --- | --- | | **Products** | `criteria.productId` | A `PRODUCT` criteria discount targets a specific product by its Products API `id`. | | **Carts / Orders** | _(applied at checkout)_ | Eligible discounts are evaluated and applied against a cart's contents and total during checkout. | Listing and filtering discounts[](https://developers.squarespace.com/commerce-apis/discounts-overview#listing-and-filtering-discounts) --------------------------------------------------------------------------------------------------------------------------------------- `GET /v1/commerce/discounts` supports the following query parameters: * **Sorting** - `sortBy` (`CREATED_ON`, `PROMO_CODE`, or `USES_COUNT`, default `CREATED_ON`) and `sortDirection` (`ASCENDING` or `DESCENDING`, default `DESCENDING`) * **Text search** - `search`, matched against discount name and promo code * **Status** - `status` (`ALL`, `ACTIVE`, `EXPIRED`, or `SCHEDULED`, default `ALL`) * **Type filters** - `criteria`, `template`, and `trigger` each accept a list of the type values described above * **`limitedUseOnly`** - restrict results to discounts with a redemption cap * **Pagination** - `offset` (default `0`) and `limit` (default `50`, maximum `1000`) Common workflows[](https://developers.squarespace.com/commerce-apis/discounts-overview#common-workflows) --------------------------------------------------------------------------------------------------------- **Create a promo-code discount for a specific product** Create a discount with a `PRODUCT` criteria referencing the target product's `id`, a `PERCENTAGE` or `FIXED_AMOUNT` template, and a `CODE` trigger with the desired promo code. **Run a site-wide automatic sale** Create a discount with an `ANY_ORDER` criteria, a `PERCENTAGE` template, and an `AUTO` trigger so it applies without requiring shoppers to enter a code. Set `validFrom` and `validTo` to bound the sale window. **Cap redemptions** Set `isLimitedUses` to `true` with a `maxUsesAllowed` to run a limited-quantity promotion, or set `isOncePerCustomer` to `true` to restrict a discount to a single use per customer. Further reading[](https://developers.squarespace.com/commerce-apis/discounts-overview#further-reading) ------------------------------------------------------------------------------------------------------- * Become familiar with [common commerce terms](https://developers.squarespace.com/commerce-apis/glossary) and how they're related to the API * [Obtain an API key or use OAuth](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) * Read the [FAQ](https://developers.squarespace.com/commerce-apis/faq) guide for answers to common questions [Discounts](https://developers.squarespace.com/commerce-apis/discounts) [Products](https://developers.squarespace.com/commerce-apis/products) --- # Developer Portal Menu Collections[](https://developers.squarespace.com/collections#collections) ========================================================================== A site can have an unlimited number of collection types. Each collection can be configured to support specific post types and can be sorted chronologically (like a blog) or user ordered (like a gallery). System Collections[](https://developers.squarespace.com/collections#system-collections) ---------------------------------------------------------------------------------------- Squarespace creates and maintains several collection types in the system you can use in your site without needing the files in your template. We call these "system collections." To add a system collection to your site, add an array to your `template.conf` file that specifies which collections you'd like to use. JavascriptCode `"systemCollections" : [ "album", "blog", "events", "gallery", "products" ]` System collections require no coding or maintenance by the developer. The system collection code is maintained by Squarespace and is not available for customization. For information about custom collections, see below. Creating Custom Collections[](https://developers.squarespace.com/collections#creating-custom-collections) ---------------------------------------------------------------------------------------------------------- To create a custom collection on your site, you need to create a configuration file (.conf) and a .item and/or .list file to accompany the .conf file. ### Collection Configuration (collection.conf)[](https://developers.squarespace.com/collections#collection-configuration-collectionconf) Contains the configuration settings for a collection. There must be a configuration file for each collection you create. JavascriptCode `{ "title" : "Blog", "ordering" : "chronological", "addText" : "Add Post", "acceptTypes" : [ "text" ] }` ### Configuration Options[](https://developers.squarespace.com/collections#configuration-options) * **title**: The name of the collection as it will appear in the "Add New Page" dialog. * **ordering**: The method of ordering for the collection. Available options: chronological, user-orderable, calendar. * **addText**: Specifies the text used in the "add" button in the Squarespace interface. It is also used in empty collection message when a collection does not contain any items. * **acceptTypes**: Specifies the post types allowed in this collection. Available: text, image, video. ### Collection List Views (collection.list)[](https://developers.squarespace.com/collections#collection-list-views-collectionlist) This is the default view of every collection and shows all posts in that collection. For example, `blog.list` templates a list of blog posts. ### Collection Item Views (collection.item)[](https://developers.squarespace.com/collections#collection-item-views-collectionitem) Item views are templates for the individual pages of a collection item (permalink). Example: `blog.item` templates a single blog post page. **TIP:** Exclude the .list file to start on item view If a .list file is not provided, the .item becomes the default template for the collection, thus starting viewers on the first individual item page instead of the collection's list page. [Folders & Indexes](https://developers.squarespace.com/folders-indexes) [Static Pages](https://developers.squarespace.com/static-pages) --- # Developer Portal Menu Template Partials[](https://developers.squarespace.com/template-partials#template-partials) ============================================================================================ Partials allow you to reuse code inside your template, instead of having redundant code scattered throughout your files. This can make your template easier to maintain. Creating a Partial[](https://developers.squarespace.com/template-partials#creating-a-partial) ---------------------------------------------------------------------------------------------- To create a partial add a .block file to your /blocks/ folder. This file can contain any kind of code used in template files, most commonly HTML and JSON-T. To use a partial in a template add a JSON-T formatter with the block file name inside the tag, like the code example below demonstrates. Code `{@|apply some-block.block}` When Should I Use Partials?[](https://developers.squarespace.com/template-partials#when-should-i-use-partials) --------------------------------------------------------------------------------------------------------------- Think of partials like classes in CSS. A class is typically something that is reused across your site; classes are also broad and can be used in analogous contexts. If you will use a piece of code in your template more than once in a similar setting you may want to consider making it a partial. Example[](https://developers.squarespace.com/template-partials#example) ------------------------------------------------------------------------ For the purpose of example, let's build a line of metadata that can be used in several different collections on both .list and .item pages. Code `item-meta.block ----------------------------

    Added on {addedOn|date %B %d, %Y} by {author.displayName}

    ` This partial can be rendered in either a .list or .item file in any collection type. The output changes depending on the context. For instance, we can render it in the following ways. Code `blog.list: ---------------------------- {.repeated section items} {@|apply item-meta.block} {.end} blog.item: ---------------------------- {.section item} {@|apply item-meta.block} {.end} gallery.list: ---------------------------- {.repeated section items} {@|apply item-meta.block} {.end}` **NOTE:** Partials are dependent on scope. If you break up your site into modules, it allows you to use them in several different contexts. To learn how scoping works visit [this page](http://jsont.squarespace.com/scoping-example/) . [Layouts & Regions](https://developers.squarespace.com/layouts-regions) [Menus & Navigation](https://developers.squarespace.com/menus-navigation) --- # Developer Portal Menu JSON-T Directives[](https://developers.squarespace.com/json-t-directives#json-t-directives) ============================================================================================ Directives in JSON-T are like commands. They tell the renderer how to render a section of JSON. You can identify them because they use an extra dot, and they often come in pairs (ex.`{.section foo}`). Section[](https://developers.squarespace.com/json-t-directives#section) ------------------------------------------------------------------------ Sections do most of the work in JSON Template. They allow you to "zoom in" on a part of the JSON context, removing duplicated dot notation prefixes throughout a section of code. Here are two examples, one using a section and one without: Code ` {.section website} {siteTitle} {.end} {website.siteTitle}` **There are two things you need to know about Section and Repeated Section:** 1. The content inside a section will only display if the section exists 2. Sections define scope, meaning they set the root for any data tags within Repeated Section[](https://developers.squarespace.com/json-t-directives#repeated-section) ------------------------------------------------------------------------------------------ Code ` {.repeated section items} If there are any items, repeat this info for each item {.end}` **NOTE:** Inside a `repeated section` you can number each item with an instance of `{@index}` which outputs the current index of the item. Index numbers start with `0`. Or Clause[](https://developers.squarespace.com/json-t-directives#or-clause) ---------------------------------------------------------------------------- You can use an `or` statement within a `section` or `repeated section` to display something if the condition of the section or repeated section is not met ... for example, if the section is missing or false: Code ` {.section item} Item exists. {.or} Item does not exist. {.end}` Alternates With Clause[](https://developers.squarespace.com/json-t-directives#alternates-with-clause) ------------------------------------------------------------------------------------------------------ Within a `repeated section`, the `alternates with` allows you to insert delimiters between each item that is repeated. Handy for commas, slashes or even horizontal rules, this block is expanded in between every pair of repeating sections. Code `{.repeated section items} This stuff shows for each item. {.alternates with} ------ {# show this dashed line in between each item} {.end}` Var Directive[](https://developers.squarespace.com/json-t-directives#var-directive) ------------------------------------------------------------------------------------ The `var` directive allows you to temporarily store a value for reference later. This can be useful along with `section`s to keep code concise and legible. Code `{.var @myTitle website.siteTitle}` A `var` allows you to create a variable and then use it later within any `section` or `repeated section` within the current JSON-T file. Here's an example: Code `{.var @firstImg items.0} {.var @pageThumb collection.mainImage} {.section collection}
    {.end}` Comment Directive[](https://developers.squarespace.com/json-t-directives#comment-directive) -------------------------------------------------------------------------------------------- Occasionally, you may want a comment that would not end up rendering in your HTML. This JSON-T comment is going to accomplish that for you. There are two types of comments available, **single line** and **multiline**. Code `{# This is a single line comment} {##BEGIN} This is a longer, more verbose, mulitline comment for when you have much more to say {END##}` [What is JSON-T?](https://developers.squarespace.com/what-is-json-t) [JSON-T Predicates](https://developers.squarespace.com/json-t-predicates) --- # Developer Portal Menu What is JSON-T?[](https://developers.squarespace.com/what-is-json-t#what-is-json-t) ==================================================================================== **JSON Template** (JSON-T) is a minimal but powerful template language, designed to be paired with a [JSON](https://developers.squarespace.com/what-is-json) dataset. This data is provided by Squarespace and is dynamically generated, containing all of your site content. Squarespace uses JSON-T to transform data into a web page. This process is called "rendering" the web page. The renderer combines data from the CMS, also known as the "context," with the JSON-T code to create the HTML output. That HTML is then sent to your browser and displayed. ### Here is a high-level overview of JSON-T and how it works:[](https://developers.squarespace.com/what-is-json-t#here-is-a-high-level-overview-of-json-t-and-how-it-works) JSON-T uses a special syntax to mark where data will be inserted into the page. For example: `{foo}`. These are called JSON-T tags. There are two main types of tags in JSON-T, variables and directives. * **Variables** are used to insert data into the page. They tell the renderer what data to render. This is a variable tag: `{foo}` * **Directives** are like commands. They tell the renderer how to render a section of JSON. You can identify them because they use an extra dot, and they often come in pairs. For example: `{.section foo} expand foo {.end}.` Variable Substitution[](https://developers.squarespace.com/what-is-json-t#variable-substitution) ------------------------------------------------------------------------------------------------- Variables inject data from the JSON context onto the page. To inject the value of baz, put it within curly braces: Code ` {baz} { "baz" : "Hello" }` You can also drill down into the JSON structure using dot notation. When looking up a variable name, we start at the top level of the context and pick the nested object that corresponds to each part of the variable. Code ` {foo.bar.baz} { "foo": { "bar": { "baz": "Hello" } } }` Built-in Directives[](https://developers.squarespace.com/what-is-json-t#built-in-directives) --------------------------------------------------------------------------------------------- [Directives](https://developers.squarespace.com/json-t-directives) are built-in language constructs that typically start with a period (`.`). The two main directives used in JSON-T are **sections** and **repeated sections** `{.section foo}` starts a section named **foo**. The **name** corresponds to a JSON **key**. The section is expanded if the key is present and not false. Sections are closed with a `{.end}` directive. Code ` {.section foo} {bar} {.end} { "foo": { "bar": "Hello" } } ` `{.repeated section bar}` starts a repeated section named **bar**. The **name** corresponds to a JSON **key**, whose value is a **list** of dictionaries or strings. The section is expanded once for each element of the list. The special variable `{@}` represents the value of the context at the current **scope**, or currently active part of the context. Code ` {.repeated section bar} {@} {.end} { "bar": ["Hello", "World"] }` ### Putting it All Together[](https://developers.squarespace.com/what-is-json-t#putting-it-all-together) Combining these simple constructs together with your HTML, CSS and JavaScript is how a Squarespace Template is built, using the CMS to provide the data and information that we render in our template files. REFERENCE: [JSON-TEMPLATE REFERENCE WIKI](https://code.google.com/archive/p/json-template/wikis/Reference.wiki) [Static Pages](https://developers.squarespace.com/static-pages) [JSON-T Directives](https://developers.squarespace.com/json-t-directives) --- # Developer Portal Menu Idempotency-Key header[](https://developers.squarespace.com/commerce-apis/idempotency-key#idempotency-key-header) ================================================================================================================== Certain requests should only occur once in an event of a client, server, or network error. For example, adjusting the stock quantity for an item. That's why some Commerce API endpoints require an `Idempotency-Key` header. By using the same `Idempotency-Key` and parameters, a request may be retried multiple times though it will only be executed on the first successful attempt. Every subsequent request receives the same response. Specifications[](https://developers.squarespace.com/commerce-apis/idempotency-key#specifications) -------------------------------------------------------------------------------------------------- * A unique string consisting of up to 64 alphanumeric characters, dashes, and underscores; UUIDs are valid and common. * Keys are recycled after an unspecified interval, however, they're guaranteed effective for 48 hours from the time they're used successfully. Endpoints[](https://developers.squarespace.com/commerce-apis/idempotency-key#endpoints) ---------------------------------------------------------------------------------------- The Commerce API endpoints listed below require an `Idempotency-Key` header. ### Inventory API[](https://developers.squarespace.com/commerce-apis/idempotency-key#inventory-api) * [POST: Adjust stock quantities](https://developers.squarespace.com/commerce-apis/adjust-stock-quantities) ### Orders API[](https://developers.squarespace.com/commerce-apis/idempotency-key#orders-api) * [POST: Create an order](https://developers.squarespace.com/commerce-apis/create-order) [Retrieve basic site information](https://developers.squarespace.com/commerce-apis/retrieve-basic-site-info) [Rate limits](https://developers.squarespace.com/commerce-apis/rate-limits) --- # Developer Portal Menu Inventory API overview[](https://developers.squarespace.com/commerce-apis/inventory-overview#inventory-api-overview) ===================================================================================================================== **Current version: 1.0** _For versioning details, read the [Versioning](https://developers.squarespace.com/commerce-apis/versioning) guide._ Use the Inventory API to read and adjust stock information for product variants on a Squarespace merchant site. Inventory can be limited ("tracked") or unlimited ("not tracked"). What information isn't available?[](https://developers.squarespace.com/commerce-apis/inventory-overview#what-information-isnt-available) ----------------------------------------------------------------------------------------------------------------------------------------- * Information for products that are not physical goods or services, e.g. gift cards, download products * Product variant information such as color, size, and weight * Whether the variant is visible for sale on the merchant site API resources[](https://developers.squarespace.com/commerce-apis/inventory-overview#api-resources) --------------------------------------------------------------------------------------------------- The Inventory API returns `InventoryItem` resource objects. An `InventoryItem` is always a variant of a physical product or service product on a Squarespace merchant site, and provides stock information about an item. For example, if a bakery on Squarespace sells **Pies** as a product, then "Key Lime" may be a product variant. The "Key Lime" variant's stock information would be available in an `InventoryItem`. The resource also provides information like: * The stock keeping unit (SKU) code set by a merchant * The availability of the item, i.e. whether its unlimited or has a large enough quantity * A human-readable descriptor for identifying an item by its attributes Resource fields are described under **Response example** for each Inventory API endpoint. Further reading[](https://developers.squarespace.com/commerce-apis/inventory-overview#further-reading) ------------------------------------------------------------------------------------------------------- * Become familiar with [common commerce terms](https://developers.squarespace.com/commerce-apis/glossary) and how they're related to the API * [Obtain an API key or use OAuth](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) * Read the [FAQ](https://developers.squarespace.com/commerce-apis/faq) guide for answers to common questions [Inventory](https://developers.squarespace.com/commerce-apis/inventory) [Orders](https://developers.squarespace.com/commerce-apis/orders) --- # Developer Portal Menu Open Block Field[](https://developers.squarespace.com/open-block-field#open-block-field) ========================================================================================= The Squarespace system provides a large number of blocks that can be added (using the CMS) to Pages, Blog Posts, and Open Block Fields present in a template. All system blocks have default templates that render the contents of the block. Squarespace Block Field Tag[](https://developers.squarespace.com/open-block-field#squarespace-block-field-tag) --------------------------------------------------------------------------------------------------------------- Open Block Fields are open areas in a template (provided by a developer) into which a user can add any system block, and use the same LayoutEngine grid-based layout system that is used in Pages and Blog Posts. Open Block Fields are ideal for site footers and blog sidebars. To specify an Open Block Field in a template, use the Squarespace Block Field tag: Code `` Each block field must have a unique `id`. The columns attribute can be set to either `1` or `12`. It is usually best to set this to 12, but you can set it to 1 when you want to limit the field to only a single column of blocks (in a sidebar for example). Locking the Layout[](https://developers.squarespace.com/open-block-field#locking-the-layout) --------------------------------------------------------------------------------------------- A locked layout allows developers to place system blocks on a site without giving front-end users the ability to add additional blocks or change the layout of the open block field. Front-end users still have to ability to edit the content of a locked block. Adding the `lock-layout="true"` attribute to an open block field will lock the layout. It's important to note that you should only lock the layout of an open block once you've already added the blocks with example content using the CMS. Otherwise, you will inadvertently lock yourself out of the open block. Code `` Customizing Blocks[](https://developers.squarespace.com/open-block-field#customizing-blocks) --------------------------------------------------------------------------------------------- We currently do not support customizing the HTML markup of our system blocks. [JSON-T System Variables](https://developers.squarespace.com/json-t-system-variables) [Navigation Tag](https://developers.squarespace.com/navigation-tag) --- # Developer Portal Menu Orders API overview[](https://developers.squarespace.com/commerce-apis/orders-overview#orders-api-overview) ============================================================================================================ **Current version: 1.0** _For versioning details, read the [Versioning](https://developers.squarespace.com/commerce-apis/versioning) guide._ Use the Orders API to access the order history for a Squarespace merchant site. Orders can be one-time purchase orders and recurring orders generated by subscriptions. The Orders API can also filter orders by Customer ID, import orders from third-party sales channels, mark orders as fulfilled, and trigger shipment notifications. > _Note: Although they appear in Squarespace as orders, the Orders API does not provide access to donations. Instead, donation information can be accessed using the [Transactions API](https://developers.squarespace.com/commerce-apis/transactions-overview) > ._ API resources[](https://developers.squarespace.com/commerce-apis/orders-overview#api-resources) ------------------------------------------------------------------------------------------------ The Orders API returns order information in `Order` resource objects. Resource fields are described under **Response example** for each Orders API endpoint. Payment Plans[](https://developers.squarespace.com/commerce-apis/orders-overview#payment-plans) ------------------------------------------------------------------------------------------------ Squarespace supports **Payment Plans** on eligible products: an initial deposit collected at checkout, followed by a series of installments charged automatically on a seller-defined schedule. Shoppers select between paying in full and choosing a payment plan on the product details page (PDP), and only the deposit is collected at checkout. See the [Add payment plans to service products](https://support.squarespace.com/hc/articles/45799419568653/) Help Center article for the current eligibility rules and shopper experience. A Payment Plan is represented as a single `Order` whose `paymentState` evolves as each installment is collected, rather than as separate orders per payment. ### Payment state[](https://developers.squarespace.com/commerce-apis/orders-overview#payment-state) Every `Order` exposes a `paymentState` field that reports the current payment state of the order. | Value | Meaning | | --- | --- | | `NOT_CHARGED` | The order has been created but no payment has been attempted yet. | | `AUTHORIZED` | A payment has been authorized but not captured. | | `PAID` | The order is fully paid. For a Payment Plan order, this means all installments have been collected. | | `PARTIALLY_PAID` | A Payment Plan order with one or more installments still outstanding. An order enters this state as soon as the deposit is captured (before any installment has been collected) and remains in it while installments are still being collected. | | `PENDING` | A payment is awaiting confirmation. The order will subsequently transition to `PAID`, `PARTIALLY_PAID` or `FAILED`. | | `FAILED` | The terminal state for an order whose payment was previously `PENDING` and ultimately did not succeed. | | `REFUND_PENDING` | A refund has been initiated and is being processed. The order will subsequently transition to `REFUNDED` or `REFUND_FAILED`. | | `REFUNDED` | The order has had refund activity. This covers both full and partial refunds; a partial refund of any amount sets the order to `REFUNDED`. To determine the outstanding balance, compare the order's `refundedTotal` with `grandTotal`. | | `REFUND_FAILED` | An asynchronous refund attempt failed. | ### Filtering by payment state[](https://developers.squarespace.com/commerce-apis/orders-overview#filtering-by-payment-state) The [retrieve all orders](https://developers.squarespace.com/commerce-apis/retrieve-all-orders) endpoint accepts an optional `paymentStates` query parameter, a comma-separated list of the values above. If omitted, the endpoint defaults to `NOT_CHARGED,AUTHORIZED,PAID,REFUNDED`, which preserves the response set returned before Payment Plans existed and keeps existing integrations stable. To include Payment Plan orders that are mid-collection, pass `PARTIALLY_PAID` explicitly: Code `GET /1.0/commerce/orders?paymentStates=PAID,PARTIALLY_PAID` ### Working with Payment Plan orders[](https://developers.squarespace.com/commerce-apis/orders-overview#working-with-payment-plan-orders) A few practical notes when integrating against Payment Plan orders: * **Cancellations and refunds**: sellers can cancel individual installments or an entire payment plan from the Orders panel. Canceling a plan stops future scheduled installments but does not automatically refund payments that have already been collected — those can be refunded individually. The [Transactions API](https://developers.squarespace.com/commerce-apis/transactions-overview#payment-plans) exposes per-payment refund detail. * **Webhooks**: to preserve backward compatibility with existing integrations, the [`order.create`](https://developers.squarespace.com/webhooks/events/order-create) webhook for a Payment Plan order fires only when `paymentState` transitions to `PAID` (all installments collected), not when the order is initially placed. No webhook fires for the deposit or for intermediate installment captures. The [`order.update`](https://developers.squarespace.com/webhooks/events/order-update) webhook continues to fire normally for `FULFILLED`, `REFUNDED`, `CANCELED`, `MARKED_PENDING`, and `EMAIL_UPDATED` events at any point in the order's lifecycle. For real-time visibility into newly placed Payment Plan orders, use the [retrieve all orders](https://developers.squarespace.com/commerce-apis/retrieve-all-orders) endpoint with `paymentStates=PARTIALLY_PAID`. Further reading[](https://developers.squarespace.com/commerce-apis/orders-overview#further-reading) ---------------------------------------------------------------------------------------------------- * Become familiar with [common commerce terms](https://developers.squarespace.com/commerce-apis/glossary) and how they're related to the API * [Obtain an API key or use OAuth](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) * Read the [FAQ](https://developers.squarespace.com/commerce-apis/faq) guide for answers to common questions [Orders](https://developers.squarespace.com/commerce-apis/orders) [Transactions](https://developers.squarespace.com/commerce-apis/transactions) --- # Developer Portal Menu Rate limits[](https://developers.squarespace.com/commerce-apis/rate-limits#rate-limits) ======================================================================================== Squarespace Commerce APIs employ a rate limit of 300 requests per minute, an equivalent bandwidth of five requests per second. Requests over the rate limit receive a `429 Too Many Requests` response with a cool down period of one minute. In addition, the [Create Order](https://developers.squarespace.com/commerce-apis/rate-limits) endpoint has a separate, stricter rate limit of 100 requests **per hour, per website** when an API Key is used for authentication. For clarity, this stricter rate limit **does not** apply when OAuth is used for authentication. Contact [Customer Care](https://support.squarespace.com/hc/requests/new) regarding rate limiting or if further assistance is needed while implementing APIs. [Idempotency-Key header](https://developers.squarespace.com/commerce-apis/idempotency-key) [Responses & error handling](https://developers.squarespace.com/commerce-apis/responses-error-handling) --- # Developer Portal Menu Responses and error handling[](https://developers.squarespace.com/commerce-apis/responses-error-handling#responses-and-error-handling) ======================================================================================================================================= Commerce APIs always return a response body in JSON. Ordering of the response data is not guaranteed to be in a specific order unless explicitly stated on the API reference page. All documented fields are always present in a response body, even if the field's value is `null`. Array fields that contain no data can either be represented as a `null` value or an empty array (`[]`). Please make sure you can handle either possibility. Error objects[](https://developers.squarespace.com/commerce-apis/responses-error-handling#error-objects) --------------------------------------------------------------------------------------------------------- All response errors include a standard error object. Each field is always present, but values may be `null` as indicated. JavascriptCode ``{ // General purpose descriptor for the type of the error. // The possible values are documented for each endpoint. "type": "INVALID_REQUEST_ERROR", // A descriptor for the subtype of the error, when available. // The possible values are documented for each endpoint. // This field is nullable. "subtype": "MISSING_ARGUMENT", // A plain English message intended for developers for debugging purposes. // This value should not be displayed to an end-user. "message": "An expiration date is required.", // Machine-readable data for generating user-friendly error messages; // intended for developers and users alike. // Reserved for future use; always `null` at this time. "details": { ... }, // Provides an identifier for reporting issues to Squarespace Customer Care. // Use the form below to report any occurrences of `5xx` range // errors, and please be sure to reference this id. // Form: https://support.squarespace.com/hc/requests/new#choose-topic "contextId": "RUPSUSPOW" }`` Status codes and error conditions[](https://developers.squarespace.com/commerce-apis/responses-error-handling#status-codes-and-error-conditions) ------------------------------------------------------------------------------------------------------------------------------------------------- In general, Commerce APIs use standard HTTP response codes as listed below. Though each endpoint also supports additional statuses, consult endpoint documentation for further details. ### 2xx: Successful requests[](https://developers.squarespace.com/commerce-apis/responses-error-handling#2xx-successful-requests) `200 OK` The request was processed successfully and any expected data is present in the response body. `201 Created` A new resource was created and is present in the response body. `202 Accepted` The request was received, is being processed, and any expected data is present in the response body. `204 No Content` The request was processed successfully and no data is present in the response body. ### 4xx: Client errors[](https://developers.squarespace.com/commerce-apis/responses-error-handling#4xx-client-errors) Codes in the `4xx` range indicate that something is wrong with your request or that your request cannot be completed due to a conflicting state that can be avoided through further action. The information you receive in the response provides some level of detail to help you debug the issue. `400 Bad Request` The request failed due to one or more causes of a bad query parameter, malformed body, or the body referencing an unknown system resource. `401 Unauthorized` The request failed due to unexpected authorization header information, which may be caused by a missing header or that the provided token was invalid or expired. `402 Payment Required` The request failed because the website that owns the authorization token is expired. `403 Forbidden` The request failed because the provided token does not have sufficient permissions. `404 Not Found` The requested resource could not be found. `405 Method Not Allowed` The request attempted to access a resource using an unsupported HTTP method. `409 Conflict` The request could not be processed due to the state of the server at the time of the request. This can be due to a variety of circumstances, such as concurrent requests competing for the same resource, a system configuration option prevents the request from being processed, or other state-specific causes. Depending on the cause, conflicts may be resolved by waiting for resources to become available or by updating the state of the system to enable the original request to succeed. `429 Too Many Requests` The application has issued too many requests and may be able to issue new requests after a cool down period. Refer to the [rate limiting](https://developers.squarespace.com/commerce-apis/rate-limits) guidelines for more information. ### 5xx: Server errors[](https://developers.squarespace.com/commerce-apis/responses-error-handling#5xx-server-errors) Any errors in the `5xx` range indicate a problem happened with Squarespace's servers. Please [report](https://support.squarespace.com/hc/requests/new#choose-topic) the issue and include the `contextId` you received in the response. _Note: 5xx errors are sometimes caused by transient network faults meaning that a subsequent request will succeed when retried after a delay. For this reason, we recommend implementing a retry strategy using [exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff) and halting execution after an appropriate number of attempts._ [Rate limits](https://developers.squarespace.com/commerce-apis/rate-limits) [Versioning](https://developers.squarespace.com/commerce-apis/versioning) --- # Developer Portal Menu Transactions API overview[](https://developers.squarespace.com/commerce-apis/transactions-overview#transactions-api-overview) ============================================================================================================================== **Current version: 1.0** _For versioning details, read the [Versioning](https://developers.squarespace.com/commerce-apis/versioning) guide._ Use the Transactions API to access financial transactions for orders and donations made on a Squarespace merchant site. Payment gateways and processing errors[](https://developers.squarespace.com/commerce-apis/transactions-overview#payment-gateways-and-processing-errors) -------------------------------------------------------------------------------------------------------------------------------------------------------- Transactions from a merchant site occur through a payment gateway. The Transactions API supports the following payment gateways: `SQUARESPACE`, `STRIPE`, `PAYPAL`, and `SQUARE`. Payment gateway processing errors are logged by the Transactions API as one of the following: `GATEWAY_FEE_PROCEESING_ERROR` An error occurred while retrieving payment processing fees; contact the payment gateway for more details. `GATEWAY_API_PERMISSION_ERROR` The payment gateway has not granted Squarespace API access. Payment gateway needs to reconfigure API permission. `GATEWAY_DISCONNNECTED` The payment gateway credentials configured for the site have expired or are missing; a connection to the payment gateway could not be established. What information isn't available?[](https://developers.squarespace.com/commerce-apis/transactions-overview#what-information-isnt-available) -------------------------------------------------------------------------------------------------------------------------------------------- * Order or donation details unrelated to payments, such as product information, merchant notes, and form data * Refunds initiated outside of Squarespace, e.g. via Stripe API resources[](https://developers.squarespace.com/commerce-apis/transactions-overview#api-resources) ------------------------------------------------------------------------------------------------------ The Transactions API returns `Document` resource objects. A `Document` is a collection of transactions for an order or a donation. There's a 1:1 relationship between a `Document` and an order or donation. `Document` resources include information like: * Totals for an order or a donation, summing item sales, discounts, fees, shipping, taxes, and the grand total * Payments and payment types * Refunds * Payment gateway errors > _Note: Only refunds initiated through Squarespace are captured and made available through the Transactions API._ Resource fields are described under **Response example** for each Transactions API endpoint. Fetching transactions for a specific order[](https://developers.squarespace.com/commerce-apis/transactions-overview#fetching-transactions-for-a-specific-order) ---------------------------------------------------------------------------------------------------------------------------------------------------------------- The [retrieve transactions](https://developers.squarespace.com/commerce-apis/retrieve-all-transactions) endpoint accepts an optional `orderId` query parameter to fetch the `Document` for a specific order without paging through the full collection. This is useful for reconciliation workflows and for any case where the order ID is already known. Payment Plans[](https://developers.squarespace.com/commerce-apis/transactions-overview#payment-plans) ------------------------------------------------------------------------------------------------------ For orders placed using **Payment Plans** (an initial deposit followed by a series of installments collected on a schedule), the `payments` array on the `Document` grows over time as each installment is collected. The deposit appears as the first entry in `payments`; each subsequent installment is appended when it is successfully captured. A few things to keep in mind when working with Payment Plan orders: * **`payments` only contains what has already been collected.** A Payment Plan order with a deposit and one collected installment will have two entries in `payments`, even if more installments are still scheduled. Future-scheduled installments are not exposed on the public Transactions API (they live on the merchant's Orders panel). * **Each `TransactionPayment` has its own `paidOn`, `amount`, and refund state.** You can use this to reconstruct the timeline of when the order has been paid. * **Refunds can be issued per individual payment.** Refund detail is recorded under the relevant `TransactionPayment.refunds` array, so a partially refunded Payment Plan order will show refunds attached to specific installments. * **For the overall payment status of the parent order** (paid, partially paid, refunded, etc.), use the `paymentState` field on the `Order` resource (see the [Orders API overview](https://developers.squarespace.com/commerce-apis/orders-overview#payment-plans) ). Further reading[](https://developers.squarespace.com/commerce-apis/transactions-overview#further-reading) ---------------------------------------------------------------------------------------------------------- * Become familiar with [common commerce terms](https://developers.squarespace.com/commerce-apis/glossary) and how they're related to the API * [Obtain an API key or use OAuth](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) * Read the [FAQ](https://developers.squarespace.com/commerce-apis/faq) guide for answers to common questions [Transactions](https://developers.squarespace.com/commerce-apis/transactions) [Profiles](https://developers.squarespace.com/commerce-apis/profiles) --- # Developer Portal Menu Products API overview[](https://developers.squarespace.com/commerce-apis/products-overview#products-api-overview) ================================================================================================================== **Current version: v2** | **Legacy versions: v1.1, v1.0** _For versioning details, read the [Versioning](https://developers.squarespace.com/commerce-apis/versioning) 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. API Versions[](https://developers.squarespace.com/commerce-apis/products-overview#api-versions) ------------------------------------------------------------------------------------------------ **v2** - The latest version of the Products API with enhanced product type support. v2 endpoints support physical, service, gift card, and download products for most operations. Note: Download products cannot be created or deleted via v2 API. **v1.1, v1.0 (Legacy)** - The stable versions of the Products API. v1.0 and v1.1 endpoints will continue to be supported, but we recommend using v2 for new integrations. What information isn't available?[](https://developers.squarespace.com/commerce-apis/products-overview#what-information-isnt-available) ---------------------------------------------------------------------------------------------------------------------------------------- * Categories used by a Store Page to group products Product visibility for purchase[](https://developers.squarespace.com/commerce-apis/products-overview#product-visibility-for-purchase) -------------------------------------------------------------------------------------------------------------------------------------- Every product on a Squarespace merchant site belongs to a single `StorePage`. Whether a product is visible for purchase depends on two settings: the Store Page's enabled/disabled state, and the product's own visible/hidden status. A product is unavailable for purchase if either its Store Page is disabled or its status is set to hidden. For full details on Store Page settings and how they affect visibility, see [Store pages and product visibility](https://developers.squarespace.com/commerce-apis/website-overview#store-pages-and-product-visibility) in the Website API overview. API resources[](https://developers.squarespace.com/commerce-apis/products-overview#api-resources) -------------------------------------------------------------------------------------------------- The Products API is responsible for the resources below. All resource fields are described under **Response example** in the listed endpoints. ### Products[](https://developers.squarespace.com/commerce-apis/products-overview#products) `Product` represents information for a product on a merchant site. 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`. Each `Product` belongs to a single `StorePage`. To retrieve Store Pages, use the [Website API](https://developers.squarespace.com/commerce-apis/website-overview) . **v2 Product Types** v2 endpoints support four product types: * **Physical Products** - Tangible goods that require shipping or pick up * **Service Products** - Services or experiences offered by the merchant * **Gift Card Products** - Digital gift cards for the merchant site * **Download Products** - Digital files that customers can download **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 have multiple variants (e.g., different sizes, colors) and can be accessed and modified in v1.0, v1.1, and v2. * [Create a product](https://developers.squarespace.com/commerce-apis/create-product) * [Update a product](https://developers.squarespace.com/commerce-apis/update-product) * [Delete a product](https://developers.squarespace.com/commerce-apis/delete-product) * [Retrieve all products](https://developers.squarespace.com/commerce-apis/retrieve-all-products) * [Retrieve specific products](https://developers.squarespace.com/commerce-apis/retrieve-specific-products) **Service Products (v2)** Service products represent services or experiences offered by the merchant, such as consulting, coaching, camps, retreats, or group trips. Service products can have multiple variants (e.g., different service tiers, durations) and can be accessed and modified in v2 only. * [Create a product](https://developers.squarespace.com/commerce-apis/create-product) * [Update a product](https://developers.squarespace.com/commerce-apis/update-product) * [Delete a product](https://developers.squarespace.com/commerce-apis/delete-product) * [Retrieve all products](https://developers.squarespace.com/commerce-apis/retrieve-all-products) * [Retrieve specific products](https://developers.squarespace.com/commerce-apis/retrieve-specific-products) **Gift Card Products (v2)** Gift card products represent digital gift cards for the merchant site. Gift card products can have multiple variants (e.g., different denominations) and can be created, accessed, and modified in v2 only. * [Create a product](https://developers.squarespace.com/commerce-apis/create-product) * [Update a product](https://developers.squarespace.com/commerce-apis/update-product) * [Delete a product](https://developers.squarespace.com/commerce-apis/delete-product) * [Retrieve all products](https://developers.squarespace.com/commerce-apis/retrieve-all-products) * [Retrieve specific products](https://developers.squarespace.com/commerce-apis/retrieve-specific-products) **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 cannot have variants. In v2, download products can be accessed and modified, but not created nor deleted. In v1.1, download products can only be accessed. In v1.0, download products cannot be accessed. * [Update a product](https://developers.squarespace.com/commerce-apis/update-product) * [Retrieve all products](https://developers.squarespace.com/commerce-apis/retrieve-all-products) * [Retrieve specific products](https://developers.squarespace.com/commerce-apis/retrieve-specific-products) ### Product variants[](https://developers.squarespace.com/commerce-apis/products-overview#product-variants) `ProductVariant` represents information for a variant of a 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 types that support variants:** * **Physical Products** - Can have multiple variants (e.g., different sizes, colors) * **Service Products** - Can have multiple variants (e.g., different service tiers, durations) * **Gift Card Products** - Can have multiple variants (e.g., different denominations) **Product types that do NOT support variants:** * **Download Products** - Cannot have variants Service and gift card variants are supported in v2 only. Physical variants are supported in v1.0, v1.1, and v2. * [Create a product variant](https://developers.squarespace.com/commerce-apis/create-product-variant) * [Update a product variant](https://developers.squarespace.com/commerce-apis/update-product-variant) * [Delete a product variant](https://developers.squarespace.com/commerce-apis/delete-product-variant) ### Product images[](https://developers.squarespace.com/commerce-apis/products-overview#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. Product images are supported in v1.0, v1.1, and v2. * [Upload a product image](https://developers.squarespace.com/commerce-apis/upload-product-image) * [Check the status of a product image upload](https://developers.squarespace.com/commerce-apis/product-image-upload-status) * [Update a product image](https://developers.squarespace.com/commerce-apis/update-product-image) * [Reorder a product image](https://developers.squarespace.com/commerce-apis/reorder-product-image) * [Assign a product image to a variant](https://developers.squarespace.com/commerce-apis/assign-product-image-variant) * [Delete a product image](https://developers.squarespace.com/commerce-apis/delete-product-image) ### Digital goods[](https://developers.squarespace.com/commerce-apis/products-overview#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`. Digital goods are supported in both v1.1 and v2. Further reading[](https://developers.squarespace.com/commerce-apis/products-overview#further-reading) ------------------------------------------------------------------------------------------------------ * Learn more [about product attributes](https://developers.squarespace.com/commerce-apis/about-product-attributes) , and their relationship to a product's variants * Become familiar with [common commerce terms](https://developers.squarespace.com/commerce-apis/glossary) and how they're related to the API * [Obtain an API key or use OAuth](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) * Read the [FAQ](https://developers.squarespace.com/commerce-apis/faq) guide for answers to common questions [Products](https://developers.squarespace.com/commerce-apis/products) [About product attributes](https://developers.squarespace.com/commerce-apis/about-product-attributes) --- # Developer Portal Menu Website API overview[](https://developers.squarespace.com/commerce-apis/website-overview#website-api-overview) =============================================================================================================== **Current version: 1.0** _For versioning details, read the [Versioning](https://developers.squarespace.com/commerce-apis/versioning) guide._ Use the Website API to retrieve fundamental details about a Squarespace merchant site, the active website member authenticated via OAuth, and organizational units such as the website store pages. This API is essential for apps that need to identify the merchant site they are interacting with and discover commerce-enabled pages to sync data like products and orders. API resources[](https://developers.squarespace.com/commerce-apis/website-overview#api-resources) ------------------------------------------------------------------------------------------------- The Website API provides read-only access to several core resource objects: **Website**: Represents the Squarespace merchant site itself. It provides essential metadata such as the site's unique identifier, the primary domain, the site title, and locale/currency information. **Member**: Represents the Squarespace user authenticated via an OAuth token. It provides basic details about the user interacting with your application. **StorePage**: Represents a single commerce-enabled page (formerly known as a Products Page) on the merchant site. It provides basic metadata about that page, such as its name, URL slug, and unique ID. For example, each Product on a merchant site belongs to a single `StorePage`. To successfully interact with the Products API or sync catalog data, you often need to retrieve the available `StorePage` IDs first. Store pages and product visibility[](https://developers.squarespace.com/commerce-apis/website-overview#store-pages-and-product-visibility) ------------------------------------------------------------------------------------------------------------------------------------------- A Store Page is a commerce-enabled collection of products on a Squarespace merchant site. Every product details page is a child of a Store Page, and a product cannot belong to more than one Store Page. Read the [How Squarespace organizes products](https://support.squarespace.com/hc/en-us/articles/206541007) knowledge base article for more context on how merchants organize and display products on their site. **Store Page and product settings directly impact whether a product is visible for purchase.** A product is unavailable for purchase if its Store Page is "Disabled" and/or if the product's status is "Hidden". How a merchant configures their site navigation (e.g., "[Not linking](https://support.squarespace.com/hc/en-us/articles/360025899552-The-Not-Linked-section) " the Store Page, grouping products under a category) has no effect on product visibility for purchases. ### Settings that affect visibility[](https://developers.squarespace.com/commerce-apis/website-overview#settings-that-affect-visibility) **Enabled or disabled page setting** _Squarespace UI > Pages > any Store Page > gear icon > Store Settings editor > General_ A newly added Store Page 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 products within the Store Page. **Visible or hidden product status** _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. A "Hidden" product is unavailable to customers while browsing products on a Store Page or via its direct URL. What information isn't available?[](https://developers.squarespace.com/commerce-apis/website-overview#what-information-isnt-available) --------------------------------------------------------------------------------------------------------------------------------------- * Configuration settings for non-commerce pages (like blogs or galleries). * Design, layout, or styling configurations of the website. * Billing or subscription details for the Squarespace merchant account. Supported endpoints[](https://developers.squarespace.com/commerce-apis/website-overview#supported-endpoints) ------------------------------------------------------------------------------------------------------------- The Website API supports the following requests to retrieve site and page information. * [Retrieve basic details about the website](https://developers.squarespace.com/commerce-apis/retrieve-website) * [Retrieve basic details about the Squarespace member](https://developers.squarespace.com/commerce-apis/retrieve-member) who owns the provided OAuth token * [Get information on store pages](https://developers.squarespace.com/commerce-apis/retrieve-store-pages) When retrieving store pages, results are returned as a paginated list of up to 50 store pages per request. Use the `cursor` query parameter to retrieve subsequent pages of results. An empty array is returned if the site has no store pages. Further reading[](https://developers.squarespace.com/commerce-apis/website-overview#further-reading) ----------------------------------------------------------------------------------------------------- * Learn how to [manage products](https://developers.squarespace.com/commerce-apis/products-overview) within Store Pages using the Products API * Become familiar with [common commerce terms](https://developers.squarespace.com/commerce-apis/glossary) and how they're related to the API * [Obtain an API key or use OAuth](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) to authenticate your requests * Read the [FAQ](https://developers.squarespace.com/commerce-apis/faq) guide for answers to common questions [Websites](https://developers.squarespace.com/commerce-apis/websites) [Inventory](https://developers.squarespace.com/commerce-apis/inventory) --- # Developer Portal Menu Price Limits[](https://developers.squarespace.com/commerce-apis/price-limits#price-limits) =========================================================================================== The maximum price accepted by Commerce APIs may differ by currency. Unless otherwise noted in the documentation, the maximum allowable price for each currency is as follows: * JPY - 999,999,999 (`999999999`) * KRW - 99,999,999 (`99999999`) * HUF - 10,000,000 (`10000000`) * COP - 10,000,000 (`10000000`) * All other currencies - 1,000,000 (`1000000`) [Changelog](https://developers.squarespace.com/commerce-apis/changelog) [Glossary](https://developers.squarespace.com/commerce-apis/glossary) --- # Developer Portal Menu About product attributes[](https://developers.squarespace.com/commerce-apis/about-product-attributes#about-product-attributes) =============================================================================================================================== What is an attribute?[](https://developers.squarespace.com/commerce-apis/about-product-attributes#what-is-an-attribute) ------------------------------------------------------------------------------------------------------------------------ Attributes are characteristics of physical and service products that allow different variants of the same product. For example, a merchant may sell **Pies** as a product with "Flavor" as an _attribute_, where "Key Lime" and "Pecan" may be different variants of **Pies**. Note that gift card products have variants, but they do not have attributes. When can I create attributes for a product?[](https://developers.squarespace.com/commerce-apis/about-product-attributes#when-can-i-create-attributes-for-a-product) -------------------------------------------------------------------------------------------------------------------------------------------------------------------- When creating a physical or service product in the Squarespace UI, a variant without attributes is created by default. In order to distinguish any new variants from each other, attributes (known as "Options" in the UI) must be added to the product first. **A physical or service `Product` must have at least one variant** and attributes adhering to the following conditions. | \# of Product.variants | Product.variantAttributes | \# of attributes; min | \# of attributes; max | | --- | --- | --- | --- | | 1 | Not required | 0 | 6 | | 2 or more | Required | 1 | 6 | Further reading[](https://developers.squarespace.com/commerce-apis/about-product-attributes#further-reading) ------------------------------------------------------------------------------------------------------------- * Learn how to [Manage attributes of a product](https://developers.squarespace.com/commerce-apis/managing-attributes) using the Products API [Overview](https://developers.squarespace.com/commerce-apis/products-overview) [Managing product attributes](https://developers.squarespace.com/commerce-apis/managing-attributes) --- # Developer Portal Menu Managing product attributes[](https://developers.squarespace.com/commerce-apis/managing-attributes#managing-product-attributes) ================================================================================================================================ Before managing attributes for a physical or service product and its variants, learn [what attributes are, how they're created, and when they're required](https://developers.squarespace.com/commerce-apis/about-product-attributes) . In the Products API, a `Product` may define attributes for its `ProductVariant` subresources in the `Product.variantAttributes` field. The order they’re specified in determines how attributes are displayed in the Squarespace product editor and product details page. (See "Examples" > "Reorder attributes" for more information.) JavascriptCode `{ // ... "variantAttributes": ["Color", "Size"], // ... }` The following specifications always apply with regard to attributes: **1\. A request to create or update a `Product` has at most six attributes and no duplicate attributes.** JavascriptCode `{ // ... "variantAttributes": ["Color", "Size", "Material", "Style", "Season", "Year"], // ... }` **2\. Attributes between a `Product` and its `ProductVariants` always match.** JavascriptCode `{ // ... "variantAttributes": ["Color", "Size"], // List of ProductVariant subresources "variants": [{ // ... "attributes": { "Color": "Red", "Size": "Small" } }, { // ... "attributes": { "Color": "Yellow", "Size": "Large" } } }`\ \ **3\. Each `ProductVariant` of a `Product` has a unique set of attribute values.**\ \ JavascriptCode\ \ `{ // ... "variantAttributes": ["Color", "Size"], // List of ProductVariant subresources "variants": [{ // ... "attributes": { "Color": "Red", "Size": "Small" } }, { // ... "attributes": { "Color": "Red", "Size": "Large" } } }`\ \ For every request that affects either the `Products` or `ProductVariant` resources, the Products API validates `variantAttributes` and `attributes` to the specifications above.\ \ Adding, updating, or deleting attributes and their values[](https://developers.squarespace.com/commerce-apis/managing-attributes#adding-updating-or-deleting-attributes-and-their-values)\ \ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ Before modifying attributes, use the endpoints below to retrieve existing attributes for the product. This is because a request body with `variantAttributes` always updates the product with the _specified_ attributes. **Existing attributes that are not specified in `variantAttributes` are deleted from the product.**\ \ * [Retrieve all products](https://developers.squarespace.com/commerce-apis/retrieve-all-products)\ \ * [Retrieve specific products](https://developers.squarespace.com/commerce-apis/retrieve-specific-products)\ \ \ ### Add or update attributes[](https://developers.squarespace.com/commerce-apis/managing-attributes#add-or-update-attributes)\ \ Use the endpoint sequence below when adding or updating attributes. See "Examples" for further details.\ \ 1. [Update a product](https://developers.squarespace.com/commerce-apis/update-product)\ \ `Products` with more than six attributes can be updated, but some attributes need to be unspecified for a successful request. This is because update requests with `variantAttributes` cannot list more than six attributes. If `variantAttributes` specifies new attributes, then a successful request adds the new attributes to each `Product.variants.attributes` automatically. Each variant uses placeholders values for the new attributes until the variant is updated with correct values.\ \ 2. [Update a product variant](https://developers.squarespace.com/commerce-apis/update-product-variant)\ \ Call the endpoint to update attribute values for _each_ variant of the parent `Product`. The endpoint doesn’t support batch updates.\ \ \ ### Create or update attribute values for a variant[](https://developers.squarespace.com/commerce-apis/managing-attributes#create-or-update-attribute-values-for-a-variant)\ \ Use either of the endpoints below. The `ProductVariant` in the request body **must specify all existing attributes defined by the `Product`**, even if the `Product` has more than six attributes.\ \ * [Create a product variant](https://developers.squarespace.com/commerce-apis/create-product-variant)\ \ * [Update a product variant](https://developers.squarespace.com/commerce-apis/update-product-variant)\ \ \ ### Delete attributes[](https://developers.squarespace.com/commerce-apis/managing-attributes#delete-attributes)\ \ A request with `Product.variantAttributes` always updates the product with the _specified_ attributes. Existing attributes that are not specified in `variantAttributes` are _deleted_ from the product.\ \ A successful request deletes unspecified attributes from the product and its variants.\ \ * [Update a product](https://developers.squarespace.com/commerce-apis/update-product)\ \ \ ### Reorder attributes[](https://developers.squarespace.com/commerce-apis/managing-attributes#reorder-attributes)\ \ Attributes are always displayed on the merchant site in the order listed by `Product.variantAttributes`. A successful request reorders attributes for the product and its variants in the Squarespace UI only, not in the `Product` resource.\ \ * [Update a product](https://developers.squarespace.com/commerce-apis/update-product)\ \ \ Examples[](https://developers.squarespace.com/commerce-apis/managing-attributes#examples)\ \ ------------------------------------------------------------------------------------------\ \ ### Add a new attribute[](https://developers.squarespace.com/commerce-apis/managing-attributes#add-a-new-attribute)\ \ Let’s say a `Product` has the following attributes and variants:\ \ JavascriptCode\ \ `{ // ... "variantAttributes": ["Color"], "variants": [{ // ... "attributes": { "Color": "Red" } }, { // ... "attributes": { "Color": "Yellow" } } }`\ \ To create a new attribute `size`, first call the [Update a product](https://developers.squarespace.com/commerce-apis/update-product)\ endpoint:\ \ TerminalCode\ \ `curl "https://api.squarespace.com/{api-version}/commerce/products/123" \ -i \ -H "Authorization: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" \ -H "User-Agent: YOUR_CUSTOM_APP_DESCRIPTION" -H "Content-Type: application/json" \ -X POST \ -d '{' # Note that the existing attribute "Color" is included in the request body. # If not included, the "Color" attribute is deleted by the request. '"variantAttributes": ["Color", "Size"],' \ '}'`\ \ The `Product` now looks like this:\ \ JavascriptCode\ \ `{ // ... "variantAttributes": ["Color", "Size"], "variants": [{ // ... "attributes": { "Color": "Red", "Size": "Value1" } }, { // … "attributes": { "Color": "Yellow", "Size": "Value2" } } }`\ \ Next, call the [Update a product variant](https://developers.squarespace.com/commerce-apis/update-product-variant)\ endpoint on _each_ variant to set values for the new attribute.\ \ TerminalCode\ \ `curl "https://api.squarespace.com/{api-version}/commerce/products/123/variants/{variants[0].id}" \ -i \ -H "Authorization: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" \ -H "User-Agent: YOUR_CUSTOM_APP_DESCRIPTION" -H "Content-Type: application/json" \ -X POST \ -d '{' '"attributes" : {' \ # Any existing attributes not specified will be deleted, # along with their values. '"Color": "Red",' \ '"Size": "Small"' \ '}' \ '}'`\ \ After the first call, the `Product` now looks like this:\ \ JavascriptCode\ \ `{ // ... "variantAttributes": ["Color", "Size"], "variants": [{ // ... "attributes": { "Color": "Red", "Size": "Small" } }, { // ... "attributes": { "Color": "Yellow", "Size": "Value2" } } }`\ \ To update the second `ProductVariant`, another request to [Update a product variant](https://developers.squarespace.com/commerce-apis/update-product-variant)\ needs to be made.\ \ ### Reorder attributes[](https://developers.squarespace.com/commerce-apis/managing-attributes#reorder-attributes-1)\ \ Let’s say a `Product` has the following attributes and variants:\ \ JavascriptCode\ \ `{ // ... "variantAttributes": ["Color", "Size"], "variants": [{ // ... "attributes": { "Color": "Red", "Size": "Small" } }, { // ... "attributes": { "Color": "Yellow", "Size": "Large" } } }`\ \ The information above is displayed like this in the Squarespace product editor:\ \ ![Reorder product editor before](https://developers.squarespace.com/assets/images/reorder-prod-editor-before.png)\ \ And the product details page:\ \ ![Reorder product details before](https://developers.squarespace.com/assets/images/reorder-prod-details-before.png)\ \ To reorder the attributes, call the [Update a product](https://developers.squarespace.com/commerce-apis/update-product)\ endpoint:\ \ TerminalCode\ \ `curl "https://api.squarespace.com/{api-version}/commerce/products/123" \ -i \ -H "Authorization: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" \ -H "User-Agent: YOUR_CUSTOM_APP_DESCRIPTION" -H "Content-Type: application/json" \ -X POST \ -d '{' # Any existing attributes must be specified in the request; # if not, attributes are deleted. '"variantAttributes": ["Size", "Color"],' \ '}'`\ \ The changes are reflected both in the product editor and product details page:\ \ ![Reorder product editor after](https://developers.squarespace.com/assets/images/reorder-prod-editor-after.png)\ \ ![Reorder product details after](https://developers.squarespace.com/assets/images/reorder-prod-details-after.png)\ \ [About product attributes](https://developers.squarespace.com/commerce-apis/about-product-attributes)\ [Websites](https://developers.squarespace.com/commerce-apis/websites) --- # Developer Portal Menu Changelog[](https://developers.squarespace.com/commerce-apis/changelog#changelog) ================================================================================== Stay up to date with the latest developer and Squarespace Commerce API changes. With each update, we'll provide notable details below. ### Discounts API is now available[](https://developers.squarespace.com/commerce-apis/changelog#discounts-api-is-now-available) #### July 14, 2026[](https://developers.squarespace.com/commerce-apis/changelog#july-14-2026) We've released the Discounts API to general availability. The Discounts API provides full create, read, update, delete and list (CRUDL) access to discounts configured for a Squarespace site. The Discounts API supports both **OAuth and API key authentication**. Generate a key with the **Discounts** permission (Read Only or Read and Write) to manage discounts without an OAuth integration. [Check the Discounts API page to learn more](https://developers.squarespace.com/commerce-apis/discounts-overview) . ### API keys are now supported for the Contacts API[](https://developers.squarespace.com/commerce-apis/changelog#api-keys-are-now-supported-for-the-contacts-api) #### June 17, 2026[](https://developers.squarespace.com/commerce-apis/changelog#june-17-2026) The Contacts API now supports authentication with an API key, in addition to OAuth. Generate a key with the **Contacts** permission (Read Only or Read and Write) to access contact records, address books, and marketing preferences without an OAuth integration. See [Authentication and permissions](https://developers.squarespace.com/commerce-apis/authentication-and-permissions) for details on generating an API key and its permission levels. ### Payment Plans are now reflected in the Orders and Transactions APIs[](https://developers.squarespace.com/commerce-apis/changelog#payment-plans-are-now-reflected-in-the-orders-and-transactions-apis) #### May 26, 2026[](https://developers.squarespace.com/commerce-apis/changelog#may-26-2026) Squarespace has launched **[Payment Plans](https://support.squarespace.com/hc/articles/45799419568653/) **: sellers can offer eligible products with an initial deposit collected at checkout, followed by a series of installments charged automatically on a seller-defined schedule. Shoppers select between paying in full and choosing a payment plan on the product details page. Payment Plan orders surface through the existing `Order` and Transactions `Document` shapes, with no separate payment-plan resource on the public API. Key things to know: * The `Order` resource exposes the overall payment status of the order through `paymentState`, with `PARTIALLY_PAID` indicating a Payment Plan order that still has one or more installments outstanding (entered as soon as the deposit is captured). * The Transactions `Document` accumulates one `TransactionPayment` entry per successfully captured payment (the deposit, then each installment) as they collect over time. Refunds can be issued per individual payment. * The `paymentStates` query parameter in [retrieve all orders](https://developers.squarespace.com/commerce-apis/retrieve-all-orders) endpoint can be used to include or exclude Payment Plan orders that are mid-collection. * To preserve backward compatibility, the [`order.create`](https://developers.squarespace.com/webhooks/events/order-create) webhook for a Payment Plan order fires only when `paymentState` transitions to `PAID` (all installments collected), not when the order is initially placed. For full integration guidance, see the [Orders API overview](https://developers.squarespace.com/commerce-apis/orders-overview#payment-plans) and the [Transactions API overview](https://developers.squarespace.com/commerce-apis/transactions-overview#payment-plans) . ### Orders can now be filtered by payment state[](https://developers.squarespace.com/commerce-apis/changelog#orders-can-now-be-filtered-by-payment-state) #### May 13, 2026[](https://developers.squarespace.com/commerce-apis/changelog#may-13-2026) The [retrieve all orders](https://developers.squarespace.com/commerce-apis/retrieve-all-orders) endpoint now accepts an optional `paymentStates` query parameter, a comma-separated list of `NOT_CHARGED`, `AUTHORIZED`, `PAID`, `REFUNDED`, `PENDING`, `FAILED`, `REFUND_PENDING`, `REFUND_FAILED`, or `PARTIALLY_PAID`. If not specified, the endpoint defaults to `NOT_CHARGED,AUTHORIZED,PAID,REFUNDED`, which preserves the previous behavior. Pass `PARTIALLY_PAID` to include Payment Plan orders that are not yet fully collected. ### New `paymentState` field on Order[](https://developers.squarespace.com/commerce-apis/changelog#new-paymentstate-field-on-order) #### May 8, 2026[](https://developers.squarespace.com/commerce-apis/changelog#may-8-2026) The `Order` resource now exposes a `paymentState` field that reports the current payment state of the order, with values such as `NOT_CHARGED`, `AUTHORIZED`, `PAID`, `PARTIALLY_PAID`, `PENDING`, `FAILED`, `REFUND_PENDING`, `REFUNDED`, and `REFUND_FAILED`. The field can be used as the canonical source for an order's payment status, removing the need to infer it from individual transactions and refunds. ### Contact and address book webhooks are now available[](https://developers.squarespace.com/commerce-apis/changelog#contact-and-address-book-webhooks-are-now-available) #### April 15, 2026[](https://developers.squarespace.com/commerce-apis/changelog#april-15-2026) We've released six new webhook topics for real-time contact and address book notifications: * **Contact lifecycle** — `contact.create`, `contact.update`, and `contact.delete` events fire when contacts are created, modified, or removed. * **Address book changes** — `address.create`, `address.update`, and `address.delete` events fire when address book entries are added, changed, or removed from a contact. To start receiving notifications, create a [Webhook Subscription](https://developers.squarespace.com/commerce-apis/webhook-subscriptions-overview) with the relevant topic(s). See the [Contacts API overview](https://developers.squarespace.com/commerce-apis/contacts-overview#webhooks) for details on event behaviour and integration guidance. ### Transactions can now be filtered by Order ID[](https://developers.squarespace.com/commerce-apis/changelog#transactions-can-now-be-filtered-by-order-id) #### April 15, 2026[](https://developers.squarespace.com/commerce-apis/changelog#april-15-2026-1) The Transactions API now supports an optional `orderId` query parameter on the [retrieve transactions](https://developers.squarespace.com/commerce-apis/retrieve-all-transactions) endpoint. Use it to fetch all transaction documents associated with a specific order without having to page through the full collection. ### Contacts API is now available[](https://developers.squarespace.com/commerce-apis/changelog#contacts-api-is-now-available) #### April 9, 2026[](https://developers.squarespace.com/commerce-apis/changelog#april-9-2026) We've released the Contacts API to general availability. The Contacts API provides full create, read, update, and delete (CRUD) access to the contacts associated with a Squarespace site — customers, mailing list subscribers, donors, and anyone else who has interacted with the site. Key capabilities include: * **Full CRUD operations** on contact records, including name, email, locale, and marketing preferences. * **Address book management** — create, retrieve, update, and delete up to 50 addresses per contact, with default shipping address support. * **Query and filtering** — search contacts by name or email, filter by marketing status, order history, and donation activity, with cursor-based pagination. * **Analytics** — retrieve aggregated commerce data (order counts, totals, donations) for contacts in bulk via the [Analytics API](https://developers.squarespace.com/commerce-apis/analytics-overview) . The Contacts API currently requires **OAuth authentication**. API key support is coming soon. The Contacts API is the modern replacement of the read-only [Profiles API](https://developers.squarespace.com/commerce-apis/profiles-overview) , adding write operations, address book management, query filtering, and webhook support. The Profiles API is now in maintenance mode — migration to the Contacts API is highly recommended, and new integrations should use the Contacts API. [Check the Contacts API page to learn more](https://developers.squarespace.com/commerce-apis/contacts-overview) . ### Orders can now be filtered by Customer ID[](https://developers.squarespace.com/commerce-apis/changelog#orders-can-now-be-filtered-by-customer-id) #### January 13, 2026[](https://developers.squarespace.com/commerce-apis/changelog#january-13-2026) The Orders API now allow orders to be filtered by Customer ID. [Check the Orders API - Retrieve All Orders page to learn more](https://developers.squarespace.com/commerce-apis/retrieve-all-orders) . ### Products API v2 is now available[](https://developers.squarespace.com/commerce-apis/changelog#products-api-v2-is-now-available) #### December 18, 2025[](https://developers.squarespace.com/commerce-apis/changelog#december-18-2025) We've released the Products API (v2) to general availability. The Products API v2 endpoints now also support Service, Gift Cards, and Download products, in addition to the Physical products already present in v1.0 and v1.2. Download products have some limitations. They do not support: * Creating product * Deleting product * CRUD operations for variants as download products do not have variants. [Check the Products API page to learn more](https://developers.squarespace.com/commerce-apis/products-overview) . ### Products API v2 (Beta) - Enhanced Product Type Support[](https://developers.squarespace.com/commerce-apis/changelog#products-api-v2-beta---enhanced-product-type-support) #### November 4, 2025[](https://developers.squarespace.com/commerce-apis/changelog#november-4-2025) We've released a new version of the Products API (v2) in beta. This version includes: * **Enhanced Product Type Support**: v2 endpoints now support physical, service, gift card, and download products for most operations. * **Backward Compatibility**: v1.0 and v1.1 endpoints remain fully supported. v2 endpoints are available at `/v2/commerce/products/*` and are marked as Beta. We recommend using v2 for new integrations while v1.0 and v1.1 remain stable for existing implementations. To learn more about the new product types and v2 features, see the [Products API Overview](https://developers.squarespace.com/commerce-apis/products-overview) . ### New Version of Products API, Read-only access for download products[](https://developers.squarespace.com/commerce-apis/changelog#new-version-of-products-api-read-only-access-for-download-products) #### October 31, 2023[](https://developers.squarespace.com/commerce-apis/changelog#october-31-2023) A new version of the Products API has been released. This version enables read-only access to download products. Download products can now be retrieved by [retrieve all products](https://developers.squarespace.com/commerce-apis/retrieve-all-products) and [retrieve specific products](https://developers.squarespace.com/commerce-apis/retrieve-specific-products) endpoints. A new query parameter `type` has been added to the retrieve all products endpoint, which filters results by products type. To learn more about the differences between physical and download products, see the [Products API Overview](https://developers.squarespace.com/commerce-apis/products-overview) . ### New response code for expired websites[](https://developers.squarespace.com/commerce-apis/changelog#new-response-code-for-expired-websites) #### November 30, 2021[](https://developers.squarespace.com/commerce-apis/changelog#november-30-2021) If a request is made on behalf of an expired site a new status code, `402 PAYMENT REQUIRED`, will be returned indicating that the request is denied because the website is in an expired billing state. ### Products API: Product sale prices[](https://developers.squarespace.com/commerce-apis/changelog#products-api-product-sale-prices) #### April 20, 2021[](https://developers.squarespace.com/commerce-apis/changelog#april-20-2021) When creating and updating `Products`, `variants.salePrice.value` will now be set to the lesser of the variant's regular price or sale price when `variants.onSale` is `false`. Previously, this field would be set to `0` when the variant was not on sale. ### Profiles API: Profiles API read/write scope restrictions[](https://developers.squarespace.com/commerce-apis/changelog#profiles-api-profiles-api-readwrite-scope-restrictions) #### March 29, 2021[](https://developers.squarespace.com/commerce-apis/changelog#march-29-2021) Moving forward, creating new profiles and updating existing profiles will be restricted to allowed developers. ### Products API: Product attributes limit increased to six[](https://developers.squarespace.com/commerce-apis/changelog#products-api-product-attributes-limit-increased-to-six) #### March 2, 2021[](https://developers.squarespace.com/commerce-apis/changelog#march-2-2021) The limit of attributes on a product have been increased from three to six. Visit our documentation [about product attributes](https://developers.squarespace.com/commerce-apis/about-product-attributes) and [managing product atttributes](https://developers.squarespace.com/commerce-apis/managing-attributes) to learn more. ### Profiles API is now available[](https://developers.squarespace.com/commerce-apis/changelog#profiles-api-is-now-available) #### February 23, 2021[](https://developers.squarespace.com/commerce-apis/changelog#february-23-2021) We've released the Profiles API to general availability. The Profiles API enables you to read and manage customers, mailing list subscribers, and donors that are traditionally accessible through the Profiles panel. [Check out the Profiles API page to learn more](https://developers.squarespace.com/commerce-apis/profiles-overview) . ### Webhook notification test endpoint is now available[](https://developers.squarespace.com/commerce-apis/changelog#webhook-notification-test-endpoint-is-now-available) #### February 18, 2021[](https://developers.squarespace.com/commerce-apis/changelog#february-18-2021) Now you can test your webhook subscriptions. To learn more, [visit our documentation](https://developers.squarespace.com/commerce-apis/send-test-notification) . ### Webhooks are now available[](https://developers.squarespace.com/commerce-apis/changelog#webhooks-are-now-available) #### February 2, 2021[](https://developers.squarespace.com/commerce-apis/changelog#february-2-2021) Now you can use webhooks to subscribe to OAuth disconnection events and Order events. To learn more, [visit our webhooks documentation](https://developers.squarespace.com/webhooks/overview) . ### New Profiles API: Sign up for the beta[](https://developers.squarespace.com/commerce-apis/changelog#new-profiles-api-sign-up-for-the-beta) #### December 8, 2020[](https://developers.squarespace.com/commerce-apis/changelog#december-8-2020) The Profiles API offers a programmatic means to read and manage customers, mailing list subscribers, and donors that are traditionally accessible through the [Profiles panel](https://support.squarespace.com/hc/en-us/articles/360046485652) . We're accepting beta participants until December 18. [Click here to apply to be a beta participant](https://docs.google.com/forms/d/e/1FAIpQLSc6SPuCDqMYvh2cbQ69YQpdM72UwrU1KEpkx6duE62YurRmdg/viewform) . ### Products API is now available[](https://developers.squarespace.com/commerce-apis/changelog#products-api-is-now-available) #### July 27, 2020[](https://developers.squarespace.com/commerce-apis/changelog#july-27-2020) We've released the Products API to general availability. This allows you to retrieve or create product information within your store's products. [Check out the Products API page to learn more](https://developers.squarespace.com/commerce-apis/products-overview) . ### Orders API: Order creation is now available[](https://developers.squarespace.com/commerce-apis/changelog#orders-api-order-creation-is-now-available) #### July 13, 2020[](https://developers.squarespace.com/commerce-apis/changelog#july-13-2020) Now you can import orders from a third-party sales channel into a Squarespace store. To learn more, visit the documentation for the new [Create an order](https://developers.squarespace.com/commerce-apis/create-order) endpoint. ### Full Featured Products API: Sign up for the beta[](https://developers.squarespace.com/commerce-apis/changelog#full-featured-products-api-sign-up-for-the-beta) #### February 4, 2020[](https://developers.squarespace.com/commerce-apis/changelog#february-4-2020) Version 0.2 of the Products API is now in beta, allowing developers to create, update, delete – as well as read – a Squarespace store's product data. ### Introducing Read-Only Scopes[](https://developers.squarespace.com/commerce-apis/changelog#introducing-read-only-scopes) #### January 28, 2020[](https://developers.squarespace.com/commerce-apis/changelog#january-28-2020) You can now grant read-only access when generating API keys. ### Time zone and location added to authorization profiles[](https://developers.squarespace.com/commerce-apis/changelog#time-zone-and-location-added-to-authorization-profiles) #### January 14, 2020[](https://developers.squarespace.com/commerce-apis/changelog#january-14-2020) We've added `timeZone` and `location` fields to the authorization profile endpoint. [Learn more about authorization profiles](https://developers.squarespace.com/commerce-apis/making-requests) . ### Transactions API is now available[](https://developers.squarespace.com/commerce-apis/changelog#transactions-api-is-now-available) #### December 9, 2019[](https://developers.squarespace.com/commerce-apis/changelog#december-9-2019) We've released the Transactions API to general availability. This allows you to retrieve financial information about your store's orders and donations. [Check out the Transactions API page to learn more](https://developers.squarespace.com/commerce-apis/transactions-overview) . ### Orders API: New Channel field now included on orders[](https://developers.squarespace.com/commerce-apis/changelog#orders-api-new-channel-field-now-included-on-orders) #### November 7, 2019[](https://developers.squarespace.com/commerce-apis/changelog#november-7-2019) A new `channel` property is now available on the orders resource through the Orders API. This allows you to know where your order originated from. [Check out the Orders API page to learn more](https://developers.squarespace.com/commerce-apis/orders-overview) . ### Transactions API: Sign up for the beta[](https://developers.squarespace.com/commerce-apis/changelog#transactions-api-sign-up-for-the-beta) #### September 11, 2019[](https://developers.squarespace.com/commerce-apis/changelog#september-11-2019) We're making our new Transactions API available to a select group of developers. With this API, you can easily retrieve your store's order and donation financial data. Interested in trying it out and sharing your feedback as you integrate it? ### Products API: Sign up for the beta[](https://developers.squarespace.com/commerce-apis/changelog#products-api-sign-up-for-the-beta) #### July 29, 2019[](https://developers.squarespace.com/commerce-apis/changelog#july-29-2019) Sign up for the Products API beta and be one of the first to integrate with it. This new API allows you to retrieve a store's product data for physical products, and we'd love your feedback on the experience. ### Orders API: Variant IDs now included on orders[](https://developers.squarespace.com/commerce-apis/changelog#orders-api-variant-ids-now-included-on-orders) #### July 16, 2019[](https://developers.squarespace.com/commerce-apis/changelog#july-16-2019) The product variant's `variantId` property is now available on the orders resource via the Orders API. This allows you to know exactly which variant was purchased when an order comes in. [Visit the Orders API page to learn more](https://developers.squarespace.com/commerce-apis/orders-overview) . ### Inventory API is now available[](https://developers.squarespace.com/commerce-apis/changelog#inventory-api-is-now-available) #### June 6, 2019[](https://developers.squarespace.com/commerce-apis/changelog#june-6-2019) We're excited to introduce the new Inventory API, which allows you to read and write stock levels. [Learn more about the Inventory API](https://developers.squarespace.com/commerce-apis/inventory-overview) . [Versioning](https://developers.squarespace.com/commerce-apis/versioning) [Price Limits](https://developers.squarespace.com/commerce-apis/price-limits) --- # Developer Portal Menu Commerce API [Commerce API](https://developers.squarespace.com/commerce-apis) Orders ====== [Download schema](https://developers.squarespace.com/commerce-apis/latest/schema-processor-version-version-latest.json) * * * List orders[](https://developers.squarespace.com/commerce-apis/retrieve-all-orders#list-orders) ------------------------------------------------------------------------------------------------ GET https://api.squarespace.com /1.0/commerce/orders Retrieves information about all orders. Orders can be filtered by Customer ID and date ranges. The response contains order information in an Order, up to 50 Orders ordered by their modification date (modifiedOn), and supports dynamic cursors for pagination. ### List orders › query Parameters[](https://developers.squarespace.com/commerce-apis/retrieve-all-orders#list-orders/query-parameters) `customerId` ​string Used to filter Orders by Customer ID. `modifiedAfter` ​string Time-boxes the request to Orders 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 Orders 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. `fulfillmentStatus` ​string Used to filter Orders by fulfillment status. Values may be PENDING, FULFILLED, or CANCELED. `paymentStates` ​string Used to filter Orders by payment state. Accepts a comma-separated list of values. Possible values are: NOT\_CHARGED, AUTHORIZED, PAID, REFUNDED, PENDING, FAILED, REFUND\_PENDING, REFUND\_FAILED, PARTIALLY\_PAID. If not specified, defaults to NOT\_CHARGED, AUTHORIZED, PAID, and REFUNDED. ### List orders › Headers[](https://developers.squarespace.com/commerce-apis/retrieve-all-orders#list-orders/header-parameters) `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 orders › Responses[](https://developers.squarespace.com/commerce-apis/retrieve-all-orders#list-orders/responses) 200400 A paginated list of orders. [OrderListResponse](https://developers.squarespace.com/commerce-apis/~schemas#orderlistresponse) `pagination` ​object `result` ​[Order\[\]](https://developers.squarespace.com/commerce-apis/~schemas#order) * * * Create order[](https://developers.squarespace.com/commerce-apis/retrieve-all-orders#create-order) -------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/commerce/orders Creates an order using information from a third-party sales channel. A successful request creates an Order resource. ### Create order › Headers[](https://developers.squarespace.com/commerce-apis/retrieve-all-orders#create-order/header-parameters) `Idempotency-Key` ​string · required Idempotency key to prevent duplicate order creation. `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 order › Request Body[](https://developers.squarespace.com/commerce-apis/retrieve-all-orders#create-order/request-body) [CreateOrderRequest](https://developers.squarespace.com/commerce-apis/~schemas#createorderrequest) `channelName` ​string · maxLength: 30 · required Name of third-party sales channel. `createdOn` ​string · date-time · required ISO 8601 UTC date and time string. Represents the date and time when the order was placed through the third-party sales channel. `externalOrderReference` ​string · maxLength: 200 · required Order reference identifier used by the third-party sales channel. `fulfillments` ​[CreateOrderShipmentRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#createordershipmentrequest)  · required Array of shipping fulfillments; up to 100 entries. Describes shipment information for the order. `grandTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount)  · required A monetary amount with currency code and decimal value `lineItems` ​[CreateLineItemRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#createlineitemrequest)  · required Array of purchased line items; cannot be empty. `priceTaxInterpretation` ​[TaxInterpretation](https://developers.squarespace.com/commerce-apis/~schemas#taxinterpretation)  · enum · required Indicates that lineItems.unitPricePaid includes tax. Values may be EXCLUSIVE or INCLUSIVE. Enum values: INCLUSIVE EXCLUSIVE `billingAddress` ​[AddressRequest](https://developers.squarespace.com/commerce-apis/~schemas#addressrequest) Customer's shipping address. `customerEmail` ​string · email Email address provided at checkout on the third-party sales channel. Example: john.doe@example.com `discountLines` ​[CreateDiscountLineRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#creatediscountlinerequest) Array of discount line items. Describes the promotions redeemed during checkout. `discountTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `fulfilledOn` ​string · date-time ISO 8601 UTC date and time string. Represents the moment the order was fulfilled. Required if fulfillmentStatus is FULFILLED. `fulfillmentStatus` ​[OrderCreateFulfillmentStatus](https://developers.squarespace.com/commerce-apis/~schemas#ordercreatefulfillmentstatus)  · enum Current fulfillment status of the order. Value may be PENDING or FULFILLED. Enum values: PENDING FULFILLED `inventoryBehavior` ​[CreateOrderInventoryBehavior](https://developers.squarespace.com/commerce-apis/~schemas#createorderinventorybehavior)  · enum Indicates whether to deduct stock quantity for the product variant upon Order creation. Values may be DEDUCT or SKIP. Defaults to SKIP. Enum values: DEDUCT SKIP `shippingAddress` ​[AddressRequest](https://developers.squarespace.com/commerce-apis/~schemas#addressrequest) Customer's shipping address. `shippingLines` ​[CreateShippingLineRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#createshippinglinerequest) Array of shipping line items. Describes the shipping options chosen at checkout. Currently accepts only one shipping entry. `shippingTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `shopperFulfillmentNotificationBehavior` ​[ShopperFulfillmentNotificationBehavior](https://developers.squarespace.com/commerce-apis/~schemas#shopperfulfillmentnotificationbehavior)  · enum Indicates whether to send a fulfillment notification email to the customer. Value may be SEND or SKIP. Enum values: SEND SKIP `subtotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `taxTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value ### Create order › Responses[](https://developers.squarespace.com/commerce-apis/retrieve-all-orders#create-order/responses) 201400409429 The created order. [Order](https://developers.squarespace.com/commerce-apis/~schemas#order) `billingAddress` ​[Address](https://developers.squarespace.com/commerce-apis/~schemas#address) Customer's shipping address provided at checkout or, for recurring subscription orders, the customer's current mailing address. `channel` ​string Where the order originated; possible values are: web and pos. Example: web `channelName` ​string Name of the third-party sales channel. Example: Faire Wholesale `createdOn` ​string · date-time ISO 8601 UTC date and time string; represents the moment when the order was placed. Example: 2016-12-23T15:58:07.187Z `customerEmail` ​string Email address entered at checkout or, for recurring subscription orders, the customer's current email address. Example: foo@example.com `customerId` ​string Unique customer id. Example: 585d498fdee9f31a60284a38 `discountLines` ​[DiscountLine\[\]](https://developers.squarespace.com/commerce-apis/~schemas#discountline) Array of discount line items; describes the promotions redeemed during checkout. `discountTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `externalOrderReference` ​string Order reference identifier used by the third-party sales channel. Example: EXT-98765 `formSubmission` ​[FormItem\[\]](https://developers.squarespace.com/commerce-apis/~schemas#formitem) Array of form data submitted via the checkout page. `fulfilledOn` ​string · date-time ISO 8601 UTC date and time string; represents the moment the order was fulfilled. `fulfillmentStatus` ​[FulfillmentStatus](https://developers.squarespace.com/commerce-apis/~schemas#fulfillmentstatus)  · enum Current fulfillment status of the order. Value may be: PENDING, FULFILLED, or CANCELED. Enum values: PENDING FULFILLED CANCELED `fulfillments` ​[Fulfillment\[\]](https://developers.squarespace.com/commerce-apis/~schemas#fulfillment) Array of shipping fulfillments; describes shipment information for the order. `grandTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `id` ​string Unique Order id. Example: 585d498fdee9f31a60284a37 `internalNotes` ​[OrderNote\[\]](https://developers.squarespace.com/commerce-apis/~schemas#ordernote) Array of internal notes added to the order by the merchant. `lineItems` ​[LineItem\[\]](https://developers.squarespace.com/commerce-apis/~schemas#lineitem) Array of purchased line items; line items describe what product or product variant was purchased, how many of that item were purchased, and additional details. `modifiedOn` ​string · date-time ISO 8601 UTC date and time string; represents when the order was last modified. Example: 2016-12-23T15:58:07.187Z `orderNumber` ​string Unique, sequential number for the Order. Example: 3 `paymentState` ​[PaymentState](https://developers.squarespace.com/commerce-apis/~schemas#paymentstate)  · enum Current state of payment for the order. Enum values: NOT\_CHARGED AUTHORIZED PAID REFUNDED PENDING FAILED REFUND\_PENDING REFUND\_FAILED show 1 more `priceTaxInterpretation` ​string Indicates whether lineItems.unitPricePaid includes tax. Values may be EXCLUSIVE or INCLUSIVE. Example: EXCLUSIVE `refundedTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `shippingAddress` ​[Address](https://developers.squarespace.com/commerce-apis/~schemas#address) Customer's shipping address provided at checkout or, for recurring subscription orders, the customer's current mailing address. `shippingLines` ​[ShippingLine\[\]](https://developers.squarespace.com/commerce-apis/~schemas#shippingline) Array of shipping line items; describes the shipping options chosen at checkout. `shippingOptionName` ​string the specific shipping service name selected at checkout (e.g. "USPS Ground Advantage", "Royal Mail Tracked 48"). `shippingOptionServiceType` ​string · enum The carrier service type identifier. Enum values: FEDEX\_GROUND FEDEX\_GROUND\_HOME\_DELIVERY FEDEX\_PRIORITY\_OVERNIGHT FEDEX\_STANDARD\_OVERNIGHT FEDEX\_2\_DAY FEDEX\_2\_DAY\_AM FEDEX\_EXPRESS\_SAVER FEDEX\_FIRST\_FREIGHT show 26 more `shippingTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `subtotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `taxTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `testmode` ​boolean If true, the order is a test order created using a payment method in test mode. * * * Get order[](https://developers.squarespace.com/commerce-apis/retrieve-all-orders#get-order) -------------------------------------------------------------------------------------------- GET https://api.squarespace.com /1.0/commerce/orders/{id} Retrieves information for a specific order. The response contains order information in an Order. ### Get order › path Parameters[](https://developers.squarespace.com/commerce-apis/retrieve-all-orders#get-order/path-parameters) `id` ​string · required Specifies the Order to retrieve. ### Get order › Headers[](https://developers.squarespace.com/commerce-apis/retrieve-all-orders#get-order/header-parameters) `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 order › Responses[](https://developers.squarespace.com/commerce-apis/retrieve-all-orders#get-order/responses) 200400404 The requested order. [Order](https://developers.squarespace.com/commerce-apis/~schemas#order) `billingAddress` ​[Address](https://developers.squarespace.com/commerce-apis/~schemas#address) Customer's shipping address provided at checkout or, for recurring subscription orders, the customer's current mailing address. `channel` ​string Where the order originated; possible values are: web and pos. Example: web `channelName` ​string Name of the third-party sales channel. Example: Faire Wholesale `createdOn` ​string · date-time ISO 8601 UTC date and time string; represents the moment when the order was placed. Example: 2016-12-23T15:58:07.187Z `customerEmail` ​string Email address entered at checkout or, for recurring subscription orders, the customer's current email address. Example: foo@example.com `customerId` ​string Unique customer id. Example: 585d498fdee9f31a60284a38 `discountLines` ​[DiscountLine\[\]](https://developers.squarespace.com/commerce-apis/~schemas#discountline) Array of discount line items; describes the promotions redeemed during checkout. `discountTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `externalOrderReference` ​string Order reference identifier used by the third-party sales channel. Example: EXT-98765 `formSubmission` ​[FormItem\[\]](https://developers.squarespace.com/commerce-apis/~schemas#formitem) Array of form data submitted via the checkout page. `fulfilledOn` ​string · date-time ISO 8601 UTC date and time string; represents the moment the order was fulfilled. `fulfillmentStatus` ​[FulfillmentStatus](https://developers.squarespace.com/commerce-apis/~schemas#fulfillmentstatus)  · enum Current fulfillment status of the order. Value may be: PENDING, FULFILLED, or CANCELED. Enum values: PENDING FULFILLED CANCELED `fulfillments` ​[Fulfillment\[\]](https://developers.squarespace.com/commerce-apis/~schemas#fulfillment) Array of shipping fulfillments; describes shipment information for the order. `grandTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `id` ​string Unique Order id. Example: 585d498fdee9f31a60284a37 `internalNotes` ​[OrderNote\[\]](https://developers.squarespace.com/commerce-apis/~schemas#ordernote) Array of internal notes added to the order by the merchant. `lineItems` ​[LineItem\[\]](https://developers.squarespace.com/commerce-apis/~schemas#lineitem) Array of purchased line items; line items describe what product or product variant was purchased, how many of that item were purchased, and additional details. `modifiedOn` ​string · date-time ISO 8601 UTC date and time string; represents when the order was last modified. Example: 2016-12-23T15:58:07.187Z `orderNumber` ​string Unique, sequential number for the Order. Example: 3 `paymentState` ​[PaymentState](https://developers.squarespace.com/commerce-apis/~schemas#paymentstate)  · enum Current state of payment for the order. Enum values: NOT\_CHARGED AUTHORIZED PAID REFUNDED PENDING FAILED REFUND\_PENDING REFUND\_FAILED show 1 more `priceTaxInterpretation` ​string Indicates whether lineItems.unitPricePaid includes tax. Values may be EXCLUSIVE or INCLUSIVE. Example: EXCLUSIVE `refundedTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `shippingAddress` ​[Address](https://developers.squarespace.com/commerce-apis/~schemas#address) Customer's shipping address provided at checkout or, for recurring subscription orders, the customer's current mailing address. `shippingLines` ​[ShippingLine\[\]](https://developers.squarespace.com/commerce-apis/~schemas#shippingline) Array of shipping line items; describes the shipping options chosen at checkout. `shippingOptionName` ​string the specific shipping service name selected at checkout (e.g. "USPS Ground Advantage", "Royal Mail Tracked 48"). `shippingOptionServiceType` ​string · enum The carrier service type identifier. Enum values: FEDEX\_GROUND FEDEX\_GROUND\_HOME\_DELIVERY FEDEX\_PRIORITY\_OVERNIGHT FEDEX\_STANDARD\_OVERNIGHT FEDEX\_2\_DAY FEDEX\_2\_DAY\_AM FEDEX\_EXPRESS\_SAVER FEDEX\_FIRST\_FREIGHT show 26 more `shippingTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `subtotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `taxTotal` ​[MonetaryAmount](https://developers.squarespace.com/commerce-apis/~schemas#monetaryamount) A monetary amount with currency code and decimal value `testmode` ​boolean If true, the order is a test order created using a payment method in test mode. * * * Fulfill order[](https://developers.squarespace.com/commerce-apis/retrieve-all-orders#fulfill-order) ---------------------------------------------------------------------------------------------------- POST https://api.squarespace.com /1.0/commerce/orders/{id}/fulfillments Updates the status of a specific order to fulfilled, with options to include shipment information and send a customer notification. ### Fulfill order › path Parameters[](https://developers.squarespace.com/commerce-apis/retrieve-all-orders#fulfill-order/path-parameters) `id` ​string · required Specifies the Order to update. ### Fulfill order › Headers[](https://developers.squarespace.com/commerce-apis/retrieve-all-orders#fulfill-order/header-parameters) `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 ### Fulfill order › Request Body[](https://developers.squarespace.com/commerce-apis/retrieve-all-orders#fulfill-order/request-body) [OrderFulfillmentRequest](https://developers.squarespace.com/commerce-apis/~schemas#orderfulfillmentrequest) `shipments` ​[CreateOrderShipmentRequest\[\]](https://developers.squarespace.com/commerce-apis/~schemas#createordershipmentrequest) Array of shipment data. `shouldSendNotification` ​boolean Indicates whether the customer should receive an email notification about the added shipments. ### Fulfill order › Responses[](https://developers.squarespace.com/commerce-apis/retrieve-all-orders#fulfill-order/responses) 204400404409 No content. The order was successfully fulfilled. No data returned * * * [Inventory](https://developers.squarespace.com/commerce-apis/inventory) [Transactions](https://developers.squarespace.com/commerce-apis/transactions) --- # Developer Portal Menu Layouts & Regions[](https://developers.squarespace.com/layouts-regions#layouts--regions) ========================================================================================= Site layouts define the HTML 'wrapper' for your site... everything from to . Single Layout Sites[](https://developers.squarespace.com/layouts-regions#single-layout-sites) ---------------------------------------------------------------------------------------------- At its simplest, a layout is one file (typically named `site.region`). This is used as the main template (like `index.php` in Wordpress). Example simple layout file (**site.region**): Code ` My Squarespace Site
    {squarespace.main-content}
    ` Example layout definition in **template.conf**: JavascriptCode `... "layouts" : { "default" : { "name" : "default", "regions" : [ "site.region"] } } ...` Multiple Layouts[](https://developers.squarespace.com/layouts-regions#multiple-layouts) ---------------------------------------------------------------------------------------- While single layout sites are the norm and work perfectly well for most sites, some more advanced sites may require different thinking - that's why you can enable multiple layouts in a Squarespace template. Consider the case where the homepage has a different layout than the sub pages. Let's say that the homepage is full-width and the sub pages have a sidebar... so the header and footer regions are the same, but the middle content section is different. ### Step 1: Create Multiple Region Files[](https://developers.squarespace.com/layouts-regions#step-1-create-multiple-region-files) First, create the shared layouts: * **header.region** _(only code from the site header)_ * **footer.region** _(only code from the site footer)_ Then create the two different regions for the middle content section: * **full-width.region** _(no sidebar in the markup)_ * **sidebar.region** _(contains sidebar markup)_ ### Step 2: Configure Layouts[](https://developers.squarespace.com/layouts-regions#step-2-configure-layouts) Set up the multiple layouts in your template configuration file (**template.conf**): JavascriptCode `... "layouts" : { "default" : { "name" : "Sidebar", "regions" : [ "header", "sidebar", "footer" ] }, "homepage" : { "name" : "Full Width", "regions" : [ "header", "full-width", "footer" ] } }, ...` ### Step 3: Set Default Layouts[](https://developers.squarespace.com/layouts-regions#step-3-set-default-layouts) Layouts can be set per page (via Page Settings in the interface), but you can make things easier for the user by setting the default layouts for specific types of pages. There are three options for setting default layouts: 1. **Site-wide default layout** – the layout called "default" in `template.conf` will be the site-wide default template. 2. **Collection-specific default** layouts – you can specify a default layout for each type of collection in the collection configuration file (collectionName.conf) using the "layout" variable. 3. **Folder-specific default layouts** – you can specify a default layout for pages/collections within a folder in the folder configuration file using the "layout" variable. Folder defaults override collection defaults. You can also specify the **default homepage layout**. If you add a layout variable named "homepage". See example above. The homepage default layout overrides all other default layouts. [Template Configuration](https://developers.squarespace.com/template-configuration) [Template Partials](https://developers.squarespace.com/template-partials) --- # Developer Portal Menu Template Configuration[](https://developers.squarespace.com/template-configuration#template-configuration) =========================================================================================================== The template configuration file (template.conf) contains template meta data (template name, author), defines page layouts, navigation areas, and the stylesheet loading order. All .conf files are written in the JSON format. Example Template Configuration File (template.conf)[](https://developers.squarespace.com/template-configuration#example-template-configuration-file-templateconf) ------------------------------------------------------------------------------------------------------------------------------------------------------------------ JavascriptCode `{ "name" : "Template Name", "author" : "Author Name", "layouts" : { "default" : { "name" : "Default", "regions" : [ "site" ] } }, "navigations" : [ { "title" : "Main Navigation", "name" : "mainNav" }, { "title" : "Secondary Navigation", "name" : "secondaryNav" } ], "stylesheets" : [ "global.less", "typography.less" ] }` Configuration Options[](https://developers.squarespace.com/template-configuration#configuration-options) --------------------------------------------------------------------------------------------------------- ### name[](https://developers.squarespace.com/template-configuration#name) The name of the template. Displayed in the Template and Developer tabs. (Required) ### author[](https://developers.squarespace.com/template-configuration#author) The author of the template. Displayed in the Template and Developer tabs. (Required) ### layouts[](https://developers.squarespace.com/template-configuration#layouts) Site layouts that consist of one or more regions. Defines the overall HTML markup. See [Layouts & Regions](https://developers.squarespace.com/layouts-regions) . (Required: default layout must be defined) ### layouts > name[](https://developers.squarespace.com/template-configuration#layouts--name) The name of the layout option as it appears in the user-editable layout select field. ### layouts > regions[](https://developers.squarespace.com/template-configuration#layouts--regions) List of region files to combine into layout (in the order they should be combined). ### navigations[](https://developers.squarespace.com/template-configuration#navigations) Configures the top level navigation sections visible in the Navigation section of the interface. See [Menus & Navigation](https://developers.squarespace.com/menus-navigation) . ### navigations > title[](https://developers.squarespace.com/template-configuration#navigations--title) The name of the layout option as it appears in the user-editable layout select field. ### navigations > name[](https://developers.squarespace.com/template-configuration#navigations--name) The navigation ID. Used to access navigation data in navigation tags and elsewhere. ### stylesheets[](https://developers.squarespace.com/template-configuration#stylesheets) List of your stylesheet. Stylesheets will be compiled into `site.css` following the ordering here. **NOTE:** If you add a file named `reset.css` to the `/styles/` folder it will automatically get added to the top of the `site.css` file. It should not be listed in the "stylesheets" variable in `template.conf`. [Templating Basics](https://developers.squarespace.com/templating-basics) [Layouts & Regions](https://developers.squarespace.com/layouts-regions) --- # Developer Portal Menu View JSON Data[](https://developers.squarespace.com/view-json-data#view-json-data) =================================================================================== The JSON data returned to every page and block can be viewed and accessed via a URL or template formatter. Website & Collection Data[](https://developers.squarespace.com/view-json-data#website--collection-data) -------------------------------------------------------------------------------------------------------- To access the data behind any collection in a structured format, append this query string to any URL on your site: `?format=json-pretty` In addition to returning collection data, other data needed to construct a full page (such as website data) will also be returned. > _Note: Using `?format=json-pretty` is not static and should not be used as an alternative to our APIs._ ### Pretty JSON Example:[](https://developers.squarespace.com/view-json-data#pretty-json-example) Here is an example URL you can paste into your browser address bar to view the JSON data: `http://base-template.squarespace.com/blog/?format=json-pretty` JavascriptCode `{ ... "collection": { "id": "5048fde7c4aa917cbd4d8e13", "websiteId": "50295e80e4b096e761d7e4d3", "enabled": true, "starred": false, "type": 1, "ordering": 2, "title": "Blog", "navigationTitle": "Blog", "urlId": "blog", "itemCount": 2, "updatedOn": 1454432700858, "pageSize": 20, "folder": false, "dropdown": false, "tags": [ "tag1", "pizza", "coffee", "snacks", "tag2" ], "categories": [ "category1", "category2" ], "homepage": false, "typeName": "blog", "synchronizing": false, "fullUrl": "/blog/", "passwordProtected": false, "typeLabel": "blog" }, ... }` Block & Navigation Data[](https://developers.squarespace.com/view-json-data#block--navigation-data) ---------------------------------------------------------------------------------------------------- Within a template file directly, you can use the JSON formatter to output JSON for any item you have in scope, just add this within the block file: `{item|json-pretty}` – this is very useful during development as you can review the JSON data available in the source of the page as rendered. Example from a `navigation.block` file: Code `` You can also log the object in your browser's console if you find that preferable to viewing the source: Code `` This is especially useful for debugging. [What is JSON?](https://developers.squarespace.com/what-is-json) [Templating Basics](https://developers.squarespace.com/templating-basics) --- # Developer Portal Menu Templating Basics[](https://developers.squarespace.com/templating-basics#templating-basics) ============================================================================================ Squarespace sites store their content using a JSON data dictionary, which you can see by adding `?format=json-pretty` to the end of any site URL. This page will show some examples of how we use JSON-T to display JSON data on template pages. > **NOTE:** The examples on this page require an understanding of JSON key/value pairs. If you aren't familiar with what JSON Data is, please see the [introduction to JSON](https://developers.squarespace.com/what-is-json) > page. Rendering JSON Data[](https://developers.squarespace.com/templating-basics#rendering-json-data) ------------------------------------------------------------------------------------------------ In order to show data on a page, you first need to scope into the appropriate section of JSON Data. Then you can display data by using curly brackets around any JSON key inside that section. **In this basic example, we'll show a Page Title:** JavascriptCode `// JSON Data { "collection" : { "title" : "Page Title", "description" : "This is the page description." } }` Code ` {.section collection}

    {title}

    {description}

    {.end}` Code `

    Page Title

    This is the page description.

    ` Handling an Array[](https://developers.squarespace.com/templating-basics#handling-an-array) -------------------------------------------------------------------------------------------- When scoping into a section with multiple items, commonly known as an array, JSON-T uses the syntax `{.repeated section key}{.end}` instead of `{.section key}{.end}`. Every piece of code within the opening and closing scope tags will be repeated for each item in the array. JavascriptCode `// JSON Data { "items" : [ { "title" : "First Item", "description" : "This is the first item description." }, { "title" : "Second Item", "description" : "This is the second item description." }, { "title" : "Third Item", "description" : "This is the third item description." } ] }` Code ` {.repeated section items}

    {title}

    {description}

    {.end}` Code `

    First Item

    This is the first item description.

    Second item

    This is the second item description.

    Third Item

    This is the third item description.

    ` Render Data from Multiple Sections[](https://developers.squarespace.com/templating-basics#render-data-from-multiple-sections) ------------------------------------------------------------------------------------------------------------------------------ In your template you'll more than likely have a need to scope into multiple sections on any given page. You can do this by ending one scope tag and entering another. JavascriptCode `// JSON Data { "website" : { "siteTitle" : "My Website", "baseUrl" : "http://developers.squarespace.com" }, "collection" : { "title" : "Page Title", "description" : "This is the page description." } }` Code ` {.section website}

    {siteTitle}

    {.end} {.section collection}

    {title}

    {description}

    {.end}` Code `

    My Website

    Page Title

    This is the page description.

    ` Section with no Data[](https://developers.squarespace.com/templating-basics#section-with-no-data) -------------------------------------------------------------------------------------------------- If a section or repeated section has an empty value, nothing inside the scope tags will be outputted. JavascriptCode `// JSON Data { "collection" : { } }` Code ` {.section collection}

    {title}

    {description}

    {.end}` Code `` Using an Or Statement[](https://developers.squarespace.com/templating-basics#using-an-or-statement) ---------------------------------------------------------------------------------------------------- If a section or repeated section has no value, an or statement outputs alternative markup to express that empty value. Code `// JSON Data { "items" : [ ] } {.repeated section items}

    {title}

    {description}

    {.or}

    There are no items here.

    {.end}

    There are no items here.

    ` Using Dot Notation[](https://developers.squarespace.com/templating-basics#using-dot-notation) ---------------------------------------------------------------------------------------------- You can add any JSON value to your template by writing the key and its parent object in dot notation. This method of scoping only defines the scope for this one single value, so no end tag is required in JSON-T. Code `// JSON Data { "collection" : { "title" : "Page Title", "description" : "This is the page description." } }

    {collection.title}

    {collection.description}

    Page Title

    This is the page description.

    ` Referencing the Scope[](https://developers.squarespace.com/templating-basics#referencing-the-scope) ---------------------------------------------------------------------------------------------------- Using scope reference, written as `{@}`, allows you to reference the key you're scoped into. This is like `(this)` in JavaScript. Code `// JSON Data { "collection" : { "title" : "Page Title", "description" : "This is the page description." } } {.section collection} {.section title}

    {@}

    {.end} {.section description}

    {@}

    {.end} {.end}

    Page Title

    This is the page description.

    ` Using an If Statement[](https://developers.squarespace.com/templating-basics#using-an-if-statement) ---------------------------------------------------------------------------------------------------- If statements check to see if a section exists without scoping into that section. JavascriptCode `// JSON Data { "items" : [ { "title" : "First Item", "description" : "This is the first item description." }, { "title" : "Second Item", "description" : "This is the second item description.", "featured" : true }, { "title" : "Third Item", "description" : "This is the third item description." } ] }` Code ` {.repeated section items} {.if featured}

    {title}

    {description}

    {.or}

    {title}

    {description}

    {.end} {.end}` Code `

    First Item

    This is the first item description.

    Second item

    This is the second item description.

    Third Item

    This is the third item description.

    ` [View JSON Data](https://developers.squarespace.com/view-json-data) [Template Configuration](https://developers.squarespace.com/template-configuration) --- # Developer Portal Menu Custom JavaScript[](https://developers.squarespace.com/custom-javascript#custom-javascript) ============================================================================================ You can use any custom JavaScript file or library in your Squarespace Template. Squarespace provides a script loader that minifies and combines your custom scripts, which you can use if you like. Alternatively you can package your scripts using the preprocessor of your choice. Using the Script Loader[](https://developers.squarespace.com/custom-javascript#using-the-script-loader) -------------------------------------------------------------------------------------------------------- Squarespace's script loader minifies your code and allows you to combine all of your JavaScript files into one, cutting down on HTTP requests. Loading JavaScript in Squarespace is very similar to the standard script tag syntax in HTML. The syntax is outlined in the code sample below. Code ` ` **NOTE:** The script's src path is relative to the template `/scripts` folder. Using your own JavaScript Preprocessor[](https://developers.squarespace.com/custom-javascript#using-your-own-javascript-preprocessor) -------------------------------------------------------------------------------------------------------------------------------------- You can use any JavaScript workflow tool, like NPM, gulp, Browserify or webpack. You can include the compiled code in your `/scripts` folder, and link to those files using regular script tags, or the Squarespace Script Tag. ### Including External Third Party Libraries[](https://developers.squarespace.com/custom-javascript#including-external-third-party-libraries) You can use libraries hosted on an external server or CDN, but we recommend having a local fallback in case the CDN isn't available. Here's an example: Code ` ` [Custom Query Tag](https://developers.squarespace.com/custom-query-tag) [Image Loader](https://developers.squarespace.com/image-loader) --- # Developer Portal Menu JSON-T Predicates[](https://developers.squarespace.com/json-t-predicates#json-t-predicates) ============================================================================================ Predicates are special [Directives](https://developers.squarespace.com/json-t-directives) used like sections, except they don't correspond to a variable in the context. They allow you to test for certain system defined features. The format for a predicate is `{.predicate-name?} ... {.end}`. You can generally spot a predicate by the trailing question mark. Collection Predicates[](https://developers.squarespace.com/json-t-predicates#collection-predicates) ---------------------------------------------------------------------------------------------------- These tags are used in collection template files (`.list`, `.item`). ### Main Image Predicate[](https://developers.squarespace.com/json-t-predicates#main-image-predicate) Code `{.main-image?} {.end}` Tests the presence of a Main Image for a collection or item. ### Excerpt Predicate[](https://developers.squarespace.com/json-t-predicates#excerpt-predicate) Code `{.excerpt?} {.end}` Tests the presence an excerpt for an item. ### Comments Enabled Predicate[](https://developers.squarespace.com/json-t-predicates#comments-enabled-predicate) Code `{.comments?} {.end}` Tests if comments are enabled for a particular item. ### Disqus Enabled Predicate[](https://developers.squarespace.com/json-t-predicates#disqus-enabled-predicate) Code `{.disqus?} {.end}` Test is Disqus comments have been enabled (only useful in items with comments enabled). ### Video Predicate[](https://developers.squarespace.com/json-t-predicates#video-predicate) Code `{.video?} {.end}` Tests if an item within a Gallery Collection is a video. ### Even Predicate[](https://developers.squarespace.com/json-t-predicates#even-predicate) Code `{.even?} {.end}` Tests if an item's index position is even. ### Odd Predicate[](https://developers.squarespace.com/json-t-predicates#odd-predicate) Code `{.odd?} {.end}` Tests if an item's index position is odd. ### Equal Predicate[](https://developers.squarespace.com/json-t-predicates#equal-predicate) Code `{.equal? arg1 arg2} {.end}` Tests if two alpha-numeric arguments are equal. If true, anything between the condition `{.equal?}` and `{.end}` will be output. If either of your arguments may contain spaces, use a delimiter other than a space to ensure an accurate return. For example: `{.equal?:arg1:arg2}`. Navigation Predicates[](https://developers.squarespace.com/json-t-predicates#navigation-predicates) ---------------------------------------------------------------------------------------------------- These predicates are only used within navigation (`.block`) files. ### Collection Predicate[](https://developers.squarespace.com/json-t-predicates#collection-predicate) Code `{.collection?} {.end}` Tests if a navigation item is a collection. ### External Link Predicate[](https://developers.squarespace.com/json-t-predicates#external-link-predicate) Code `{.external-link?} {.end}` Tests if a navigation item is an external link. ### Folder Predicate[](https://developers.squarespace.com/json-t-predicates#folder-predicate) Code `{.folder?} {.end}` Tests if a navigation item is a folder. [JSON-T Directives](https://developers.squarespace.com/json-t-directives) [JSON-T Formatters](https://developers.squarespace.com/json-t-formatters) --- # Developer Portal Menu JSON-T Formatters[](https://developers.squarespace.com/json-t-formatters#json-t-formatters) ============================================================================================ Formatters can be used to control the formatting of data for a given variable. The syntax of a formatter is `{variable-name|formatter-name}`. ### JSON[](https://developers.squarespace.com/json-t-formatters#json) Code `{variable|json}` Output the variable as JSON data. ### Prettified JSON[](https://developers.squarespace.com/json-t-formatters#prettified-json) Code `{variable|json-pretty}` Output the variable as formatted JSON data. Date/Time Formatters[](https://developers.squarespace.com/json-t-formatters#datetime-formatters) ------------------------------------------------------------------------------------------------- ### Date[](https://developers.squarespace.com/json-t-formatters#date) Code `{addedOn|date %A, %B %d}` Format a date in-line using the [YUI date format](https://yuilibrary.com/yui/docs/api/classes/Date.html#method_format) . ### Timesince Date[](https://developers.squarespace.com/json-t-formatters#timesince-date) Code `{addedOn|timesince}` Displays the time/date in a term relative to right now. Also referred to as 'time ago' or 'twitter-style' date format. String Formatters[](https://developers.squarespace.com/json-t-formatters#string-formatters) -------------------------------------------------------------------------------------------- ### Slugify[](https://developers.squarespace.com/json-t-formatters#slugify) Code `{variable|slugify}` Converts a human readable string variable to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. For example, "Test Example" would become "test-example". ### Smartypants[](https://developers.squarespace.com/json-t-formatters#smartypants) Code `{variable|smartypants}` Translates plain ASCII punctuation characters into "smart" typographic punctuation HTML entities ([source](http://daringfireball.net/projects/smartypants/) ). ### URL Encode[](https://developers.squarespace.com/json-t-formatters#url-encode) Code `{variable|url-encode}` Encodes a variable so it can be safely used in a URL. For instance, "Test Example" would become "Test%20Example". ### HTML[](https://developers.squarespace.com/json-t-formatters#html) Code `{variable|html}` Encodes a variable so it can be safely used in HTML, replacing the characters `<`, `>`, and `&` with their corresponding entities. For example, `