Operations related to inventory transfer orders
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.
https://hive-merchant-api.redocly.app/_mock/merchant-api-v2/mapi_v2_oas31/
https://app.hive.app/merchant_api/v2/
https://staging.app.hive.app/merchant_api/v2/
The preferred carrier to use for delivering this order
When the order was created. Will default to current time if omitted.
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.
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.
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)
Net refunds in cents (total refunded minus taxes)
Net revenue in cents (amount paid minus taxes)
- Mock server
https://hive-merchant-api.redocly.app/_mock/merchant-api-v2/mapi_v2_oas31/order.status_updated
 - Production API
https://app.hive.app/merchant_api/v2/order.status_updated
 - Staging API
https://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
- Mock server
https://hive-merchant-api.redocly.app/_mock/merchant-api-v2/mapi_v2_oas31/shipment.status_updated
 - Production API
https://app.hive.app/merchant_api/v2/shipment.status_updated
 - Staging API
https://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
- Mock server
https://hive-merchant-api.redocly.app/_mock/merchant-api-v2/mapi_v2_oas31/shipment.delivery_status_updated
 - Production API
https://app.hive.app/merchant_api/v2/shipment.delivery_status_updated
 - Staging API
https://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": [ … ] } }
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
- Mock server
https://hive-merchant-api.redocly.app/_mock/merchant-api-v2/mapi_v2_oas31/restocking_shipment.status_updated
 - Production API
https://app.hive.app/merchant_api/v2/restocking_shipment.status_updated
 - Staging API
https://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.
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
- Mock server
https://hive-merchant-api.redocly.app/_mock/merchant-api-v2/mapi_v2_oas31/return.status_updated
 - Production API
https://app.hive.app/merchant_api/v2/return.status_updated
 - Staging API
https://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
- Mock server
https://hive-merchant-api.redocly.app/_mock/merchant-api-v2/mapi_v2_oas31/inventory_transfer_order.status_updated
 - Production API
https://app.hive.app/merchant_api/v2/inventory_transfer_order.status_updated
 - Staging API
https://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": [ … ] } }