Shipping to Chile
Ship to Chile: a region code, the commune as free text, and no postal code.
Chile has no postal code, so the postal code cannot fill in the city and region for you. An address needs a region code from the catalog, the commune as free text, and 000 in postalCode.
At a glance
| Postal code | None. Send 000: postalCode is required in every country |
| Region | A two-letter code from the catalog, in state. Santiago is RM |
| City | The commune, as free text: Las Condes, Providencia |
| House number | number, required to create a label |
| Tax ID | The RUT, in identificationNumber. Optional |
| Currency | Quote in CLP. The label is charged in your account's currency |
| In sandbox | DHL runs the full cycle |
What an address to Chile needs
| Field | Required | What goes in it |
|---|---|---|
street | ● | The street name — Av. Apoquindo |
state | ● | A two-letter region code from the catalog, not the name |
city | ● | The commune, as free text |
number | yes | The street number — 4500. Required to create a label, although the address form marks it optional |
district | ○ | Neighbourhood |
identificationNumber | ○ | The RUT, if you have it |
reference | ○ | Directions for the driver |
postalCode | yes | Chile has no postal code, but the API requires the field. Send 000 |
These are the Shipping API's field names. Send the RUT as identificationNumber: the API ignores identification_number, the name the address form uses.
Step 1 — Get the region code
API reference → Get states by country
curl https://queries.envia.com/state?country_code=CLNo token needed. The response lists the 16 regions:
{
"data": [
{ "name": "Antofagasta", "code_2_digits": "AN", "code_3_digits": null, "country_code": "CL" },
{ "name": "Araucania", "code_2_digits": "AR", "code_3_digits": null, "country_code": "CL" }
]
}Send code_2_digits in state, and always take it from the catalog. The API checks only the code's length, so a made-up code can still get a quote, and the shipment fails later.
Match on the code, not the name: the catalog writes some names without accents, such as Araucania.
All 16 regions and their codes
| Code | Name |
|---|---|
AN | Antofagasta |
AR | Araucania |
AP | Arica y Parinacota |
AT | Atacama |
AI | Aysen |
BI | Bio-Bio |
CO | Coquimbo |
LI | Libertador General Bernardo O'Higgins |
LL | Los Lagos |
LR | Los Rios |
MA | Magallanes y la Antartica Chilena |
ML | Maule |
RM | Region Metropolitana |
TA | Tarapacá |
VS | Valparaiso |
NB | Ñuble |
The list comes from GET /state?country_code=CL.
Step 2 — Type the city
Chile has no city catalog. Send the commune as free text — Las Condes, Providencia, Viña del Mar — up to 50 characters.
Do not use
GET /provinces/{state_code}for Chile. It searches every country at once, so a Chilean region code returns another country's municipalities —ANreturns Antioquia, Colombia — or an empty list. Chile's city is free text and needs no lookup.
A complete address
{
"name": "Camila Rojas",
"email": "[email protected]",
"phone": "+56 2 0000 0000",
"street": "Av. Apoquindo",
"number": "4500",
"city": "Las Condes",
"state": "RM",
"postalCode": "000",
"country": "CL",
"reference": "Depto 1201, edificio azul, conserjería"
}Send
"postalCode": "000". The API requirespostalCodein every country, and Chile has none. Without it, the request fails withRequired property missing: postalCode. The same applies to Colombia, Guatemala, Peru and Hong Kong.
Ship it, end to end
One shipment from start to finish: Valparaíso → Las Condes, Santiago, with DHL. Every request runs as written in sandbox, with the address above as the destination; only the tracking number is a placeholder.
Find the carriers that serve the lane
API reference → Get Carriers With Services
curl https://queries.test.envia.com/available-carrier/CL/0/1 \
--header "Authorization: Bearer $ENVIA_TOKEN"CL/0/1 reads: from Chile, domestic (0), parcel (1). Each carrier comes with the services you can pass when you create the label.
Quote
API reference → Get Shipping Rates
curl --request POST \
--url https://api-test.envia.com/ship/rate/ \
--header "Authorization: Bearer $ENVIA_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"origin": {
"name": "Bodega Valparaíso",
"company": "Tienda Demo",
"email": "[email protected]",
"phone": "+56 32 200 0000",
"street": "Av. Brasil",
"number": "2950",
"city": "Valparaíso",
"state": "VS",
"postalCode": "000",
"country": "CL"
},
"destination": {
"name": "Camila Rojas",
"email": "[email protected]",
"phone": "+56 2 0000 0000",
"street": "Av. Apoquindo",
"number": "4500",
"city": "Las Condes",
"state": "RM",
"postalCode": "000",
"country": "CL",
"reference": "Depto 1201, edificio azul, conserjería"
},
"packages": [
{
"content": "Ropa",
"amount": 1,
"type": "box",
"weight": 1,
"insurance": 0,
"declaredValue": 0,
"weightUnit": "KG",
"lengthUnit": "CM",
"dimensions": {
"length": 20,
"width": 20,
"height": 10
}
}
],
"shipment": {
"carrier": "dhl",
"type": 1
},
"settings": {
"currency": "CLP"
}
}'shipment.carrier takes one carrier per request; call it once per carrier to compare. Prices come back in settings.currency.
{
"meta": "rate",
"data": [
{
"carrier": "dhl",
"service": "express",
"serviceDescription": "DHL Express Domestic",
"deliveryEstimate": "1-2 días",
"totalPrice": 19132.38,
"currency": "CLP"
}
]
}deliveryEstimate is text for a person, in Spanish as the carrier sends it. Show it as is.
Create the label
API reference → Generate a Shipping Label
curl --request POST \
--url https://api-test.envia.com/ship/generate/ \
--header "Authorization: Bearer $ENVIA_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"origin": {
"name": "Bodega Valparaíso",
"company": "Tienda Demo",
"email": "[email protected]",
"phone": "+56 32 200 0000",
"street": "Av. Brasil",
"number": "2950",
"city": "Valparaíso",
"state": "VS",
"postalCode": "000",
"country": "CL"
},
"destination": {
"name": "Camila Rojas",
"email": "[email protected]",
"phone": "+56 2 0000 0000",
"street": "Av. Apoquindo",
"number": "4500",
"city": "Las Condes",
"state": "RM",
"postalCode": "000",
"country": "CL",
"reference": "Depto 1201, edificio azul, conserjería"
},
"packages": [
{
"content": "Ropa",
"amount": 1,
"type": "box",
"weight": 1,
"insurance": 0,
"declaredValue": 0,
"weightUnit": "KG",
"lengthUnit": "CM",
"dimensions": {
"length": 20,
"width": 20,
"height": 10
}
}
],
"shipment": {
"carrier": "dhl",
"service": "express",
"type": 1
},
"settings": {
"currency": "CLP",
"printFormat": "PDF",
"printSize": "STOCK_4X6"
}
}'{
"meta": "generate",
"data": [
{
"carrier": "dhl",
"service": "express",
"trackingNumber": "7000000001",
"trackUrl": "https://envia.com/rastreo?label=7000000001&cntry_code=cl",
"label": "https://…/dhl/7000000001.pdf",
"totalPrice": 371.25,
"currency": "MXN"
}
]
}The label is charged in your account's currency. The quote above is CLP 19,132.38; a Mexican account is charged MXN 371.25.
label is the PDF to print. This is the one the request above returns in sandbox, which DHL marks SAMPLE:

