Variants
Create a variant
Adds a variant to the product.
Authorization
bearer catalogue:writeAuthorizationBearer <token>
A v1 API key; the scope named is the one the route needs.
In: header
Scope: catalogue:write
Path Parameters
productId*string
Match
^[A-Za-z0-9_-]{1,64}$Length
1 <= length <= 64Header Parameters
Idempotency-Key*string
Names the act so a retry under it lands on the stored answer (idempotency-key).
Length
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X POST "https://example.com/v1/products/string/variants" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "id": "string", "liveMode": true, "productId": "string", "name": "string", "description": "string", "externalId": "string", "features": [ { "value": "string" } ], "coverImageKey": "string", "coverImageUrl": "http://example.com", "archivedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}Reorder variants POST
Sets the order of the product’s variants. Name every live variant once, each with its `expectedUpdatedAt`.
Update a variant PATCH
Changes the fields sent and leaves the rest. Send `expectedUpdatedAt` as the `updatedAt` you last read; a row changed since is refused with `STALE_WRITE` and the current row.