Operations related to inventory
Merchant API v2 (2.0.0)
The Merchant API v2 provides programmatic access to merchant data across all their sales channels.
This version shifts from sales channel-scoped access to merchant-scoped access, allowing access to data across all sales channels owned by a single merchant.
The access tokens remain the same as in v1, but now they provide access to all sales channels.
All endpoints are rate limited to 100 requests per minute per merchant. The following headers are included in every response:
X-Rate-Limit-Used: The number of requests used in the current minute.X-Rate-Limit-Max: The maximum number of requests allowed per minute (100). If the limit is exceeded, a 429 Too Many Requests response is returned.
v1 of the Merchant API will remain available as long as clients use it, but new features and improvements will only be added to v2. We recommend all new integrations use v2.
All list endpoints use cursor-based pagination. The pagination.next_page_url field in the response indicates the next page. If null, there are no more results. Use the limit query parameter to control page size. See each endpoint's response schema for details.
Hive sends webhook notifications to inform you about important events in your merchant account. Configure webhook endpoints in your merchant dashboard. See the webhooks section below for available webhook events and their payloads.
Hive signs all webhook requests with an x-hive-signature header to prevent malicious actors from sending invalid requests. This header contains a hex-encoded HMAC-SHA256 digest of the request body, using your API token as the key. Requests without this header or with invalid signatures should be ignored.
Ruby signature validation example:
def request_valid?(req)
return false if !req.post?
request_sig = req.get_header("x-hive-signature")
expected_sig = OpenSSL::HMAC.hexdigest("sha256", ENV["API_TOKEN"], req.body)
Rack::Utils.secure_compare(request_sig, expected_sig)
endWebhook URLs should be idempotent as Hive cannot guarantee the order of calls or retry attempts for the same event. What this means in practice, is that you should check the timestamp of the object in the payload. Ignore payloads with a timestamp older than the last update you saved. Only process the webhook if the updated timestamp is newer than the one you have on file.
The preferred carrier to use for delivering this order
When the order was created. Will default to current time if omitted.
3-letter ISO 4217 currency code. Examples: EUR, USD, GBP, JPY
The order number which your customer sees. In case this is not the same as merchant_order_id.
When the order was originally created/placed by the customer. This can be different from created_at when doing bulk imports or when there's a delay between order placement and API submission.
Financial status of this order. Possible values:
- failed: Payment failed
- paid: Payment completed successfully
- pending: Payment is pending
- refunded: Payment has been refunded
List of items in the order (see OrderItem)
Identifier for the line item. Needs to be unique among the line items of the order.
The discounted price per unit of this item
An ID that uniquely identifies this order within the sales channel. Must be unique per sales channel.
2-letter ISO 3166-1 country code. Examples: DE, US, FR, NL
Customer's first name - required if last_name and full_name are omitted
Customer's full name - required if first_name and last_name are omitted
Customer's last name - required if first_name and full_name are omitted
Parcel point ID - see Sendcloud service points
State or province code. For US addresses, this should be the 2-letter state code (e.g., CA, NY, TX). For other countries, this should be the appropriate province/state/region code. Examples: CA (California), NY (New York), ON (Ontario), BE (Berlin)
Current fulfillment status of the order within Hive's fulfillment process. This tracks the order's progress from confirmation through delivery. Possible values:
- waiting_for_picking: Order is confirmed and waiting to be picked in the fulfillment center
- processing: Order is actively being processed (picked/packed) in the fulfillment center
- partially_shipped: Some items from the order have been shipped, but others are still pending
- shipped: All items from the order have been shipped
- on_hold: Order is temporarily paused (e.g., payment issues, merchant request)
- payment_pending: Order is waiting for payment confirmation
- cancelled: Order has been cancelled
- ignored: Order will not be fulfilled (automatically set based on external conditions)
Note: This field is read-only and managed entirely by Hive based on the fulfillment process.
Net refunds in cents (total refunded minus taxes)
Net revenue in cents (amount paid minus taxes)
- Mock serverhttps://hive-merchant-api.redocly.app/_mock/merchant-api-v2/mapi_v2_oas31/order.status_updated
- Production APIhttps://app.hive.app/merchant_api/v2/order.status_updated
- Staging APIhttps://staging.app.hive.app/merchant_api/v2/order.status_updated
{ "event_type": "order.status_updated", "event_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2023-10-01T12:00:00Z", "data": { "id": 123456, "merchant_order_id": "ORD-1001", "sales_channel_id": 10, "fulfillment_status": "shipped", "financial_status": "paid", "created_at": "2023-10-01T12:00:00Z", "currency": "EUR", "total_price_in_cents": 3000, "total_net_refunds_in_cents": 0, "total_net_revenue_in_cents": 2430, "total_tax_in_cents": 570, "total_tax_refunds_in_cents": 0, "carrier_preference": "DHL", "updated_at": "2023-10-01T14:30:00Z", "items": [ … ], "shipping_address": { … } } }
The type of webhook event
Delivery status of the shipment. Possible values:
- action_required: Unconventional event (e.g. failed delivery, lost shipment, address issues)
- awaiting_customer_pickup: Package is ready for customer pickup
- delivered: Successfully delivered
- in_transit: On the way to carrier hub
- information_transmitted: Information sent to carrier (shipped but no carrier updates yet)
- other: Unknown or other delivery status
- out_for_delivery: Left carrier hub, being delivered
- return_initiated: Return process has been initiated
- returned_to_sender: Carrier initiated return to sender
Which line items this shipment includes
The order line item identifier as provided by the merchant. Will be null for items added later (e.g. via add-on rules).
Which serial numbers were sent for this line item
The ID of the sales channel this shipment belongs to
Status of the shipment. Possible values:
- cancelled: Shipment cancelled and will not be fulfilled
- in_packing: Packing process started
- in_picking: Picking process started
- in_shipping: Shipping process started
- on_hold: On hold (e.g. future fulfillment, address issues, insufficient inventory)
- packed: Items packed and ready for shipping
- picked: Items picked and ready for packing
- picking_assigned: Employee assigned to pick items
- shipped: Shipping label created and left packing station
- waiting_for_picking: Initial status, awaiting picking
- Mock serverhttps://hive-merchant-api.redocly.app/_mock/merchant-api-v2/mapi_v2_oas31/shipment.status_updated
- Production APIhttps://app.hive.app/merchant_api/v2/shipment.status_updated
- Staging APIhttps://staging.app.hive.app/merchant_api/v2/shipment.status_updated
{ "event_type": "shipment.status_updated", "event_id": "123e4567-e89b-12d3-a456-426614174001", "timestamp": "2023-10-01T15:00:00Z", "data": { "id": 789012, "order_id": 123456, "sales_channel_id": 10, "status": "shipped", "items": [ … ] } }
The type of webhook event
Delivery status of the shipment. Possible values:
- action_required: Unconventional event (e.g. failed delivery, lost shipment, address issues)
- awaiting_customer_pickup: Package is ready for customer pickup
- delivered: Successfully delivered
- in_transit: On the way to carrier hub
- information_transmitted: Information sent to carrier (shipped but no carrier updates yet)
- other: Unknown or other delivery status
- out_for_delivery: Left carrier hub, being delivered
- return_initiated: Return process has been initiated
- returned_to_sender: Carrier initiated return to sender
Which line items this shipment includes
The order line item identifier as provided by the merchant. Will be null for items added later (e.g. via add-on rules).
Which serial numbers were sent for this line item
The ID of the sales channel this shipment belongs to
Status of the shipment. Possible values:
- cancelled: Shipment cancelled and will not be fulfilled
- in_packing: Packing process started
- in_picking: Picking process started
- in_shipping: Shipping process started
- on_hold: On hold (e.g. future fulfillment, address issues, insufficient inventory)
- packed: Items packed and ready for shipping
- picked: Items picked and ready for packing
- picking_assigned: Employee assigned to pick items
- shipped: Shipping label created and left packing station
- waiting_for_picking: Initial status, awaiting picking
- Mock serverhttps://hive-merchant-api.redocly.app/_mock/merchant-api-v2/mapi_v2_oas31/shipment.delivery_status_updated
- Production APIhttps://app.hive.app/merchant_api/v2/shipment.delivery_status_updated
- Staging APIhttps://staging.app.hive.app/merchant_api/v2/shipment.delivery_status_updated
{ "event_type": "shipment.status_updated", "event_id": "123e4567-e89b-12d3-a456-426614174001", "timestamp": "2023-10-01T15:00:00Z", "data": { "id": 789012, "order_id": 123456, "sales_channel_id": 10, "status": "shipped", "items": [ … ] } }
Delivery option for the restocking shipment. Possible values:
- courier: Delivered by courier service
- dropoff: Dropped off at designated location
- hive_freight: Delivered using Hive freight service
- postal: Delivered via postal service
A list of items in the shipment. See RestockingShipmentItem.
Quantity of this item in the shipment
Arrived quantity of this item (after shipment is received)
Damaged quantity of this item (after shipment is received)
Missing quantity of this item (after shipment is received)
The merchant's SKU identifier - required if sku_id is not provided
Hive SKU identifier - required if sku_code is not provided
Restocking shipment status. Possible values:
- arrived: Hive completed the arrival documentation, checked packing slip, picture of shipment and documents are uploaded
- cancelled: the restocking shipment is cancelled by merchant
- created: the restocking shipment is created and not yet shipped
- processing: the restocking shipment is getting unpacked and its items are getting restocked into storage boxes and pallets
- received: the restocking shipment is delivered to the fulfillment center, but its content is not verified yet
- restocked: the restocking shipment is fully processed in the fulfillment center and its items are completely restocked
- shipped: initial status meaning that restocking shipment is on the way
- Mock serverhttps://hive-merchant-api.redocly.app/_mock/merchant-api-v2/mapi_v2_oas31/restocking_shipment.status_updated
- Production APIhttps://app.hive.app/merchant_api/v2/restocking_shipment.status_updated
- Staging APIhttps://staging.app.hive.app/merchant_api/v2/restocking_shipment.status_updated
{ "event_type": "restocking_shipment.status_updated", "event_id": "123e4567-e89b-12d3-a456-426614174003", "timestamp": "2023-10-01T16:00:00Z", "data": { "id": 98765, "status": "arrived", "warehouse_id": 2, "restocking_shipment_items": [ … ] } }
List of items announced by the customer (via the Customer Portal). Can be empty if the return is not a Customer Portal return.
List of items that were actually handled in the FC. Can be empty if return items have not been handled in the FC yet.
Details of the associated order
Reason for the return. Possible values:
- customer_return: Customer initiated return
- customs_documents_missing: Missing customs documentation
- invalid_address: Invalid shipping address
- not_picked_up: Package was not picked up by customer
- other: Other reason not specified
- rejected_by_customer: Customer rejected the delivery
Type of return categorization. Possible values:
- active: Customer return (end-customer actively shipped the return)
- passive: Carrier return (end-customer never received the parcel - shipped back by carrier for reasons like invalid address, not picked up, damages, missing customs documents, etc.)
When processing at the fulfillment center started
Status of the return. Possible values:
- action_required: Waiting for merchant guidance
- arrived: Arrived at fulfillment center
- handling_completed: Return processing completed
- on_the_way: On the way to fulfillment center
- processing: Return processing in progress
- Mock serverhttps://hive-merchant-api.redocly.app/_mock/merchant-api-v2/mapi_v2_oas31/return.status_updated
- Production APIhttps://app.hive.app/merchant_api/v2/return.status_updated
- Staging APIhttps://staging.app.hive.app/merchant_api/v2/return.status_updated
{ "event_type": "return.status_updated", "event_id": "123e4567-e89b-12d3-a456-426614174002", "timestamp": "2023-10-01T18:00:00Z", "data": { "id": 5555, "status": "arrived", "created_at": "2023-10-01T18:00:00Z", "updated_at": "2023-10-01T18:00:00Z", "announced_items": [ … ], "order": { … } } }
List of documents associated with the inventory transfer order
List of items in the inventory transfer order
The merchant's SKU identifier - required if sku_id is not provided
List of restocking shipments associated with the inventory transfer order
Items in the restocking shipment
Quantity of this item in the shipment
Arrived quantity of this item (after shipment is received)
Damaged quantity of this item (after shipment is received)
Missing quantity of this item (after shipment is received)
The merchant's SKU identifier - required if sku_id is not provided
Hive SKU identifier - required if sku_code is not provided
List of shipments associated with the inventory transfer order
Items in the shipment
Status of the inventory transfer order. Possible values:
- pending: Initial status when the transfer order is created
- created: The transfer order has been created and is ready for processing
- processing: The transfer order is currently being processed
- completed: The transfer order has been successfully completed
- cancelled: The transfer order has been cancelled
- Mock serverhttps://hive-merchant-api.redocly.app/_mock/merchant-api-v2/mapi_v2_oas31/inventory_transfer_order.status_updated
- Production APIhttps://app.hive.app/merchant_api/v2/inventory_transfer_order.status_updated
- Staging APIhttps://staging.app.hive.app/merchant_api/v2/inventory_transfer_order.status_updated
{ "event_type": "inventory_transfer_order.status_updated", "event_id": "123e4567-e89b-12d3-a456-426614174004", "timestamp": "2023-10-01T19:00:00Z", "data": { "id": 123456, "status": "completed", "created_at": "2023-10-01T19:00:00Z", "completed_at": "2023-10-01T20:00:00Z", "origin_id": 4, "destination_id": 2, "updated_at": "2023-10-01T20:00:00Z", "order": { … }, "order_notes": "", "documents": [], "restocking_shipments": [], "shipments": [], "items": [ … ] } }