Marketplace products

Replace marketplace product variations

Atomically replaces the complete variation map.

PUT
/v1/marketplace-products/{marketplaceProductId}/variants

Send the complete list that must hold after the call. This is a PUT: whatever you leave out is removed.

  • The body order becomes the map order: the GET returns the variations in it.
  • A Variant that was already in the map keeps the same variation id.
  • One that leaves is removed.
  • An omitted externalVariantId keeps what the marketplace already assigned.
  • The replacement marks publicationState: dirty and does not call the marketplace.

Common errors

  • 409 CONFLICT with details.reason equal to marketplace_product_variant_in_use: an offer line (binding) still sells the variation that would leave. Replace the binding map first.
  • 409 CONFLICT with details.reason equal to variant_archived or product_archived: a Variant in the body is archived, or active in an archived product.

Authorization

api_key
headerAuthorizationBearer <token>

API key (mk_...)

Path Parameters

marketplaceProductId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Request Body

application/json
  1. body

The complete variation map that atomically replaces the marketplace product variations.

variants*array<>

Complete variation map. A Variant already in the map keeps its id; one left out is removed.

Itemsitems <= 100

Response Body

The complete variation map after replacement.

application/json
  1. response

The complete variation map of a marketplace product.

data*array<>

Every variation, in the order of the last PUT; one added later goes last.

curl -X PUT "https://example.com/v1/marketplace-products/497f6eca-6276-4993-bfeb-53cbbbba6f08/variants" \  -H "Content-Type: application/json" \  -d '{    "variants": [      {        "variantId": "47c9f819-fcf6-4478-b21a-678ecc594a11",        "desired": {          "attributes": [            {              "key": "color",              "value": {                "type": "enum",                "value": "black"              }            }          ]        }      }    ]  }'
{  "data": [    {      "id": "5b2d7e9a-1c4f-4e6b-8a3d-2f9c0b7e6d41",      "marketplaceProductId": "8a6f0c55-6a1e-4c55-9b0a-3b1f2d9e4c10",      "variantId": "47c9f819-fcf6-4478-b21a-678ecc594a11",      "externalVariantId": null,      "desired": {        "attributes": [          {            "key": "color",            "value": {              "type": "enum",              "value": "black"            }          },          {            "key": "storage",            "value": {              "type": "text",              "text": "128GB"            }          }        ]      },      "observed": null,      "createdAt": "2026-10-10T12:00:00.000Z",      "updatedAt": "2026-10-10T12:00:00.000Z"    }  ]}