Soft-delete a variant
DELETE
/v1/tenants/{tenantId}/items/{itemId}/variants/{variantId}
const url = 'https://api.emite.cr/v1/tenants/example/items/example/variants/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.emite.cr/v1/tenants/example/items/example/variants/example \ --header 'Authorization: Bearer <token>'Deletes the variant and its prices. If it was the default variant, the first remaining ACTIVE variant (by sortOrder) becomes the default; when there is none, the deletion is refused with 422 — to remove the whole item use DELETE /:itemId instead.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”tenantId
required
string
Tenant UUID.
itemId
required
string
Item UUID.
variantId
required
string
Variant UUID.
Responses
Section titled “Responses”Variant soft-deleted.
Missing or invalid JWT / API key
Tenant boundary violation or insufficient scope.
Variant not found.
The variant is the default and no other active variant can take its place.