Skip to content

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.

Updated September 3, 20261 min readPostsale CLI

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

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

bash
postsale run "what should I ship? explain the applied filters and exclusions"
# or, without an LLM key (same product definition):
postsale orders work-queue --human

Do not invent status enums. See Search and the work queue.

2. Confirm the order

bash
postsale orders get <order_id>
# or
postsale run "get order <order_id> and summarize ship-to and weights"

3. Dry-run

bash
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

bash
postsale run "ship order <order_id> with the cheapest carrier" --yes

Two 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

bash
postsale shipments get --reference <order_id>

6. Reprint later without buying again

bash
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:

bash
postsale shipments get-rates --input rates.json
postsale orders create-shipment <order_id> --yes
postsale labels purchase --shipment-id <shipment_id> --yes

Use postsale schema for shapes, and read Intent builders for weight and dimension rules.

Good to Know

IssueWhere to look
Empty workSearch and the work queue
Exit 64Safety · Troubleshooting
Weight or dimension errorsIntent builders
Wrong label / need voidVoid Labels and Correct Shipments
Many ordersShip Many Orders, [Parallel batches](../features/parallel batch.md), Batches and Unattended Runs

Additional Reading