---
title: "Upsert products"
method: POST
path: "/products"
tags: ["Products"]
---

# Upsert products

`POST /products`

Creates or updates up to 100 products, keyed by your productId. Products pushed here behave like Shopify/WooCommerce products - they power product blocks, replenishment reminders, and back-in-stock notifications. Stock transitions trigger back-in-stock events for waiting subscribers. Updates are partial - omitted optional fields keep their stored values; pass an explicit null to clear one.

## Request body

- object
  - `products` object[], required — Products to create or update
    - `productId` string, required — Your product identifier. Used as the upsert key.
    - `title` string, required
    - `description` string, nullable
    - `imageUrl` string, nullable
    - `url` string, nullable — Public product page URL
    - `priceCents` integer, nullable — Price in cents. Defaults to the lowest variant price when variants are provided.
    - `compareAtPriceCents` integer, nullable
    - `currency` string, nullable — ISO 4217 currency code
    - `inStock` boolean — Defaults to true, or to whether any variant is available when variants are provided.
    - `providerCreatedAt` string, date-time, nullable — Product creation time in the source catalog. Omit to preserve the stored value; pass null to clear it.
    - `variants` object[] — Product variants. When provided, the variant list is replaced entirely (an empty array removes all variants). Omit to leave existing variants unchanged.
      - `variantId` string, required — Your variant identifier
      - `title` string, required
      - `sku` string, nullable
      - `priceCents` integer, nullable
      - `compareAtPriceCents` integer, nullable
      - `imageUrl` string, nullable
      - `inStock` boolean — Defaults to inventoryQuantity > 0 when provided, otherwise true.
      - `inventoryQuantity` integer, nullable
      - `options` object[]
        - `name` string, required
        - `value` string, required

## Response `200`

Products upserted successfully

- object
  - `success` boolean
  - `upserted` integer
  - `backInStockEventsTriggered` integer — Number of back-in-stock notifications triggered by stock transitions in this upsert
  - `products` CommerceProduct[]
    - `id` string — Internal Sequenzy product ID
    - `productId` string, nullable — Your product identifier (providerProductId)
    - `providerProductId` string, nullable — Provider product identifier
    - `provider` 'api' | 'stripe' | 'shopify' | 'woocommerce' | 'manual'
    - `title` string
    - `description` string, nullable
    - `imageUrl` string, nullable
    - `url` string, nullable
    - `price` integer, nullable — Unit price in cents
    - `priceCents` integer, nullable
    - `compareAtPrice` integer, nullable
    - `compareAtPriceCents` integer, nullable
    - `currency` string, nullable
    - `inStock` boolean
    - `providerCreatedAt` string, date-time, nullable — Product creation time reported by the source catalog. Used for newest-product ranking.
    - `digitalDelivery` ProductDigitalDelivery, nullable — Distributable file delivered after a purchase of this product.
      - `url` string
      - `source` 'upload' | 'url'
      - `fileName` string, nullable
      - `fileSizeBytes` integer, nullable
      - `mimeType` string, nullable
      - `updatedAt` string, date-time, nullable
    - `variants` object[]
      - `variantId` string
      - `title` string
      - `sku` string, nullable
      - `priceCents` integer, nullable
      - `compareAtPriceCents` integer, nullable
      - `imageUrl` string, nullable
      - `inStock` boolean
      - `inventoryQuantity` integer, nullable
      - `options` object[]
        - `name` string
        - `value` string
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `401` — Unauthorized
- `500` — Internal server error

---

[API](https://skmtc.net/sequenzy/apis/sequenzy-api.md) · [All operations](https://skmtc.net/sequenzy/apis/sequenzy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sequenzy/sequenzy-api/versions/af1cf9620482/schema)
