Skip to main content

Create Product Substitution

POST 

/api/products/:productId/substitutions

Create a substitution rule: the route product is the original, the payload names the substitute.

Authentication: Requires Bearer token.

Validation rejects self-substitution, duplicate pairs, non-stock-tracked substitutes, and always rules that would close an automatic swap loop. create_reverse also creates the independent reverse rule (substitute → original) with the same mode.

A non-blocking warning is returned when the pair mixes a serialised and a non-serialised product.

Request

Responses

OK

Response Headers
    Content-Type