Retire a variant (a product keeps at least one)
Retires one variant. A product keeps at least one live variant, so archiving the last one is refused invalid_request (400) — archive the product instead.
/v1/clients/{clientId}/offerings/{offeringId}/variants/{variantId}/archiveRetires one variant. A product keeps at least one live variant, so archiving the last one is refused invalid_request (400) — archive the product instead. Needs authority over the client — membership of its organization, an API key bound to this client, or tenant staff holding clients:manage; anything else is refused not_client_member or insufficient_scope (403), and an unknown client client_not_found (404). Refuses invalid_transition (409) when it is already archived and conflict (409) while open orders still hold units of it in reserve.
Authorization
bearerAuth A tenant API key (sk_{env}_{id}_{secret}), a wallet user token, or an IdP access token. Which principal the credential resolves to decides the scopes it carries; see the authentication guide.
In: header
Path Parameters
uuiduuiduuidResponse Body
application/json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/v1/clients/497f6eca-6276-4993-bfeb-53cbbbba6f08/offerings/497f6eca-6276-4993-bfeb-53cbbbba6f08/variants/497f6eca-6276-4993-bfeb-53cbbbba6f08/archive"{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "offering_id": "a7d124b6-6a8c-44d1-9d46-4636e3f8c04e", "sku": "string", "barcode": "string", "option_values": [ "string" ], "position": 0, "pricing_mode": "manual", "cost_amount": 0, "markup": { "kind": "percent", "value": 0 }, "amount": 0, "image_url": "string", "inventory": { "track_inventory": true, "in_stock": true, "low_stock": true, "on_hand": 0, "reserved": 0, "available": 0, "allow_backorder": true, "low_stock_threshold": 0 }, "status": "active", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Edit a variant; a price change is recorded in history
Edits one variant. A price change is written to the client's price history with the actor that made it, so a shopper's disputed price can be explained later.
Change a tracked variant's on-hand count, with a reason
Changes a tracked variant's on-hand count, either by delta or to an absolute set_to, with a reason, and answers with the variant and the movement row it wrote.