Complete Draft Order
mailhub_complete_draft_order
Finish a Draft — an Order that exists but is still missing details — and move it
to Created. Find Drafts with
mailhub_list_orders using status: "Draft", and
read one with mailhub_get_order before completing
it.
Permission and safety
| Changes data | Yes |
| Confirmation | Required — confirm: true |
| Spends funds | No |
| Permission | Update access to Orders |
Confirmation is enforced by the server — see
Confirmations & Spend Safety — and one call completes exactly
one Order. Completing a Draft buys nothing: postage is still a separate
mailhub_buy_label call.
Input
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
orderId | string | Yes | — | The Draft Order's identifier |
details | object | No | — | Only the fields supplied or changed |
storeChangeReviewedAtUtc | string | No | — | Sent only after showing the user a store change |
confirm | boolean | No | false | Defaults to false; the call is refused unless the value is the boolean true |
details is a patch, not a replacement. The tool reads the Draft's stored
details itself and keeps every value you do not send, so send only what the user
supplied or asked to change. Omitting a field never blanks it; an empty string
clears an optional address field (name, company, street2, phone,
email). Giving a dimension drops the Draft's predefined package, and giving a
predefined package drops its dimensions.
Example input
{
"orderId": "55555555-5555-5555-5555-555555555555",
"details": {
"toAddress": {"phone": "311-201-0142"},
"shipments": [{"parcel": {"weight": 2.5}}]
},
"confirm": true
}
Output
The completed Order, passed through from Mailhub. It carries
the same order identifier the Draft had, now in the Created
status rather than Draft.
Rules and common tool-specific errors
- A Draft that is still missing details is refused, and stays a Draft. The
refusal names the fields that are missing or invalid. Save what the user did
give with
mailhub_update_draft_orderso it is not lost, ask for the rest — package size, weight, sender address, phone — and never invent a value. - Details that look made up are refused with
MCP_PLACEHOLDER_VALUE: test, example, or dummy values, a 555 phone number, anexample.comaddress. - An Order that is no longer a Draft is refused with
MCP_ORDER_NOT_DRAFT; read it to see its status. - A connected store may have changed the Order behind the Draft. The call is
then refused until the user has seen the change. Show them
storeChange.fieldsfrommailhub_get_order, and resubmit withstoreChangeReviewedAtUtcset tostoreChange.atUtconly once they agree. Sending it without showing them defeats the check. The refusal code isMCP_STORE_CHANGE_REVIEW_REQUIRED. - An Order in a merged Shipment cannot change its recipient or parcel here:
the Shipment owns them. The call is refused with
MCP_ORDER_IN_MERGED_SHIPMENT; usemailhub_update_merged_shipment. - Setting a Draft to
Createdwithmailhub_update_order_statusruns the same completion with the Draft's stored details, and setting it toCancelledcancels it. Use this tool when the user also gives details. - Access and shared failures — sign-in, permissions, rate guards — are listed in Errors & Troubleshooting.
Next
mailhub_get_shipment_rates— Rates for the now-Created Order's Shipment.mailhub_buy_label— buy postage for a chosen Rate.