POST to the labels endpoint (verify current path in docs) with 'rate_id' set to the previously obtained rate ID; ShipEngine purchases the label from the carrier and returns a 'label_id', 'tracking_number', 'label_download.pdf' URL, and 'label_download.zpl' URL.
Download and store the label; deliver it to the packing and shipping team or generate a combined batch label PDF if processing multiple shipments.
If a shipment is cancelled before it is scanned by the carrier, POST to the label void endpoint (verify path in current docs) with the 'label_id'; ShipEngine submits a void/refund request to the carrier.
Poll the void status or check the response for a 'void_requested: true' indicator; note that actual postage refund credit typically takes several business days and depends on the carrier's refund policy.
Do not re-use the voided label's tracking number; generate a new label for any replacement shipment.
Known gotchas
Not all carriers support label voiding via API; some require manual void requests through the carrier's portal, so verify carrier-specific void support in ShipEngine docs before building automated void logic.
Label void windows are carrier-imposed; many carriers only allow voiding within a specific number of days after purchase (verify per-carrier deadlines). Attempting to void after the window has no effect.
Voiding a label does not guarantee a postage refund if the package has already been inducted into the carrier network; always attempt to retrieve the package before relying on a refund.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp