postsale orders
Search, read, create, update, tag, and recover orders, and ask the work queue what is ready to ship.
Order operations.
Deep docs: Search & work queue · Domain model · Ship workflow
Subcommands
| Command | Safety | Notes |
|---|---|---|
search | read | --query NL, --input/--json structured, --all NDJSON |
get <order_id> | read | |
work-queue | read | "what should I ship?" — see flags |
create | write | --input / --json |
update | write | --input / --json |
set-status <order_id> | write | --status |
bulk-status | write | multi-id; may prompt for scope |
tag <order_id> | write | key/value upsert; empty value stores ""; see note below |
recover <order_id> | write | restore deleted |
bulk-delete | destructive | requires --yes |
create-shipment <order_id> | money-moving | requires --yes; optional body |
Note
The backend accepts tag writes for keys that are not part of your account's tag configuration and returns success, but the tag may never attach (observed 2026-05-09). After tagging with a new key, verify with postsale orders get <order_id>.
Work-queue flags
--window-days, --all-time, --statuses, --include-samples, --page, --page-size, --human
# the product definition of shippable work
postsale orders work-queue
postsale orders work-queue --human
# ignore the recency window
postsale orders work-queue --all-time
# only after confirming the status names with the account
postsale orders work-queue --statuses "Ready to Ship"Prefer this over composing your own status filter — status names are account-defined and guessing them fails silently. The response discloses every applied filter (applied) and what was left out (excluded: outside_window, outside_resolved_statuses, samples_in_window); surface those counts, since a small queue beside a large outside_resolved_statuses means the status set needs a human's attention. This is a thin wrapper over the get_work_queue agent tool, so it and postsale run cannot disagree. Details: Search & work queue.
Search flags
--query, --input, --json, --page, --page-size (max 150), --all, --max-items, --compact, --human
postsale orders search --query "shipped last week" --page-size 50
postsale orders search --query "shipped last week" --page-size 50 --compact
postsale orders get <order_id>
postsale orders create-shipment <order_id> --yes--compact
Projects each order to the fields you need to decide what to do next — id, number, status, date, total, ship_to (as "City, ST"), and items as a count — dropping address blocks, line items, charges, notes, and tags. In measurement, a 50-order page goes from ~55KB to ~8.5KB (~6.4x smaller). Works with --all too, projecting each streamed NDJSON row.
Useful when you are triaging rather than acting: an agent pays the full payload on every search, and inside a postsale run loop the result is replayed on every later turn. Response-level fields are untouched — including _cli_meta.empty_result_context, so the empty-result honesty signal survives the projection. When you need weights, SKUs, or the full destination address (to create a shipment or quote rates), omit --compact or follow up with postsale orders get <order_id>.
Schema slugs
orders.search, orders.search.natural, orders.get, orders.create, orders.update, orders.set-status, orders.bulk-status, orders.tag, orders.recover, orders.bulk-delete, orders.create-shipment
Agent tools
search_orders, get_order, create_order, update_order, set_order_status, bulk_set_order_status, tag_order, recover_order, create_shipment, get_work_queue, list_order_statuses
See also
On this page
Related