quote_rates
Compare shipping rates across every available carrier for a route + parcels, in one call — the Envia killer feature (AI picks the cheapest carrier for the merchant). Give the origin and destination addresses, the country (domestic) or origin_country + destination_country (cross-border), and the packages (weight in KG, dimensions in cm). Returns each carrier + service with its total price, currency and delivery estimate, and flags the cheapest. Read-only: quotes only, buys nothing and spends nothing. Credential headers (set once in your MCP client, per-request, never stored): x-envia-token (your Envia API token; sandbox tokens are self-service at https://ship-test.envia.com, production tokens from your live Envia account — sandbox and production tokens are SEPARATE) + x-envia-env (sandbox = default, no real shipping / no charge; production = real labels & real money). Owner-policy headers x-agentpay-max-amount / x-agentpay-approval-above / x-agentpay-allowed-tools also apply.
Parameters26
| country | string | optional | Convenience for a DOMESTIC shipment: sets both the origin and destination country. 2-letter ISO code. Supported: MX=Mexico, CO=Colombia, CL=Chile, BR=Brazil, GT=Guatemala, AR=Argentina, US=United States, CA=Canada, ES=Spain. For a cross-border shipment use origin_country + destination_country instead. |
| origin_country | string | optional | Origin (ship-from) country ISO code. Provide this + destination_country for cross-border, or just `country` for domestic. |
| destination_country | string | optional | Destination (ship-to) country ISO code. Provide this + origin_country for cross-border, or just `country` for domestic. |
| origin_name | string | optional | Origin (ship-from) contact full name. Required. |
| origin_street | string | optional | Origin (ship-from) street address (street + number). Required. |
| origin_city | string | optional | Origin (ship-from) city. Required. NOTE: for Colombia (CO) this must be the 8-digit DANE municipal code, not the city name. |
| origin_state | string | optional | Origin (ship-from) state / province code (2-3 chars). Required. |
| origin_postal_code | string | optional | Origin (ship-from) postal code. Required. Formats -> MX: 5-digit codigo postal, e.g. 01000 | CO: 6-digit postal code. IMPORTANT: for Colombia the address city field must be the 8-digit DANE municipal code (Envia requirement), not the city name. | CL: 7-digit postal code, e.g. 8320000 | BR: 8-digit CEP, format NNNNN-NNN, e.g. 01310-100 | GT: 5-digit postal code, e.g. 01001 | AR: 4-digit code or CPA (letter + 4 digits + 3 letters), e.g. C1425 / C1425DFA | US: 5-digit ZIP, e.g. 90001 | CA: 6-char postal code, format A1A1A1, e.g. M5V2T6 | ES: 5-digit postal code, e.g. 28001 |
| origin_phone | string | optional | Origin (ship-from) contact phone. Required. |
| origin_email | string | optional | Origin (ship-from) email. Optional. |
| origin_number | string | optional | Origin (ship-from) street number (if not already in street). Optional. |
| origin_district | string | optional | Origin (ship-from) district / neighbourhood (colonia / bairro). Optional. |
| origin_reference | string | optional | Origin (ship-from) delivery reference / notes (landmark, floor). Optional. |
| destination_name | string | optional | Destination (ship-to) contact full name. Required. |
| destination_street | string | optional | Destination (ship-to) street address (street + number). Required. |
| destination_city | string | optional | Destination (ship-to) city. Required. NOTE: for Colombia (CO) this must be the 8-digit DANE municipal code, not the city name. |
| destination_state | string | optional | Destination (ship-to) state / province code (2-3 chars). Required. |
| destination_postal_code | string | optional | Destination (ship-to) postal code. Required. Formats -> MX: 5-digit codigo postal, e.g. 01000 | CO: 6-digit postal code. IMPORTANT: for Colombia the address city field must be the 8-digit DANE municipal code (Envia requirement), not the city name. | CL: 7-digit postal code, e.g. 8320000 | BR: 8-digit CEP, format NNNNN-NNN, e.g. 01310-100 | GT: 5-digit postal code, e.g. 01001 | AR: 4-digit code or CPA (letter + 4 digits + 3 letters), e.g. C1425 / C1425DFA | US: 5-digit ZIP, e.g. 90001 | CA: 6-char postal code, format A1A1A1, e.g. M5V2T6 | ES: 5-digit postal code, e.g. 28001 |
| destination_phone | string | optional | Destination (ship-to) contact phone. Required. |
| destination_email | string | optional | Destination (ship-to) email. Optional. |
| destination_number | string | optional | Destination (ship-to) street number (if not already in street). Optional. |
| destination_district | string | optional | Destination (ship-to) district / neighbourhood (colonia / bairro). Optional. |
| destination_reference | string | optional | Destination (ship-to) delivery reference / notes (landmark, floor). Optional. |
| packages | array | required | Parcels to ship. At least one. Each: { weight (required, KG), length/width/height (cm — recommended for accurate rates), type? (box|envelope|pallet, default box), content? (what is inside), declaredValue? (goods value in the shipment currency — drives insurance/customs and the owner policy gate), amount? (number of identical packages, default 1) }. |
| currency | string | optional | Quote currency (ISO, e.g. MXN, COP, CLP, BRL, ARS, GTQ, USD, CAD, EUR). Optional — defaults to the destination country currency. |
| carrier | string | optional | Restrict the quote to one carrier code (e.g. "fedex", "dhl", "estafeta"). Optional — omit to compare all available carriers. |
Raw schema
{
"type": "object",
"properties": {
"country": {
"type": "string",
"enum": [
"MX",
"CO",
"CL",
"BR",
"GT",
"AR",
"US",
"CA",
"ES"
],
"description": "Convenience for a DOMESTIC shipment: sets both the origin and destination country. 2-letter ISO code. Supported: MX=Mexico, CO=Colombia, CL=Chile, BR=Brazil, GT=Guatemala, AR=Argentina, US=United States, CA=Canada, ES=Spain. For a cross-border shipment use origin_country + destination_country instead."
},
"origin_country": {
"type": "string",
"enum": [
"MX",
"CO",
"CL",
"BR",
"GT",
"AR",
"US",
"CA",
"ES"
],
"description": "Origin (ship-from) country ISO code. Provide this + destination_country for cross-border, or just `country` for domestic."
},
"destination_country": {
"type": "string",
"enum": [
"MX",
"CO",
"CL",
"BR",
"GT",
"AR",
"US",
"CA",
"ES"
],
"description": "Destination (ship-to) country ISO code. Provide this + origin_country for cross-border, or just `country` for domestic."
},
"origin_name": {
"type": "string",
"description": "Origin (ship-from) contact full name. Required."
},
"origin_street": {
"type": "string",
"description": "Origin (ship-from) street address (street + number). Required."
},
"origin_city": {
"type": "string",
"description": "Origin (ship-from) city. Required. NOTE: for Colombia (CO) this must be the 8-digit DANE municipal code, not the city name."
},
"origin_state": {
"type": "string",
"description": "Origin (ship-from) state / province code (2-3 chars). Required."
},
"origin_postal_code": {
"type": "string",
"description": "Origin (ship-from) postal code. Required. Formats -> MX: 5-digit codigo postal, e.g. 01000 | CO: 6-digit postal code. IMPORTANT: for Colombia the address city field must be the 8-digit DANE municipal code (Envia requirement), not the city name. | CL: 7-digit postal code, e.g. 8320000 | BR: 8-digit CEP, format NNNNN-NNN, e.g. 01310-100 | GT: 5-digit postal code, e.g. 01001 | AR: 4-digit code or CPA (letter + 4 digits + 3 letters), e.g. C1425 / C1425DFA | US: 5-digit ZIP, e.g. 90001 | CA: 6-char postal code, format A1A1A1, e.g. M5V2T6 | ES: 5-digit postal code, e.g. 28001"
},
"origin_phone": {
"type": "string",
"description": "Origin (ship-from) contact phone. Required."
},
"origin_email": {
"type": "string",
"description": "Origin (ship-from) email. Optional."
},
"origin_number": {
"type": "string",
"description": "Origin (ship-from) street number (if not already in street). Optional."
},
"origin_district": {
"type": "string",
"description": "Origin (ship-from) district / neighbourhood (colonia / bairro). Optional."
},
"origin_reference": {
"type": "string",
"description": "Origin (ship-from) delivery reference / notes (landmark, floor). Optional."
},
"destination_name": {
"type": "string",
"description": "Destination (ship-to) contact full name. Required."
},
"destination_street": {
"type": "string",
"description": "Destination (ship-to) street address (street + number). Required."
},
"destination_city": {
"type": "string",
"description": "Destination (ship-to) city. Required. NOTE: for Colombia (CO) this must be the 8-digit DANE municipal code, not the city name."
},
"destination_state": {
"type": "string",
"description": "Destination (ship-to) state / province code (2-3 chars). Required."
},
"destination_postal_code": {
"type": "string",
"description": "Destination (ship-to) postal code. Required. Formats -> MX: 5-digit codigo postal, e.g. 01000 | CO: 6-digit postal code. IMPORTANT: for Colombia the address city field must be the 8-digit DANE municipal code (Envia requirement), not the city name. | CL: 7-digit postal code, e.g. 8320000 | BR: 8-digit CEP, format NNNNN-NNN, e.g. 01310-100 | GT: 5-digit postal code, e.g. 01001 | AR: 4-digit code or CPA (letter + 4 digits + 3 letters), e.g. C1425 / C1425DFA | US: 5-digit ZIP, e.g. 90001 | CA: 6-char postal code, format A1A1A1, e.g. M5V2T6 | ES: 5-digit postal code, e.g. 28001"
},
"destination_phone": {
"type": "string",
"description": "Destination (ship-to) contact phone. Required."
},
"destination_email": {
"type": "string",
"description": "Destination (ship-to) email. Optional."
},
"destination_number": {
"type": "string",
"description": "Destination (ship-to) street number (if not already in street). Optional."
},
"destination_district": {
"type": "string",
"description": "Destination (ship-to) district / neighbourhood (colonia / bairro). Optional."
},
"destination_reference": {
"type": "string",
"description": "Destination (ship-to) delivery reference / notes (landmark, floor). Optional."
},
"packages": {
"type": "array",
"description": "Parcels to ship. At least one. Each: { weight (required, KG), length/width/height (cm — recommended for accurate rates), type? (box|envelope|pallet, default box), content? (what is inside), declaredValue? (goods value in the shipment currency — drives insurance/customs and the owner policy gate), amount? (number of identical packages, default 1) }.",
"items": {
"type": "object",
"properties": {
"weight": {
"type": "number",
"description": "Package weight in KILOGRAMS (kg). Required, > 0."
},
"length": {
"type": "number",
"description": "Length in CENTIMETRES (cm). Recommended."
},
"width": {
"type": "number",
"description": "Width in CENTIMETRES (cm). Recommended."
},
"height": {
"type": "number",
"description": "Height in CENTIMETRES (cm). Recommended."
},
"type": {
"type": "string",
"description": "box | envelope | pallet. Default box."
},
"content": {
"type": "string",
"description": "Description of the contents. Optional (recommended for cross-border customs)."
},
"declaredValue": {
"type": "number",
"description": "Declared goods value in the shipment currency. Optional. Used for insurance/customs and gated by owner policy."
},
"amount": {
"type": "integer",
"minimum": 1,
"description": "Number of identical packages (default 1)."
}
},
"required": [
"weight"
]
}
},
"currency": {
"type": "string",
"description": "Quote currency (ISO, e.g. MXN, COP, CLP, BRL, ARS, GTQ, USD, CAD, EUR). Optional — defaults to the destination country currency."
},
"carrier": {
"type": "string",
"description": "Restrict the quote to one carrier code (e.g. \"fedex\", \"dhl\", \"estafeta\"). Optional — omit to compare all available carriers."
}
},
"required": [
"packages"
]
}