Skip to content

Set SKU-specific inventory batch settings

Request

Creates or updates SKU-specific inventory batch settings.

Security
BearerAuth
Path
sku_idinteger, (int64)required

SKU ID

Bodyapplication/json
batch_prioritystring
Enum:"first_expired_first_out""first_produced_first_out"
b2c_shelf_life_in_weeksinteger or null
b2b_shelf_life_in_weeksinteger or null
ito_shelf_life_in_weeksinteger or null
kit_shelf_life_in_weeksinteger or null
curl -i -X PUT \
  'https://hive-merchant-api.redocly.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
  }'

Responses

SKU-specific inventory batch settings

Bodyapplication/json
idinteger, (int64)required

Unique identifier

batch_prioritystringrequired

Priority strategy for batch selection

Enum:"first_expired_first_out""first_produced_first_out"
b2c_shelf_life_in_weeksinteger or nullrequired

Minimum remaining shelf life in weeks for B2C orders

b2b_shelf_life_in_weeksinteger or nullrequired

Minimum remaining shelf life in weeks for B2B orders

ito_shelf_life_in_weeksinteger or nullrequired

Minimum remaining shelf life in weeks for inventory transfer orders

kit_shelf_life_in_weeksinteger or nullrequired

Minimum remaining shelf life in weeks for kitting

is_merchant_defaultbooleanrequired

Whether this is the merchant's default settings (true) or SKU-specific (false)

sku_idinteger or null, (int64)required

SKU ID if this is a SKU-specific setting, null for merchant default

Response
{ "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 }