- Data Factory
- Lose Inventory
Data Factory
Lose Inventory
Simulate inventory loss by moving units to lost status (Sandbox only)
POST
/data_factory/loseInventory
curl --request POST \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/data_factory/loseInventory \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"sku_id": "<string>",
"quantity": 123
}'
curl --request POST \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/data_factory/loseInventory \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"sku_id": "<string>",
"quantity": 123
}'Simulate inventory loss by decrementing available inventory and incrementing lost status for testing.
DataFactory is only available in the sandbox environment.
Request Body
sku_id
required
string
MasonHub SKU UUID to lose inventory for.
quantity
required
integer
Quantity of units to move from available to lost status.
curl -X POST "https://app.masonhub.co/{account}/api/v1/data_factory/loseInventory" \
-H "Authorization: Bearer your_jwt_token" \
-H "Content-Type: application/json" \
-d '[{"sku_id": "e5d00ff6-b34a-496e-9559-eb90e99463af", "quantity": 10}]'
{
"success": true,
"data": [{"sku_id": "e5d00ff6-b34a-496e-9559-eb90e99463af", "quantity_lost": 10}]
}
Use Cases
Test inventory discrepancy handling, shortage scenarios, and callback processing.
curl -X POST "https://app.masonhub.co/{account}/api/v1/data_factory/loseInventory" \
-H "Authorization: Bearer your_jwt_token" \
-H "Content-Type: application/json" \
-d '[{"sku_id": "e5d00ff6-b34a-496e-9559-eb90e99463af", "quantity": 10}]'
curl --request POST \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/data_factory/loseInventory \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"sku_id": "<string>",
"quantity": 123
}'
curl --request POST \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/data_factory/loseInventory \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"sku_id": "<string>",
"quantity": 123
}'{
"success": true,
"data": [{"sku_id": "e5d00ff6-b34a-496e-9559-eb90e99463af", "quantity_lost": 10}]
}