Skip to content

Find the Cheapest Rate, Then Buy the Label

Rate shop one order and buy the cheapest label, rehearsed first.

Updated September 3, 20261 min readPostsale CLI

Use this recipe when you want the lowest rate for one order and a label to match, and you want to see the choice before anything is charged. It runs the same job three ways: a rehearsal, the live agent, and the direct commands for when you already have request bodies.

Rehearse first, nothing is bought

bash
postsale run --dry-run "Rate shop order <ord_id> and prepare the cheapest label"

Inspect envelope simulated_effects and any real confirmed_effects.

Buy the label, which charges your carrier account

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

The same job with direct commands

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

Additional Reading