Variants

Reorder variants

Sets the order of the product’s variants. Name every live variant once, each with its `expectedUpdatedAt`.

Authorization

bearer catalogue:write
AuthorizationBearer <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}$
Length1 <= length <= 64

Header Parameters

Idempotency-Key?string

Names the act so a retry under it lands on the stored answer (idempotency-key).

Length1 <= length <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

POST
/v1/products/{productId}/reorder-variants
curl -X POST "https://example.com/v1/products/string/reorder-variants" \  -H "Content-Type: application/json" \  -d '{    "order": [      {        "variantId": "d53feca7-c65b-4741-aca7-827a42d686bf",        "expectedUpdatedAt": "2019-08-24T14:15:22Z"      }    ]  }'
{  "data": [    {      "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"    }  ],  "nextCursor": "string"}