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 when the variations come to differ from the published ones, and does not call the marketplace. A replacement that changes nothing leaves it clean.

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.
  • 400 or 409 with an asset details.reason (asset_not_found, asset_seller_mismatch, asset_not_product_media, asset_type_mismatch, and asset_not_ready as 409): an assetId cited in media is not valid for this marketplace product. The asset must be ready, belong to the same seller and have a type that suits the item's role (as in Replace product media: role: "video" on an image gives asset_type_mismatch). media uses the Product format, { assetId, role, position }. Copy another seller's asset with Copy media.
  • 409 CONFLICT with details.reason equal to marketplace_product_variant_sku_taken: two variations of the MarketplaceProduct would end up with the same SKU (trimmed, case-insensitive). Nothing is written. The same SKU may exist in another MarketplaceProduct.

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"    }  ]}