{"openapi":"3.1.0","info":{"title":"DELETE /api/v1/inventory/products/variants/{id}","version":"1.0.0","description":"Delete product variant"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/inventory/products/variants/{id}":{"delete":{"tags":["inventory:products"],"summary":"Delete product variant","description":"Archive a variant (default), or permanently delete it with `permanent=true`. Permanent deletion is rejected when the variant has linked inventory, order, shipment, transfer, or count records.","operationId":"delete_variant_api_v1_inventory_products_variants__id__delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}},{"name":"permanent","in":"query","required":false,"schema":{"type":"boolean","description":"Permanently delete instead of archiving. Only allowed when the variant has no linked records.","default":false,"title":"Permanent"},"description":"Permanently delete instead of archiving. Only allowed when the variant has no linked records."},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__core__success__MessageResponse"}}}},"400":{"description":"Bad Request - Invalid input","content":{"application/json":{"example":{"detail":"Invalid request parameters"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"detail":"Resource not found"}}}},"422":{"description":"Validation Error - Invalid data format","content":{"application/json":{"example":{"detail":[{"loc":["body","field"],"msg":"field required","type":"value_error.missing"}]}}}}}}}},"components":{"schemas":{"app__core__success__MessageResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},"additionalProperties":true,"type":"object","title":"MessageResponse","description":"Envelope for data-less mutations: ``{success, message, code}``, no ``data``.\n\nCanonical ``response_model`` for deletes and other message-only mutations so\nthe generated TypeScript client gets a single, named ``MessageResponse`` type\ninstead of dozens of empty per-route stubs. Pairs with the\n``SuccessResponse.*`` builders (which already emit this exact shape)."}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}