Listings

Replace variant bindings

Atomically replaces the complete binding map.

PUT
/v1/listings/{listingId}/variant-bindings

Send the complete set, including [] to unlink. Each line points to a variation of the Listing's MarketplaceProduct. Provide one of these:

  • marketplaceProductVariantId: uses the variation that already exists.
  • variantId: uses the local Variant; if the MarketplaceProduct does not have a variation for it yet, the API creates the variation in the same call.

If you send both, they must match. Every Variant must belong to the same Seller, and an external identity (externalId) cannot appear twice. On each line, desired.offer is the offer override for that line only.

Common errors

  • 400 VALIDATION_ERROR with details.field equal to bindings: the variation belongs to another MarketplaceProduct, the variantId does not match the variation, or the Variant belongs to another Seller.
  • 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. Replace it with another.
  • 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

listingId*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 mapping that atomically replaces all listing variant bindings. A variant already bound keeps its binding id (its fields are updated in place); a binding left out is deleted and its id leaves syncPolicy.inventory.eligibleBindingIds. A line named by variantId gets a marketplace product variation when it has none.

bindings*array<>

Complete binding map; an empty list unlinks every variant. Each variant and each external identity appears at most once.

Itemsitems <= 100

Response Body

The new complete binding map, in request order. A variation that was already bound keeps its binding id; a line named by variantId got a marketplace product variation if it had none. When a kept line turns inventoryEligible and the inventory policy is automatic for it, an inventory.publish job sends its quantity, as a stock movement would.

application/json
  1. response
[index: integer]?

One offer line: a marketplace product variation sold by this listing.

curl -X PUT "https://example.com/v1/listings/497f6eca-6276-4993-bfeb-53cbbbba6f08/variant-bindings" \  -H "Content-Type: application/json" \  -d '{    "bindings": [      {        "variantId": "47c9f819-fcf6-4478-b21a-678ecc594a11",        "externalSku": "IP16-BLK-128"      }    ]  }'
[  {    "id": "cb064b64-2f63-4c3e-aa42-f11ea0f82b17",    "listingId": "0e2ce906-a6ab-4101-9461-4168c8b6b902",    "marketplaceProductVariantId": "5b2d7e9a-1c4f-4e6b-8a3d-2f9c0b7e6d41",    "variantId": "47c9f819-fcf6-4478-b21a-678ecc594a11",    "externalId": "MLB123",    "externalSku": "IP16-BLK-128",    "inventoryEligible": true,    "linkSource": "manual",    "matchedBy": null,    "desired": {},    "marketplaceStatus": null,    "buyable": null,    "discoverable": null,    "pendingRevision": null,    "statusReasons": [],    "lastPublishedAt": null  }]