Product Substitutions
List Product Substitutions
Paginated list of all substitution rules.
List Substitutions for a Product
Both substitution directions for one product: rules where it can be replaced by a substitute, and rules where it is the substitute for another product. Includes live availability for each substitute and whether the product is always substituted (a pure sales alias).
Create Product Substitution
Create a substitution rule: the route product is the original, the payload names the substitute.
Update Product Substitution
Update a substitution rule's mode, flags, priority, active state, or notes.
Delete Product Substitution
Delete a substitution rule. Lines already swapped under this rule keep their swap provenance.
Reorder Product Substitutions
Rewrite the priority order of substitution rules for one original product. Pass the rule IDs in the desired order — the first ID becomes priority 1.
Download Substitution Import Template
Download the Excel (XLSX) import template. The workbook has three sheets: 'Import Here' (headers + sample rows; green headers are required), 'Field Guide' (per-column description, valid values, and an example), and 'Reference Data' (the valid mode values, accepted yes/no tokens, and your existing rules).
Validate Substitution Import Rows
Validate mapped import rows and return a per-row annotated preview — no side effects, safe to call repeatedly.
Import Product Substitutions
Execute the import. Files up to 500 rows run inline and return the summary directly; larger files run as a background job (202 response with a job ID to track).
Export Product Substitutions
Export substitution rules as XLSX (default) or CSV. Columns: product_sku, substitute_sku, mode, allow_backorder_swap, include_in_alias_availability, priority, notes, active — the same columns the import accepts, so an export can be edited and re-imported.