---
title: "Create product"
method: POST
path: "/v2/commerce/products"
tags: ["Products"]
---

# Create product

`POST /v2/commerce/products`

## Request

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

Creates a product with appropriate subresources based on product type.

## Headers

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

## Request body

- union
  - CreateGiftCardProductRequest: Request payload to create a GIFT_CARD product.
    - `description` string
    - `isVisible` boolean
    - `name` string
    - `storePageId` string
    - `tags` string[]
    - `type` string
    - `urlSlug` string
    - `variants` CreateGiftCardProductVariantRequest[]
      - `pricing` SimpleProductPricing
        - `basePrice` MonetaryAmount: A monetary amount with currency code and decimal value.
          - `currency` object: ISO 4217 currency code.
            - `currencyCode` string
            - `defaultFractionDigits` integer
            - `displayName` string
            - `numericCode` integer
            - `numericCodeAsString` string
            - `symbol` string
          - `value` number: Decimal monetary value.
      - `sku` string
  - CreatePhysicalProductRequest: Request payload to create a PHYSICAL product.
    - `description` string
    - `isVisible` boolean
    - `name` string
    - `storePageId` string
    - `tags` string[]
    - `type` string
    - `urlSlug` string
    - `variantAttributes` string[]
    - `variants` 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
        - `basePrice` MonetaryAmount: A monetary amount with currency code and decimal value.
          - `currency` object: ISO 4217 currency code.
            - `currencyCode` string
            - `defaultFractionDigits` integer
            - `displayName` string
            - `numericCode` integer
            - `numericCodeAsString` string
            - `symbol` string
          - `value` number: Decimal monetary value.
        - `onSale` boolean
        - `salePrice` MonetaryAmount: A monetary amount with currency code and decimal value.
          - `currency` object: ISO 4217 currency code.
            - `currencyCode` string
            - `defaultFractionDigits` integer
            - `displayName` string
            - `numericCode` integer
            - `numericCodeAsString` string
            - `symbol` string
          - `value` number: Decimal monetary value.
      - `shippingMeasurements` ProductMeasurements: Measurements of the variant when it's shipped. Present for PHYSICAL products only.
        - `dimensions` ProductDimensions: Physical dimensions of the variant.
          - `height` number, float: Height of the variant.
          - `length` number, float: Length of the variant.
          - `unit` 'CENTIMETER' | 'INCH': Unit of measurement. Supported values: `INCH`, `CENTIMETER`.
          - `width` number, float: Width of the variant.
        - `weight` ProductWeight: Weight of the variant.
          - `unit` 'KILOGRAM' | 'POUND': Unit of measurement. Supported values: `KILOGRAM`, `POUND`.
          - `value` number, float: Weight amount.
      - `sku` string
      - `stock` ProductStock: Available stock for the variant. Present for PHYSICAL products only.
        - `quantity` integer: Number of units that can be purchased.
        - `unlimited` boolean: Indicates whether the variant has unlimited stock.
  - CreateServiceProductRequest: Request payload to create a SERVICE product.
    - `description` string
    - `isVisible` boolean
    - `name` string
    - `storePageId` string
    - `tags` string[]
    - `type` string
    - `urlSlug` string
    - `variantAttributes` string[]
    - `variants` CreateServiceProductVariantRequest[]
      - `attributes` object
      - `pricing` FullProductPricing
        - `basePrice` MonetaryAmount: A monetary amount with currency code and decimal value.
          - `currency` object: ISO 4217 currency code.
            - `currencyCode` string
            - `defaultFractionDigits` integer
            - `displayName` string
            - `numericCode` integer
            - `numericCodeAsString` string
            - `symbol` string
          - `value` number: Decimal monetary value.
        - `onSale` boolean
        - `salePrice` MonetaryAmount: A monetary amount with currency code and decimal value.
          - `currency` object: ISO 4217 currency code.
            - `currencyCode` string
            - `defaultFractionDigits` integer
            - `displayName` string
            - `numericCode` integer
            - `numericCodeAsString` string
            - `symbol` string
          - `value` number: Decimal monetary value.
      - `sku` string
      - `stock` ProductStock: Available stock for the variant. Present for PHYSICAL products only.
        - `quantity` integer: Number of units that can be purchased.
        - `unlimited` boolean: Indicates whether the variant has unlimited stock.

## Response `201`

The product was created successfully.

- ProductV2
  - `createdOn` string, date-time, required
  - `description` string
  - `id` string, required
  - `images` 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: 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.
  - `isVisible` boolean
  - `modifiedOn` string, date-time, required
  - `name` string
  - `seoOptions` SeoOptions: Options for search engine optimization.
    - `description` string
    - `title` string
  - `storePageId` string, required
  - `tags` string[]
  - `type` 'PHYSICAL' | 'SERVICE' | 'GIFT_CARD' | 'DIGITAL', required
  - `url` string
  - `urlSlug` string

## Other responses

- `400`: Bad request. The request body does not conform to the required specification.
- `405`: Method not allowed. The Product requested is not a supported product type for this operation.
- `409`: Conflict. The request conflicts with the current state of the resource.
- `429`: Too many requests. The rate limit for this endpoint has been exceeded.

---

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