Commerce · Commerce

Add variants

Adds variants. Works with Shopify and WooCommerce accounts.

POSThttps://api.pozy.ai/v1/commerce/products/{productId}/variants
Shopify and WooCommercecreateCommerceProductVariants

Guides: Commerce & blogs, Products and catalog

Request

Send your API key as Authorization: Bearer pz_live_.... Read-only keys cannot call it. Keys with the commerce resource group disabled get 403 resource_group_disabled. Authentication

Path parameters

NameTypeNotes
productIdrequiredstring

Request body

application/json, required

  • accountIdstringrequired
  • variantsarray of objectrequired

    At least 1 item. Up to 100 items.

    • skustring
    • pricenumber or stringrequired
    • compareAtPricenumber or string
    • optionsarray of object
      2 child fields
      • namestring
      • valuestring

Example

curl -X POST "https://api.pozy.ai/v1/commerce/products/659773d34b353e6821202f21/variants" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "accountId": "696e0b682d0a31188e7a2ba9",
  "variants": [
    {
      "price": 12.5
    }
  ]
}'

Response

200 on success

  • productobject
    22 child fields
    • idstring
    • accountIdstring
    • platformstring

      One of shopify.

    • titlestring
    • descriptionHtmlstring

      Can be null.

    • handlestring

      Can be null.

    • vendorstring

      Can be null.

    • productTypestring

      Can be null.

    • tagsarray of string
    • statusstring

      One of active, draft, pending_review, rejected, inactive, archived, deleted.

    • platformStatusstring
    • featuredImageobject

      One of:

      Commerce Image (3 fields)
      • idstring

        Can be null.

      • urlstring
      • altTextstring

        Can be null.

    • imagesarray of object
      3 child fields
      • idstring

        Can be null.

      • urlstring
      • altTextstring

        Can be null.

    • optionsarray of object
      2 child fields
      • namestring
      • valuesarray of string
    • variantsarray of object
      9 child fields
      • idstring
      • titlestring
      • skustring

        Can be null.

      • barcodestring

        Can be null.

      • priceobject
        2 child fields
        • amountstringrequired
        • currencystringrequired
      • compareAtPriceobject

        One of:

        Commerce Money (2 fields)
        • amountstringrequired
        • currencystringrequired
      • inventoryQuantityinteger

        Can be null.

      • availableForSaleboolean

        Can be null.

      • optionsarray of object
        2 child fields
        • namestring
        • valuestring
    • totalInventoryinteger

      Can be null.

    • urlstring

      Can be null.

    • seoobject
      2 child fields
      • titlestring

        Can be null.

      • descriptionstring

        Can be null.

    • createdAtstring (date-time)

      Can be null.

    • updatedAtstring (date-time)

      Can be null.

    • publishedAtstring (date-time)

      Can be null.

    • platformDataobject

      Can be null.

200 response
{
  "product": {
    "id": "6bfebd43ddc270f6d2c56fc5",
    "accountId": "696e0b682d0a31188e7a2ba9",
    "platform": "shopify",
    "title": "Launch day",
    "descriptionHtml": "string",
    "handle": "acme",
    "vendor": "string",
    "productType": "string",
    "tags": [
      "string"
    ],
    "status": "active",
    "platformStatus": "instagram",
    "featuredImage": {
      "id": "6bfebd43ddc270f6d2c56fc5",
      "url": "https://pozy.ai/media/example-1.jpg",
      "altText": "Hello from Pozy"
    },
    "images": [
      {
        "id": "6bfebd43ddc270f6d2c56fc5",
        "url": "https://pozy.ai/media/example-1.jpg",
        "altText": "Hello from Pozy"
      }
    ],
    "options": [
      {
        "name": "Acme",
        "values": [
          "string"
        ]
      }
    ],
    "variants": [
      {
        "id": "6bfebd43ddc270f6d2c56fc5",
        "title": "Launch day",
        "sku": "string",
        "barcode": "string",
        "price": {
          "amount": "string",
          "currency": "USD"
        },
        "compareAtPrice": {
          "amount": "string",
          "currency": "USD"
        },
        "inventoryQuantity": 1,
        "availableForSale": true,
        "options": [
          {
            "name": "Acme",
            "value": "string"
          }
        ]
      }
    ],
    "totalInventory": 42,
    "url": "https://pozy.ai/media/example-1.jpg",
    "seo": {
      "title": "Launch day",
      "description": "A short description"
    },
    "createdAt": "2026-10-02T09:00:00.000Z",
    "updatedAt": "2026-10-02T09:00:00.000Z",
    "publishedAt": "2026-10-02T09:00:00.000Z",
    "platformData": {}
  }
}

Errors

Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:

400invalid_request_errorA parameter or body field is missing or invalid. param names it.
401authentication_errorThe API key is missing, revoked or expired.
403permission_errorThe key is read-only, scoped to other profiles, or has this resource group disabled.
404not_foundNothing with that id exists in your workspace.
429rate_limit_errorToo many requests this minute. Wait for Retry-After seconds.

Every code is listed in Errors.

More in Commerce

GETGet a storeGETList ordersGETGet an orderGETList productsPOSTCreate a productPOSTActivate, deactivate, archive or delete productsGETGet a productPATCHUpdate a productPOSTUpdate variant pricesGETList collectionsPOSTCreate a collectionGETGet a collectionPATCHUpdate a collectionDELDelete a collectionPOSTAdd or remove products in a collectionDELDelete variantsPOSTAdd optionsDELDelete optionsPOSTAdd imagesDELRemove imagesPOSTReorder imagesPOSTDuplicate a productGETList product metafieldsPUTSet product metafieldsDELDelete product metafieldsPOSTPublish or unpublish a productGETList collection metafieldsPUTSet collection metafieldsDELDelete collection metafieldsPOSTPublish or unpublish a collectionPOSTAdd or remove tags in bulkPOSTReorder products in a collectionGETList pagesPOSTCreate a pageGETGet a pagePATCHUpdate a pageDELDelete a pageGETList locationsGETGet a product's stockPOSTSet or adjust stockGETList sales channelsGETList discountsPOSTCreate a discountGETGet a discountPATCHUpdate a discountDELDelete a discountPOSTActivate or deactivate a discountPOSTAdd codes to a discountGETList URL redirectsPOSTCreate a URL redirectPATCHUpdate a URL redirectDELDelete a URL redirectGETList navigation menusPOSTCreate a navigation menuGETGet a navigation menuPUTReplace a navigation menuDELDelete a navigation menuGETList metaobject definitionsGETList metaobjects of a typePOSTCreate a metaobjectGETGet a metaobjectPATCHUpdate a metaobjectDELDelete a metaobjectGETList marketsGETList price listsPUTSet fixed pricesDELRemove fixed pricesPUTRecord a marketing activityDELDelete a marketing activityPOSTReport daily engagementGETList catalog syncsPOSTSync a store into a Meta catalogGETGet a catalog syncDELStop a catalog syncPOSTRun a catalog sync now