Update Order Status
/api/v1/orders/{orderId}/status
Open update order status in the API Reference.
Status reflects the Order's real fulfilment progress. Request body:
{
"status": 7,
"reason": "Packed and ready to ship",
"source": "warehouse-scanner"
}
Always send status: the contract does not mark it required, and a request
that omits it asks for Created (0). reason (up to 500 characters) and
source (up to 100) are optional free-text fields for your own audit trail.
status is the numeric OrderStatus value — the same representation that
Create an Order, Get Order, and List Orders
return. Use the table below to map numbers to names.
Status values
| Value | Name |
|---|---|
0 | Created |
1 | Requested |
2 | OnHold |
3 | Cancelled |
4 | Fulfilled |
5 | Processing |
6 | Picked |
7 | Packed |
8 | LabelCreated |
9 | Returned |
10 | Error |
11 | Draft |
A new Order starts in Created (0).
Supported transitions for this workflow
Not every (current, target) pair is allowed — an unsupported transition
returns 409. The transitions relevant to the order-to-label journey are
below; Order Lifecycle has the complete
table, including hold and resume.
| From | To | Notes |
|---|---|---|
Created, Processing, or Picked | Packed | Optional operational status update — see below |
Created, Processing, Picked, or Packed | LabelCreated | Set only by a successful Label purchase. LabelCreated is never accepted as a target here |
LabelCreated | Fulfilled | The only path to Fulfilled — PATCH this after you have downloaded the Label and handed the shipment to the carrier |
LabelCreated | Packed | Applied automatically when you cancel the Label — see Cancel a Label |
Draft, Requested, Created, Processing, Picked, Packed, or OnHold | Cancelled | An Order with a Label cannot be cancelled: cancel the Label first |
Fulfilled | Returned |
Fulfilled is enforced: it is only reachable from LabelCreated, so you
must have already purchased a Label before this call succeeds.
- cURL
- JavaScript
- C#
curl -s -X PATCH "${MAILHUB_API_BASE_URL}/api/v1/orders/${ORDER_ID}/status" \
-H "Authorization: Bearer ${MAILHUB_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"status": 4, "reason": "Handed to carrier"}'
const statusResponse = await fetch(`${process.env.MAILHUB_API_BASE_URL}/api/v1/orders/${orderId}/status`, {
method: 'PATCH',
headers: {
Authorization: `Bearer ${accessToken}`,
'Content-Type': 'application/json',
},
// 4 = Fulfilled — only valid once the order is LabelCreated
body: JSON.stringify({status: 4, reason: 'Handed to carrier'}),
});
const {data: result} = await statusResponse.json();
// result.previousStatus, result.currentStatus (both numeric)
var statusRequest = new HttpRequestMessage(HttpMethod.Patch, $"/api/v1/orders/{orderId}/status")
{
// 4 = Fulfilled — only valid once the order is LabelCreated
Content = JsonContent.Create(new { status = 4, reason = "Handed to carrier" }),
};
statusRequest.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
var statusResponse = await client.SendAsync(statusRequest);
Orders in a merged Shipment
When the Order is in a merged Shipment, some changes apply to every Order in it, because they all travel in one box under one Label:
- On hold, resume, hand-over (
Fulfilled) and return move every Order. A resume returns each held Order to the status it was held from. ADraftOrder, or one already in the target status, is left as it is. - All or nothing. If any other Order cannot make the move, nothing
changes: the request is refused with that Order's own error, and
metaDatanames it (orderId,orderNumber,reason). - Cancel affects only this Order. It takes the Order out of the merged
Shipment. It is refused with
409 Shipment.MergeHasActiveLabelwhile a Label covers the Shipment, or409 Shipment.MergePurchaseInProgresswhile one is being bought. Putting the Orders on hold is refused with the second error too. - Rating and buying depend on every Order. While another Order in the
Shipment is
Cancelled,OnHold,FulfilledorReturned, or fails a pre-purchase check of its own, the merged Shipment cannot be rated or bought. Resolve that Order's status, or take the Shipment apart, first.
The response describes only the Order you sent the request for. Read the
others with Get Order (GET /api/v1/orders/{orderId}) to see their new
status. An Order with a Shipment of its own is unaffected by
any of this. See also Order State Errors.
Response
{
"success": true,
"data": {
"orderId": "5f2c1a10-2b3d-4e5f-8a9b-0c1d2e3f4a5b",
"previousStatus": 8,
"currentStatus": 4,
"updatedAt": "2026-01-01T12:00:00Z"
},
"errors": null
}
Errors
404 if the Order does not exist for your account.
409 Order.StatusTransitionNotAllowed if the move from the Order's current
status to the requested status is not a supported transition, or the Order
is already in that status — retrieve the Order's current status and correct
the target rather than repeating the same request. 422 if status is 10
(Error) or not a defined value, reason is longer than 500 characters, or
source is longer than 100. For an
Order in a merged Shipment, a refusal can also come from another Order in it,
or from the Shipment's Label — see
Orders in a merged Shipment.
Continue with Get Shipping Rates, or
if the Order already has a Label, proceed straight to
Download a Label and mark it
Fulfilled afterward.