Delete Inventory Variant
delete
https://api.flxpoint.com/inventory/variant/{variantId}Use this when you want to delete inventory data through the API.
🔑 X-API-TOKEN⏱ 2 req/sToken: Account · Source · Channel
This page explains the endpoint. To send a live test request, use the interactive tester in Stoplight or your own Postman / HTTP client.
Endpoint to delete inventory variants.
Request
Query parameters
deleteParentIfLastVariantquerybooleanDelete the parent product if the variant being deleted is the last variant. Default `True`
Example request
delete
/inventory/variant/{variantId}curl -X DELETE "https://api.flxpoint.com/inventory/variant/{variantId}" \
-H "Accept: application/json" \
-H "X-API-TOKEN: YOUR_TOKEN"Responses
200OKapplication/json
numberOfInventoryVariantsDeletedintegerdefault
0numberOfInventoryParentsDeletedintegerdefault
0Example response
{
"numberOfInventoryVariantsDeleted": 0,
"numberOfInventoryParentsDeleted": 0
}401Unauthorized
No schema documented for this status.
404Not Found
No schema documented for this status.
409Inventory variant is linked to product variant.
No schema documented for this status.
OpenAPI fragment
{
"delete": {
"summary": "Delete Inventory Variant",
"description": "Endpoint to delete inventory variants.",
"parameters": [
{
"schema": {
"type": "boolean",
"default": true
},
"in": "query",
"name": "deleteParentIfLastVariant",
"description": "Delete the parent product if the variant being deleted is the last variant. Default `True`"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteInventoryResponse"
}
}
}
},
"401": {
"description": "Unauthorized"
},
"404": {
"description": "Not Found"
},
"409": {
"description": "Inventory variant is linked to product variant."
}
}
}
}Ready to run it? Send the curl from your terminal or Postman, or use the interactive tester in Stoplight.Open in Stoplight