Skip to main content

Order State Errors

Verified status codes​

SituationStatus
Order does not exist for your account404
The move from the Order's current status to the requested status is not a supported transition, or the Order is already in it (Order.StatusTransitionNotAllowed)409
Order is Cancelled at label-purchase time400
Order is OnHold, Fulfilled or Returned at label-purchase time409
Shipment already has a Label and the purchase is not the same request409

Merged Shipments​

A merged Shipment is rated and bought once for every Order in it, so each Order's status matters to all of them.

Rating and buying. Get Shipping Rates and Buy a Label on a merged Shipment are refused while another of its Orders is Cancelled, OnHold, Fulfilled or Returned. The error keeps that refusal's own code and names the Order in metaData (orderId, orderNumber, reason). Resolve that Order's status, or take the Shipment apart, and try again.

Status updates move the whole Shipment. Putting an Order on hold, resuming it, handing it over (Fulfilled) or returning it moves every other Order in its merged Shipment too:

  • A resume returns each held Order to the status it was held from.
  • A Draft Order, or one already in the target status, is left as it is.
  • If any other Order cannot make the move, nothing changes: the request is refused with that Order's own error, named in metaData.
  • Putting a merged Shipment's Orders on hold is refused with 409 Shipment.MergePurchaseInProgress while its Label is being bought.

Cancelling takes one Order out. Cancelling an Order in a merged Shipment removes it from that Shipment instead of moving the others. It is refused with 409 Shipment.MergeHasActiveLabel while a Label covers the Shipment, or 409 Shipment.MergePurchaseInProgress while one is being bought.

A replaced Shipment. A Shipment that a merge replaced, or a merged Shipment that was taken apart, answers 409 Shipment.Superseded to rating. Read the Order with Get Order and use the shipment.shipmentId it returns now; repeating the request on the old shipmentId gets the same answer.

An Order that is not in a merged Shipment is unaffected by all of this.

Recover safely​

Retrieve the latest Order state before changing it or continuing the workflow. Correct the target status rather than repeating an identical invalid transition — see Update Order Status for the full supported-transition table. See also Order-to-Label Workflow.