PUT
Change status of variants
Company space For: Manager · Permission: products.update Conditions
  • The permission products.update on the product of the variants is needed.
  • stockable_ids must be unique 27-character identifiers of product variants of the organization, and they must all belong to the same product; otherwise the call is refused with a validation error.
  • The status must be active, draft or archived.
What else happens
  • Sets the status of every listed variant, all together.
  • The status_counts of the product are computed when it is rendered, so they reflect the new statuses without being stored.
Part of Create products and variants.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
status
enum<string>
required

New status for every listed variant: active, draft or archived. Required.

Available options:
active,
draft,
archived
stockable_ids
string[]
required

Identifiers of the items (27-character KSUID strings, no duplicates) of product variants to update. Required, at least one; all must belong to the same product of the organization.

Minimum array length: 1
Required string length: 27

Response

detail
string
required

Confirmation message, 'Status updated successfully.' (translated to the request language).