reassign_shipment
Reassign or retry an unshipped or errored shipment.
The right tool when the carrier is the problem and you want to keep the shipment but route it through a different carrier account. Also works as a same-carrier retry when no carrier override is provided.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | Yes | The tenant. |
shipment_id | string | Yes | Carriyo shipment ID or partner_shipment_reference. |
carrier_id | string | No | Target carrier id. |
carrier_account_name | string | No | Target carrier account name. |
If no carrier-account fields are provided, the routing engine picks the best match.
How it picks
| Provided | Behaviour |
|---|---|
| Nothing | Routing engine picks the best match (rules + capacity). |
| Carrier id | Specific carrier account is used. |
| Carrier account name | Specific account is used. |
For most reassign cases, providing carrier_account_name is the
clearest — leaves no ambiguity.
Example agent prompts
"Aramex rejected SHP-12345. Try DHL instead."
reassign_shipment(
tenantId="…",
shipment_id="SHP-12345",
carrier_id="dhl-uae-2"
)
"Reassign SHP-12345 to DHL UAE 2 specifically."
reassign_shipment(
tenantId="…",
shipment_id="SHP-12345",
carrier_account_name="dhl-uae-2"
)
"Just retry — no carrier change."
reassign_shipment(
tenantId="…",
shipment_id="SHP-12345"
)
The routing engine will pick the same carrier if its rules still favour it, or a different one if conditions have changed (capacity, status).
Related tools
reprocess_shipment— use when the issue is shipment data, not carrier choice.get_carrier_accounts— resolve carrier account names before passing them.list_shipment_system_logs— confirm the issue is the carrier before reassigning.
Common chain
Diagnose a stuck shipment —
the canonical multi-tool flow that often ends in reassign_shipment
when the carrier is the cause.