Skip to main content

Resolve Draft Categories

POST 

/api/v2/listing-drafts/resolve-categories

Resolve the channel category for up to 500 products on one sales channel in a single call, before creating drafts in bulk: the product's own override on the channel first, else the category its product type is mapped to — with provenance and the category's default template per product. Nothing is created. A product that resolves to nothing comes back with sales_channel_category and provenance null; pick a category for it (or map its type) before publishing.

Required scope: products:write

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

Authentication: Requires Bearer token.

Fields:

  • sales_channel_id (required, integer)
  • product_ids (required, array of integers, 1–500)

Each resolution carries:

  • product_id, sales_channel_id
  • sales_channel_category{id, name, path, external_id, is_leaf}, or null when nothing resolved
  • provenanceoverride (the product's own override on the channel) or type_map (its product type's map row on the channel); null when nothing resolved
  • product_type{id, name, path} of the type the product resolves under (a variant with no type of its own uses its parent's), or null
  • template{id, name, is_default}: the template pinned by the override, else the resolved category's default template; null when there is none
  • override{id, sales_channel_category_id, sales_channel_product_template_id, created_at} when an override is set, else null
  • type_map_category — set only while an override is in force AND the type map points at a different category, so the difference can be shown; otherwise null

Pass each product's sales_channel_category.id, template.id and provenance on to Create Drafts in Bulk as products[].sales_channel_category_id, products[].sales_channel_product_template_id and products[].category_provenance.

Requires permission: listings.create

Read-only resolution: requires the listings read permission (not create).

Request

Responses

OK

Response Headers
    Content-Type