Skip to main content
POST
Add product substitution

Authorizations

Authorization
string
header
required

Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.

Path Parameters

productId
integer
required

ID of the product receiving the substitute

Body

application/json
substitute_product_id
integer
required

ID of the product to add as a substitute for the primary product

priority
integer | null

Optional ordering hint. Lower numbers indicate higher priority (tried first). If omitted (or null), the substitute is appended after the product's existing substitutes (priority = current highest priority + 1, starting at 1).

Response

Substitution created

id
integer

Substitution row ID. Use this with the DELETE endpoint to remove the substitution.

priority
integer | null

Ordering hint — lower numbers are tried first when looking for a substitute.

product
object

Embedded substitute product. Always present on responses from the substitutions endpoints (the substitute product is eager-loaded server-side).