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
1RequestedThe Order has been submitted into the workflowNo
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
11DraftA work-in-progress Order in the Mailhub applicationNo

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
DraftA state of the application's Order wizard; MCP does not list or set 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
DraftNothing through MCP

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

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, Packed, and Draft Orders in the application
RefusedCancelled, OnHold, Fulfilled, Returned, and an Order that already has an active Label

Draft appears there only because it is not a blocker when it happens. A Draft belongs to the Mailhub application's Order wizard: MCP does not list Drafts and cannot set that status, so it is never a step you take deliberately.

An Order in LabelCreated moves on to Fulfilled when 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.