confirm_shipment
Updated May 29, 20261 min read
Confirm a draft or errored shipment for booking. Optionally pass shipment fields at the top level to update the shipment in the same call.
This is the "book it" tool — the moment the carrier is actually engaged and a label is generated.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | Yes | The tenant. |
shipment_id | string | Yes | Carriyo shipment ID or partner_shipment_reference. |
carrier_account | object | No | Optional carrier account override before confirming. |
references, payment, pickup, dropoff, items, parcels, freight, ... | mixed | No | Optional shipment fields to update before confirming. |
When to pass shipment fields
Passing shipment fields is a convenience — it lets the agent edit and confirm in a single call. Useful when the user makes a last-minute change ("OK, ship it — but use Aramex this time").
If you've already edited the draft via
edit_draft_shipment,
you don't need changes here.
Example agent prompts
"OK, book it."
confirm_shipment(
tenantId="…",
shipment_id="<draft id>"
)
"Book it, but switch to DHL."
confirm_shipment(
tenantId="…",
shipment_id="<draft id>",
carrier_account={ "carrier_id": "dhl-uae-2" }
)
What happens on confirm
- A carrier booking call is made.
- A label is generated (or queued).
- The shipment moves out of
DRAFTinto the configured next status (typicallyBOOKEDorREADY_TO_SHIP, depending on the workflow). - The carrier may immediately return tracking info; if not, it arrives shortly via the carrier callback.
Related tools
create_shipment— the tool that produces drafts to confirm. Note thatcreate_shipmentwithdraft=falseconfirms in one call, skipping this step.edit_draft_shipment— edit before confirming, if changes need a separate moment.reprocess_shipment— for confirming shipments stuck in error status (also acts as a retry).
Real money moment
Confirming a shipment incurs a carrier fee and reserves capacity. In customer-facing agents, this should be the explicit confirmation moment — never an inferred next step.