Skip to main content

Check Listing Mappings for Configured Products

POST 

/api/configurable-products/mapping-check

Check channel listing mappings before saving them. Returns a warning for each mapping that points a listing at a configured product: orders that carry a SKU option still find their own configured product, but plain sales of the variant would land on the configured product, ship and cost as configured, and raise a manufacturing order when build to order is on. Nothing is saved; mappings that are not flagged are simply left out of the result.

Required scope: products:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: Requires Bearer token (scope products:write) and the integrations.update permission.

Body:

  • integration_instance_id (integer, required) — the sales channel connection the listings belong to. An ID with no sales channel returns an empty list.
  • mappings (array, required, 1 to 500 items) — the mappings you are about to save:
    • product_id (integer, required) — the product the listing would be mapped to.
    • listing_id (integer, optional) — the existing listing's ID, or null for a variant with no listing yet.
    • listing_sku (string, optional, max 255) — the listing's SKU on the channel; used to suggest the base product.
    • sales_channel_listing_id (string, optional, max 255) — the listing's ID on the channel (for Shopify, the variant ID); used to count the configured SKUs it was sold as.

Response: data is a list of warning objects, in the order of the flagged mappings.

Warning object (code is always mapped_to_configured_product):

  • listing_id — the listing's ID, or null for a variant that has no listing yet.
  • listing_sku — the listing's own SKU on the channel.
  • sales_channel_listing_id — the listing's ID on the channel (for Shopify, the variant ID).
  • product — {id, sku, name} of the configured product the listing is (or would be) mapped to.
  • configured_skus — the configured SKUs on this channel that resolve to that product.
  • sold_configured_count — how many distinct configured SKUs this listing has been sold as.
  • suggested_base_product — {id, sku, name} of the likely base product, from this listing's own history: the base product of the configured SKUs sold as this listing when they all agree on one, else the product whose SKU equals the listing's SKU (also the tie-breaker when that history names several bases). Null when the evidence is missing or ambiguous; pick the base product yourself then.
  • message — a sentence explaining the risk, ready to show to a person.

Returns 422 on validation errors and 404 while line options are switched off.

Request​

Responses​

OK

Response Headers
    Content-Type