Cancel Envia Shipment
envia_cancelCancel a shipment and request a refund; confirm with the user first because the cancellation cannot be undone.
Instructions
Cancel a shipment and request a refund. This is a DESTRUCTIVE operation.
WARNING: Cancellation cannot be undone. Confirm with the user before proceeding. If the shipment is already canceled, error 1115 will be returned.
Args: carrier — Carrier string (e.g., "dhl", "fedex", "estafeta") tracking_number — Tracking number of the shipment to cancel response_format — "markdown" (default) or "json"
Returns: Cancellation status, refunded amount, and balance return info.
Errors: 1115 — Shipment is already canceled 400 — Invalid carrier or tracking number 403 — Invalid API key
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"carrier": "<carrier>",
"tracking_number": "<tracking_number>"
},
"name": "envia_cancel"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| carrier | Yes | Carrier string (e.g., "dhl") | |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for machine-readable | markdown |
| tracking_number | Yes | Tracking number of the shipment to cancel |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| carrier | Yes | ||
| refunded_amount | Yes | ||
| tracking_number | Yes | ||
| balance_returned | Yes | ||
| balance_return_date | Yes |