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"
]
}
},
"carrier": {
"type": "string",
"description": "Carrier code to buy, from a quote_rates result (its \"carrier\"), e.g. \"fedex\", \"dhl\", \"estafeta\", \"chilexpress\", \"correios\". Required."
},
"service": {
"type": "string",
"description": "Carrier service code to buy, from the same quote_rates option (its \"service\"). Required."
},
"currency": {
"type": "string",
"description": "Label currency (ISO). Optional โ defaults to the destination country currency."
},
"print_format": {
"type": "string",
"description": "Label file format: PDF (default) | PNG | ZPL | ZPLII | EPL."
},
"reference": {
"type": "string",
"description": "Your own order reference (any string). Optional."
}
},
"required": [
"packages",
"carrier",
"service"
]
}