Blocks an inventory batch, preventing its stock from being used for fulfillment. This is typically used when there are quality issues with a specific batch.
Security
BearerAuth
- Mock serverhttps://developers.hive.app/_mock/merchant-api-v2/mapi_v2_oas31/skus/{sku_id}/inventory_batches/{id}/block
- Production APIhttps://app.hive.app/merchant_api/v2/skus/{sku_id}/inventory_batches/{id}/block
- Staging APIhttps://staging.app.hive.app/merchant_api/v2/skus/{sku_id}/inventory_batches/{id}/block
curl -i -X POST \
'https://developers.hive.app/_mock/merchant-api-v2/mapi_v2_oas31/skus/{sku_id}/inventory_batches/{id}/block' \
-H 'Authorization: Bearer <YOUR_token_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"user_email": "warehouse-manager@merchant.com",
"notes": "Quality issue detected during inspection"
}'Inventory batch blocked successfully
Why this batch is blocked: expiry_window when Hive blocked it because its expiry date came within the merchant's window, expiry_date_reached when that date has passed. null when the batch is not blocked, when the block did not come from expiry handling at all, when it was created before Hive recorded a reason, or until the batch expiry handling feature is rolled out to the account.
Enum:"expiry_date_reached""expiry_window"null
Response
{ "block_reason": null, "blocked": false, "expiry_date": "2024-12-31", "id": 1, "lot_number": "LOT-001", "name": "Batch-001", "production_date": "2024-01-15", "status": "active", "tracking_code": "BATCH-TRACK-001" }