Skip to main content

Order Statuses

A status refusal is not a failure of the connection or of permissions — it is Mailhub declining a move that would leave the Order and its Label describing different realities.

Status reference​

An Order is in exactly one of twelve statuses. Each has a numeric code that travels with it, so a response usually carries both the name and the code.

CodeStatusWhat it meansSettable through MCP
0CreatedThe Order exists and is ready to move through fulfillmentYes
1RequestedReserved for Orders arriving through store intake; nothing sets it yetNo
2OnHoldFulfillment is pausedYes
3CancelledThe Order is cancelledYes
4FulfilledFulfillment is complete and the parcel has been handed overYes
5ProcessingFulfillment work is under wayYes
6PickedThe items have been pickedYes
7PackedThe items have been packedYes
8LabelCreatedA shipping Label has been bought for the OrderNo — buying a Label is what sets it
9ReturnedThe Order came backYes
10ErrorA technical state Mailhub sets itselfNo
11DraftAn Order still missing details — started in the application, or imported from a connected storeNo

The codes are deliberately not renumbered to match the settable subset. They are a wire contract: the same number always means the same status.

Statuses you can set with MCP​

mailhub_update_order_status accepts exactly these eight names:

Created, OnHold, Cancelled, Fulfilled, Processing, Picked, Packed, Returned.

Four statuses are never accepted by that tool:

StatusWhy not
RequestedNothing moves an Order into it on request
LabelCreatedReached by buying a Label, not by asking for the status
ErrorTechnical, and set by Mailhub
DraftAn Order starts as a Draft; nothing moves an Order back into it

Asking for any other value is refused, and the refusal lists the eight names above.

Valid transitions​

Which move is legal depends on where the Order is now. This table is what an MCP user can ask for; Mailhub performs other changes itself as a consequence of operations such as buying or cancelling a Label.

Current statusYou may move it to
RequestedCreated, Cancelled
CreatedProcessing, Picked, Packed, OnHold, Cancelled
ProcessingPicked, Packed, OnHold, Cancelled
PickedPacked, OnHold, Cancelled
PackedCancelled
OnHoldThe status it was held from, or Cancelled
LabelCreatedFulfilled
FulfilledReturned
CancelledNothing — the Order is closed
ReturnedNothing
ErrorNothing; Mailhub owns this state
DraftCancelled; asking for Created completes the Draft with its stored details

Fulfillment moves forward, and several steps are one-way. Cancelled and Returned are ends, not pauses.

For an Order in a merged Shipment, putting it on hold, resuming it, marking it Fulfilled, and marking it Returned move every Order in the Shipment, because they travel in one box. A resume moves only the Orders that are on hold, each back to the status it was held from; a Draft Order, or one already in the target status, is left as it is. If any of them cannot make the move, nothing changes. Cancelling affects only the Order you name and takes it out of the Shipment.

Working with OnHold​

Putting an Order on hold is easy to undo, but not to redirect.

An Order on hold can always be cancelled instead of resumed.

Buying a Label for an Order on hold is refused, and the refusal happens before any wallet activity — no funds are held or spent by the attempt. Resume the Order first, then buy.

Rating and buying need no status change​

Buying is what moves the Order on: the purchase itself sets LabelCreated, which is why that status is not one you set. See mailhub_get_shipment_rates and mailhub_buy_label.

Buying a Label isOrder status
AllowedCreated, Processing, Picked, and Packed
RefusedCancelled, OnHold, Fulfilled, Returned, and an Order that already has an active Label

To finish a Draft, use mailhub_complete_draft_order; list Drafts with mailhub_list_orders and status: "Draft".

An Order in LabelCreated is moved to Fulfilled with mailhub_update_order_status once the parcel is handed to the carrier.

Cancelling an Order that already has a Label​

An Order holding an active Label cannot be cancelled directly. Cancelling it while a bought Label stayed live with the carrier would leave the Order and the carrier describing different things — so Mailhub asks for the Label to be voided first.

Cancel the Label with mailhub_cancel_label, which returns the Order to Packed, then cancel the Order from there. Working with Labels walks the sequence through with the rest of the Label lifecycle.

Common refusals​

What you asked forWhat happensWhat to do
The status the Order is already inRefused as already in that status — it is not replayed as a no-opNothing; the Order is where you wanted it
A move the current status does not allowRefused, and where Mailhub can say so the message names the statuses the Order can reachPick one of the named statuses
LabelCreatedRefused — it is not a settable statusBuy a Label instead
Cancelled for an Order with an active LabelRefusedCancel the Label, then cancel the Order from Packed
A resume from OnHold to some other statusRefusedResume to the status the Order was held from

The message on a refusal is the useful part: it usually names either what is blocking the change or what to ask for instead. Each tool page lists the refusals you are most likely to meet with that tool, and Errors & Troubleshooting carries the full catalog with each code's retry guidance.

Next​

Apply a change with mailhub_update_order_status — the tool this page governs.