Products

Archive variant

Archives a sellable unit without deleting its history.

DELETE
/v1/products/{productId}/variants/{variantId}

This endpoint retires a sellable combination from future use while preserving its SKU, movements, historical balance, and audit trail. It does not delete the Product or change its other Variants.

The Variant cannot be archived while it is bound to any Listing. That includes active, draft, and imported ads. List each affected listing's bindings and send the intended complete set to replace them; only then archive.

If your intent is only to bring quantity to zero, record an adjustment movement. Archiving is a lifecycle change, not an inventory movement.

Common errors

  • 409 CONFLICT with details.reason = "variant_in_kit": the Variant is a component of an active kit. Remove it from the kit (PUT /v1/products/{id}/components) first.

Authorization

api_key
headerAuthorizationBearer <token>

API key (mk_...)

Path Parameters

productId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
variantId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

The variant was archived.

curl -X DELETE "https://example.com/v1/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/variants/497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty