Creates or updates SKU-specific inventory batch settings.
For merchants enrolled in expiry handling, a write that sets action_weeks_before_expiry or expiry_follow_up_action to a new value also turns batch tracking on for the SKU, since expiry handling only applies to a batch-tracked SKU. Clearing a value, re-sending one the settings already hold, and writing neither field all leave batch tracking as it is, whether the settings are being created or edited. When the merchant does not have batch tracking, a write that would turn it on is rejected with 422 and nothing is saved.
Weeks before expiry at which the batch is taken out of circulation. Null clears the value.
What happens to a batch once it has expired. null makes this SKU inherit the merchant default's action; the resolved value is on the SKU's effective_inventory_batch_settings. Omit it to keep the stored value.
- Mock serverhttps://developers.hive.app/_mock/merchant-api-v2/mapi_v2_oas31/skus/{sku_id}/inventory_batch_settings
- Production APIhttps://app.hive.app/merchant_api/v2/skus/{sku_id}/inventory_batch_settings
- Staging APIhttps://staging.app.hive.app/merchant_api/v2/skus/{sku_id}/inventory_batch_settings
curl -i -X PUT \
'https://developers.hive.app/_mock/merchant-api-v2/mapi_v2_oas31/skus/{sku_id}/inventory_batch_settings' \
-H 'Authorization: Bearer <YOUR_token_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"batch_priority": "first_expired_first_out",
"b2c_shelf_life_in_weeks": 0,
"b2b_shelf_life_in_weeks": 0,
"ito_shelf_life_in_weeks": 0,
"kit_shelf_life_in_weeks": 0,
"action_weeks_before_expiry": 0,
"expiry_follow_up_action": "block_only"
}'SKU-specific inventory batch settings
Priority strategy for batch selection
Minimum remaining shelf life in weeks for inventory transfer orders
Whether this is the merchant's default settings (true) or SKU-specific (false)
SKU ID if this is a SKU-specific setting, null for merchant default
How many weeks before a batch's expiry date its stock is taken out of circulation, as stored on this settings record. Hive resolves the window it actually applies one field at a time: the SKU's own value, else the merchant default's value, else Hive's own default. So a null here means only that this record sets no value — on a SKU-specific record (is_merchant_default: false) the merchant default may still supply one, and only on the merchant default record does null mean Hive's own default applies. Always null until the batch expiry handling feature is rolled out to the account.
What happens to a batch once it has expired: block it only, dispose of it, or send it back to the merchant. The value as stored on this settings record, not resolved through the merchant default. On a SKU-specific record (is_merchant_default: false) null means the SKU inherits the merchant default's action; the merchant default record always carries one. Also null until the batch expiry handling feature is rolled out to the account.
{ "id": 0, "batch_priority": "first_expired_first_out", "b2c_shelf_life_in_weeks": 0, "b2b_shelf_life_in_weeks": 0, "ito_shelf_life_in_weeks": 0, "kit_shelf_life_in_weeks": 0, "is_merchant_default": true, "sku_id": 0, "action_weeks_before_expiry": 0, "expiry_follow_up_action": "block_only" }