Skip to content

Inventory Batches

Operations related to inventory batches (lot/batch tracking)

Create an inventory batch for a SKU

Request

Creates a new inventory batch for the specified SKU. Merchants can use this to create batches before announcing restocking shipments.

Security
BearerAuth
Path
sku_idinteger, (int64)required

SKU ID

Bodyapplication/jsonrequired
lot_numberstring or null

Lot number for the batch

production_datestring or null, (date)

Production date of the batch (ISO8601 date)

expiry_datestring or null, (date)

Expiration date of the batch (ISO8601 date)

curl -i -X POST \
  'https://developers.hive.app/_mock/merchant-api-v2/mapi_v2_oas31/skus/{sku_id}/inventory_batches' \
  -H 'Authorization: Bearer <YOUR_token_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "lot_number": "LOT-2024-001",
    "production_date": "2024-01-15",
    "expiry_date": "2025-12-31"
  }'

Responses

Inventory batch created successfully

Bodyapplication/json
block_reasonstring or nullrequired

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
blockedbooleanrequired

Whether this batch has pending blocking issues that prevent fulfillment

expiry_datestring or null, (date)required

Expiration date of the batch (ISO8601 date, read-only)

idintegerrequired

Hive unique ID for the batch (read-only)

lot_numberstring or nullrequired

Lot number for the batch (read-only)

production_datestring or null, (date)required

Production date of the batch (ISO8601 date, read-only)

statusstringrequired

Status of the batch (active or archived)

Enum:"active""archived"
namestringdeprecated

Name of the batch (read-only)

tracking_codestring or nulldeprecated

Tracking code (read-only)

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