Updates an order. Properties you leave out keep their current value, and so do most properties sent as null (see the request body); shipping_address is merged property by property.
When you send items, it is the order's complete item list: items are matched to the existing ones by merchant_item_id, and existing items missing from it are cancelled. Cancelled items are still listed in the response's items.
merchant_order_id identifies the order and must not change: an update with a different value does not rename this order, it creates or updates the order with that merchant_order_id instead and responds with it.
When the order was placed, as an ISO 8601 date-time. Must not be in the future.
The 3-letter ISO 4217 currency code of the order's amounts.
Any JSON object you want to store with the order. Replaces the stored object; null keeps it.
The order number the customer sees. null resets it to merchant_order_id.
The financial status of the order.
The complete list of the order's line items. Items are matched to the existing ones by merchant_item_id; existing items missing from the list are cancelled.
Your unique identifier for the order. Must be the order's current value; a different one does not rename the order but addresses the order with that value.
The payment method of the order. A value containing COD marks a Cash on Delivery order, which needs a total_price_in_cents greater than 0.
The order status to store. Leave it out; use PUT /orders/{id}/cancel to cancel an order.
Refunds without tax, in cents. A string of digits is accepted too.
Revenue without tax, in cents. A string of digits is accepted too.
The total price paid, in cents. A string of digits is accepted too.
The tax paid, in cents. A string of digits is accepted too.
- Mock serverhttps://developers.hive.app/_mock/merchant-api-v1/mapi_v1_oas31/orders/{id}
- Production APIhttps://app.hive.app/merchant_api/v1/orders/{id}
- Staging APIhttps://staging.app.hive.app/merchant_api/v1/orders/{id}
curl -i -X PATCH \
'https://developers.hive.app/_mock/merchant-api-v1/mapi_v1_oas31/orders/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"financial_status": "refunded",
"total_net_refunds_in_cents": 2101,
"total_tax_refunds_in_cents": 399
}'The updated order
When the order was placed, as sent by the merchant; the time Hive received it if none was sent.
The 3-letter ISO 4217 currency code of the order's amounts.
The order number the customer sees; the merchant_order_id when none was sent.
The financial status of the order.
The order's line items, including items cancelled by an update.
The merchant's unique identifier for the order, unique within the sales channel.
The payment method of the order. COD marks a Cash on Delivery order.
The order status:
fulfillable: Hive will fulfill the order. Orders created through the API are fulfillable by default.unfulfillable: Hive will not fulfill the order, for example because it was cancelled or its destination country is blocked for the sales channel.fulfilled: the order is fulfilled.on_hold: fulfillment of the order is on hold.
Revenue without tax (amount paid minus tax), in cents.
{ "id": 4962, "merchant_order_id": "60423b95-23b5-4e5b-aa1c-6a71bd90b106", "customer_order_number": "#1042", "status": "fulfillable", "carrier_preference": null, "created_at": "2022-11-01T17:42:07.409+01:00", "currency": "EUR", "financial_status": "paid", "payment_method": null, "total_price_in_cents": 2500, "total_net_revenue_in_cents": 2101, "total_tax_in_cents": 399, "total_net_refunds_in_cents": 0, "total_tax_refunds_in_cents": 0, "tags": [ "first_order" ], "shipping_address": { "first_name": "John", "last_name": "Doe", "full_name": "John Doe", "email": "john.doe@example.com", "phone": null, "company": null, "line1": "Kassaveti 69", "line2": null, "city": "Volos", "country_code": "GR", "postal_code": "38221", "parcel_point_id": null, "province_or_state_code": null }, "items": [ { … } ], "custom_metadata": null }