Skip to main content

Validate Substitution Import Rows

POST 

/api/product-substitutions/import/validate

Validate mapped import rows and return a per-row annotated preview — no side effects, safe to call repeatedly.

Required scope: products:write

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

Authentication: Requires Bearer token.

Each row is marked create (new pair), update (pair exists — fields will be updated), or error (with a reason). The mode column accepts friendly synonyms case-insensitively: "manual", "manual only", "out of stock", "if out of stock", "always".

The optional substitution_type column accepts "direct", "direct equivalent", "equivalent", "identical", "replacement", "functional replacement", "functional", "alternative" (case-insensitive); an unrecognised value fails the row. Left blank it defaults a NEW rule to direct and leaves an existing rule's classification untouched, so re-uploading a file that predates the column never silently reclassifies a replacement as a direct equivalent.

Request

Responses

OK

Response Headers
    Content-Type