The address prints as you sent it: the reference goes under the street, and the postal code prints as 000.
Track it
API reference → Track Shipments
curl --request POST \
--url https://api-test.envia.com/ship/generaltrack/ \
--header "Authorization: Bearer $ENVIA_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"trackingNumbers": [
"7000000001"
]
}'A label you just created answers "status": "Created". For anything at volume, subscribe to webhooks instead of polling.
Cancel it, if it does not ship
API reference → Cancel a Shipment
curl --request POST \
--url https://api-test.envia.com/ship/cancel/ \
--header "Authorization: Bearer $ENVIA_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"carrier": "dhl",
"trackingNumber": "7000000001"
}'The response includes refundedAmount and balanceReturned: the charge returns to your balance.
International, into and out of Chile
A shipment that crosses the Chilean border is an ordinary international shipment: see International Shipping & Customs. The RUT in identificationNumber stays optional, unlike Brazil, where the tax ID is required.
Testing in sandbox
Which Chilean carriers work in sandbox
- DHL runs the full cycle: quote, label, track and cancel.
- Starken and Blue Express quote, but cannot create labels.
- Chilexpress does not quote.
- Correos Chile returns an error page instead of JSON.
trackUrlopens a tracking page that does not know sandbox shipments. It works for labels created in production.
In production you use the carriers enabled on your account.
Next steps
Ship to Colombia with the DANE municipal code, which takes the place of the postal code.
Crossing a border adds three things: a declaration of the contents, a code that classifies them, and who pays the duties.
What an address needs in each country, where each value comes from, and five rules that apply everywhere.
Updated 18 days ago