Skip to main content

Bulk Use Base Product for Configurable Products

POST 

/api/configurable-products/bulk-use-base-product

Run Use Base Product for several configured SKUs at once. A configured SKU with no base product recorded, an archived base product, or that no longer exists is skipped with the reason; one that raises an error is reported as failed and the rest carry on.

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 permission to create products.

Body:

  • ids (array of integers, required, 1 to 2,000, distinct) — configured SKU (mapping) IDs.

Up to 25 IDs run now and return 200 with the outcome:

  • summary — one line, e.g. "2 configured SKUs use the base product, 3 waiting lines linked; 1 skipped."
  • rows_processed, rows_used_base, rows_skipped, rows_failed — configured SKUs by outcome.
  • waiting_lines_linked — waiting order lines queued to link to their base product.
  • has_failures, failed_count.
  • errors / warnings — [{message}], one per failed and per skipped configured SKU.
  • results[] — per configured SKU: id, outcome (used_base | skipped | failed), configured_sku, product_id (the base product), message (why it was skipped or failed), relinked_lines.

More than 25 IDs run in the background and return 202 with tracked_job_id and data.tracked_job_log_id. The job's results hold the same fields once it completes.

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

Request​

Responses​

OK

Response Headers
    Content-Type