Ship One Order with the CLI
Take a single order from lookup to a purchased label, with the agent or with direct commands, and confirm the result.
This workflow takes a single order from "needs shipping" to a purchased label. We start with the work queue, rehearse with dry-run, then ship for real.
In this article, we will find shippable work, dry-run the money path, create the shipment and label, then confirm and reprint later.
Real-World Example
We have one ready order. We want the cheapest service that fits, a label we can trust, and a dry-run rehearsal before anything charges.
Before We Begin
This article assumes that:
- You are signed in to the CLI
- Carriers and origin addresses configured (
postsale doctor) - LLM key if you use
postsale run - You have read Safety and Orders, shipments, and labels
Path A: with the agent, the recommended path
We recommend Path A when you want work-queue selection, intent builders, and dry-run rehearsal without assembling three JSON bodies by hand.
Here's how:
1. Find work
postsale run "what should I ship? explain the applied filters and exclusions"
# or, without an LLM key (same product definition):
postsale orders work-queue --humanDo not invent status enums. See Search and the work queue.
2. Confirm the order
postsale orders get <order_id>
# or
postsale run "get order <order_id> and summarize ship-to and weights"3. Dry-run
postsale run --dry-run "Ship order <order_id> with the cheapest carrier"Check simulated_effects and confirmed_effects.
4. Ship for real, which charges your carrier account
postsale run "ship order <order_id> with the cheapest carrier" --yesTwo things can stop a first purchase before any charge, and both are owner actions rather than errors to retry: the carrier's terms have not been accepted yet (terms_acceptance_required, exit 78, with data.accept_url or an in-app remediation for the owner), or the subscription is inactive (subscription_reactivation_required, exit 101, with data.reactivate_url). Labels are bought one shipment per request, so when you ship several at once each shipment answers on its own in labels[] or errors[]. Details: Shipping, labels and rates.
5. Confirm
postsale shipments get --reference <order_id>6. Reprint later without buying again
postsale labels reprint <shipment_id>Success looks like a processed shipment and label you can reprint without buying again.
Path B: Direct commands
When you already have request bodies:
postsale shipments get-rates --input rates.json
postsale orders create-shipment <order_id> --yes
postsale labels purchase --shipment-id <shipment_id> --yesUse postsale schema for shapes, and read Intent builders for weight and dimension rules.
Good to Know
| Issue | Where to look |
|---|---|
| Empty work | Search and the work queue |
| Exit 64 | Safety · Troubleshooting |
| Weight or dimension errors | Intent builders |
| Wrong label / need void | Void Labels and Correct Shipments |
| Many orders | Ship Many Orders, [Parallel batches](../features/parallel batch.md), Batches and Unattended Runs |
Additional Reading
On this page
Related