Skip to main content

Map Single Product to SKU.io Product

POST 

//:domain/api/amazon/:integrationInstance/products/:product/map

Per-row mapping endpoint used by the unified products mapping modal (Faire/Shopify parity). Maps a single Amazon product to either an existing SKU.io product (product_id) or a subscription offering (subscription_offering_id).

Body (one of, required):

  • product_id (int, required_without:subscription_offering_id, must exist in products) — link to a SKU.io product.
  • subscription_offering_id (int, required_without:product_id, must exist in subscription_offerings) — link to a subscription offering.

Behavior:

  • If the Amazon product is already mapped (productListing exists), the existing row is updated in place — supports the Remap flow.
  • Otherwise a new ProductListing row is created with sales_channel_id = the instance's sales channel, listing_sku = seller_sku, document_type = AmazonProduct::class.
  • After mapping, any unmapped SalesOrderLine rows matching this listing are dispatched to GenerateMapSalesOrderLinesToSalesChannelProductsJobsJob so back-fill happens automatically.

Returns HTTP 201 with the refreshed AmazonProductResource.

Named route: amazon.products.map (single).

Request

Responses

Created

Response Headers
    Content-Type