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

NameTypeRequiredDescription
tenantIdstringYesThe tenant.
shipment_idstringYesCarriyo shipment ID or partner_shipment_reference.
carrier_accountobjectNoOptional carrier account override before confirming.
references, payment, pickup, dropoff, items, parcels, freight, ...mixedNoOptional 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 DRAFT into the configured next status (typically BOOKED or READY_TO_SHIP, depending on the workflow).
  • The carrier may immediately return tracking info; if not, it arrives shortly via the carrier callback.
  • create_shipment — the tool that produces drafts to confirm. Note that create_shipment with draft=false confirms 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.