Skip to content
Bloomcount API
Esc
navigateopen⌘Jpreview

Delete a variant

Deletes one variant, its prices, and every event line that used it. The variant must belong to the product in the path, so a caller cannot reach another product’s variant through this URL (404 variant_not_on_product).

Refuses with 409 variant_on_event_items:<count> while the variant is on an event; ?force=true deletes it and its lines.

DELETE/api/v1/products/{id}/variants/{variantId}
Authorization
AuthorizationBearer token (bloomcount_...) · headerrequired
Path parameters
idstringrequired
variantIdstringrequired
Query parameters
forceboolean
Delete even when the cascade reaches beyond this resource.
default: false
Responses
200Deleted, with a count of everything the cascade took.
deletedbooleanrequired
priceEntriesDeletedintegerrequired
Prices removed across every list that carried one for this variant.
eventItemsDeletedintegerrequired
Event lines removed. Non-zero only on a forced delete.
401Missing or invalid API key, or revoked / expired.
errorstringrequired
403Authenticated, but the key lacks the required scope or the tenant has no API access.
errorstringrequired
404The requested resource doesn't exist or belongs to a different tenant.
errorstringrequired
409The resource is still referenced, and deleting it would take other rows with it. The error names what and how many, for example price_list_in_use:3. Retry with force=true to delete anyway.
errorstringrequired
422Request body or arguments failed validation.
errorstringrequired
429Per-minute rate limit (60/min) or per-month cap exceeded.
errorstringrequired
Try it
Server
Authorization
Parameters
Request
curl -X DELETE "https://app.bloomcount.com/api/v1/products/prod_h71eaa8d4mr3vk2qz9pn5wf/variants/var_h299x7tcqe8rnv4mz12k6yp" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "deleted": true,
  "priceEntriesDeleted": 2,
  "eventItemsDeleted": 0
}