Shipping to Colombia

Ship to Colombia with the DANE municipal code, which takes the place of the postal code.

Colombia has no postal code: carriers route on the DANE municipal code, an eight-digit number. It goes in city, and postalCode still has to be present.

At a glance

Postal codeNot used, but required. Send 000
DepartmentA code from the catalog, in state. Bogotá is DC
CityThe eight-digit DANE code, such as 11001000 for Bogotá. Not the name
House numberInside street: Carrera 7 # 71-21. Send "number": "S/N"
Tax IDNIT or cédula, in identificationNumber, on both origin and destination
CurrencyQuote in COP. The label is charged in your account's currency
In sandboxFedEx runs the full cycle

What an address to Colombia needs

What the label call needs, field by field. Where the address form (GET /generic-form?country_code=CO&form=address_info) differs, the table says so:

FieldRequiredWhat goes in it
streetyesCarrera 7 # 71-21 — the house number travels inside the street
numberyes, for the labelThe form has no such field, but the label requires it. Send S/N; the apartment goes in reference
stateyesA department code from the catalog — AN, DC. Never the name
cityyesThe eight-digit DANE code — 11001000, not Bogotá
postalCodeyesRequired by the API, although the form hides it. Its value is not used — see step 3
identificationNumberyesNIT or cédula, on both origin and destination. The form marks it optional
referencenoFree text for the carrier

In Colombia, city is a code from a catalog, not free text. Guatemala is the only other country that works this way.

Step 1 — The department code

API reference → Get states by country

curl https://queries.envia.com/state?country_code=CO

No token needed.

Bogotá is DC. The catalog lists it twice, as Bogotá and Bogotá DC; both are the same place. If you saved addresses before 2026-11-12, check for Distrito Especial de Bogotá under CN: CN is Cundinamarca, the department around Bogotá. Change those to DC.

All 34 departments and their codes
SendAlso in the catalogName
AMAMAAmazonas
ANANTAntioquia
ARARAArauca
ATATLAtlantico
DCDCBogotá
DCDCBogotá DC
BLBOLBolívar
BYBOYBoyacá
CLCALCaldas
CACAQCaqueta
CSCASCasanare
CUCAUCauca
CECESCesar
CHCHOChoco
COCORCordoba
CNCUNCundinamarca
GUGUAGuainia
GAGUVGuaviare
HUHUIHuila
LGLAGLa Guajira
MAMAGMagdalena
MEMETMeta
NANARNarino
NSNSANorte de Santander
PUPUTPutumayo
QUQUIQuindio
RIRISRisaralda
SASAPSan Andres y Providencia
SNSANSantander
SUSUCSucre
TOTOLTolima
VCVACValle del Cauca
VAVAUVaupes
VIVIDVichada

Repeated codes. DC appears twice, as Bogotá and Bogotá DC.

The list comes from GET /state?country_code=CO.

Step 2 — The municipality and its DANE code

API reference → Locate a city within a state

Use /locate, which takes the country in the path and therefore cannot answer with the wrong one:

curl https://geocodes.envia.com/locate/CO/AN/Medellin
[{ "country": { "code": "CO" },
   "state":   { "name": "Antioquia", "code": { "2digit": "AN", "3digit": "ANT" } },
   "zip_codes": [{ "zip_code": "050001",
                   "locality": "Medellín",
                   "suburbs": ["05001000"] }] }]

Two different numbers come back and they are not interchangeable:

FieldWhat it is
zip_codeThe real six-digit Colombian postal code — 050001
suburbs[0]The eight-digit DANE code — 05001000. This is what the domestic carriers route on

Bogotá is 11001000, Medellín 05001000, Cali 76001000. Always pass the state: without it, /locate/CO/Medellin returns three Medellíns — in Antioquia, Cauca and Córdoba — with an empty suburbs. The code is also in info.stat_8digit.

Do not use GET /provinces/{state_code} for Colombia. It searches every country at once, and 8 of the 33 department codes return another country's places: AM returns Amazonas, Brazil, and CA returns Canelones, Uruguay. GET /locate/CO/... works for all 33.

Step 3 — The DANE code goes in city

Send the DANE code in city, not the name:

"city": "11001000"

With a name, Servientrega answers:

1126  No se ha encontrado el Codigo DANE de la Ciudad Origen

What each combination returns:

citypostalCodeResult
BOGOTA11001000fails — 1126
BOGOTA110111 (the real postal code)fails — 1126
1100100011001000quotes
11001000110111quotes
11001000000quotes

postalCode must be present, with at least three characters, but its value is not used. Without it, no carrier quotes:

{ "meta": "error",
  "error": { "code": 400, "message": "Required property missing: postalCode" } }

Send the correct department in state too. The quote does not check it, but it is printed on the label.

A complete address

{
  "name": "Andrés Gómez",
  "email": "[email protected]",
  "phone": "+57 300 000 0000",
  "street": "Carrera 7 # 71-21",
  "number": "S/N",
  "city": "11001000",
  "state": "DC",
  "postalCode": "11001000",
  "country": "CO",
  "identificationNumber": "900123456",
  "reference": "Apto 501, torre B, portería"
}

city is the DANE code, and identificationNumber is the NIT or cédula.

What each carrier does with it

In sandbox, Medellín → Bogotá, one carrier at a time, with the address above:

CarrierWith the DANE code in cityWith a city name in city
FedExQuotes, and completes the whole cycle — below1220 Impossible obtain the postal code of the country
DHLQuotes1220, the same
ServientregaQuotes, in real COP1126 No se ha encontrado el Código DANE de la Ciudad Destino
interRapidísimoQuotesQuotes — see the warning below
TCC1301 — no tariff for that lane. A coverage answer, not an address problem
Coordinadora900 — not enabled for rate on this account

Every carrier that checks the address needs the DANE code in city. They report a city name with different codes: 1126 from Servientrega, 1220 from FedEx and DHL. The value in postalCode makes no difference to any of them.

Ship it, end to end

One shipment from start to finish: Medellín → Bogotá, with FedEx. 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/CO/0/1 \
  --header "Authorization: Bearer $ENVIA_TOKEN"

CO/0/1 reads: from Colombia, 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 Medellín",
      "company": "Tienda Demo",
      "email": "[email protected]",
      "phone": "+57 604 000 0000",
      "street": "Calle 10 # 43-12",
      "number": "S/N",
      "city": "05001000",
      "state": "AN",
      "postalCode": "05001000",
      "country": "CO",
      "identificationNumber": "900123456"
    },
    "destination": {
      "name": "Andrés Gómez",
      "email": "[email protected]",
      "phone": "+57 300 000 0000",
      "street": "Carrera 7 # 71-21",
      "number": "S/N",
      "city": "11001000",
      "state": "DC",
      "postalCode": "11001000",
      "country": "CO",
      "identificationNumber": "900123456",
      "reference": "Apto 501, torre B, porterí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": "fedex",
      "type": 1
    },
    "settings": {
      "currency": "COP"
    }
  }'

shipment.carrier takes one carrier per request; call it once per carrier to compare. Prices come back in settings.currency.

{
  "meta": "rate",
  "data": [
    {
      "carrier": "fedex",
      "service": "ground",
      "serviceDescription": "FedEx Ground®",
      "deliveryEstimate": "2-4 días",
      "totalPrice": 3548.21,
      "currency": "COP"
    }
  ]
}

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 Medellín",
      "company": "Tienda Demo",
      "email": "[email protected]",
      "phone": "+57 604 000 0000",
      "street": "Calle 10 # 43-12",
      "number": "S/N",
      "city": "05001000",
      "state": "AN",
      "postalCode": "05001000",
      "country": "CO",
      "identificationNumber": "900123456"
    },
    "destination": {
      "name": "Andrés Gómez",
      "email": "[email protected]",
      "phone": "+57 300 000 0000",
      "street": "Carrera 7 # 71-21",
      "number": "S/N",
      "city": "11001000",
      "state": "DC",
      "postalCode": "11001000",
      "country": "CO",
      "identificationNumber": "900123456",
      "reference": "Apto 501, torre B, porterí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": "fedex",
      "service": "ground",
      "type": 1
    },
    "settings": {
      "currency": "COP",
      "printFormat": "PDF",
      "printSize": "STOCK_4X6"
    }
  }'
{
  "meta": "generate",
  "data": [
    {
      "carrier": "fedex",
      "service": "ground",
      "trackingNumber": "7000000001",
      "trackUrl": "https://test.envia.com/rastreo?label=7000000001&cntry_code=co",
      "label": "https://…/fedex/7000000001.pdf",
      "totalPrice": 17.13,
      "currency": "MXN"
    }
  ]
}

The label is charged in your account's currency. The quote above is COP 3,548.21; a Mexican account is charged MXN 17.13.

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": "fedex",
    "trackingNumber": "7000000001"
  }'

The response includes refundedAmount and balanceReturned: the charge returns to your balance.

International, into and out of Colombia

A shipment that crosses the Colombian border is an ordinary international shipment: see International Shipping & Customs.

Send identificationNumber on both origin and destination, as in Brazil. The address form marks it optional, but Envia's own integrations always send it for Colombia, and without it a carrier can refuse the label after you have charged the buyer. Use the API's spelling: the API ignores identification_number.

For FedEx and DHL out of Colombia, 1220 means the same as at home: city holds a name instead of the DANE code.

Testing in sandbox

Which Colombian carriers work in sandbox
  • FedEx runs the full cycle with the DANE code in city.
  • Servientrega and DHL quote. Servientrega quotes in real COP and checks the DANE code, so it is the one to test your addresses against.
  • interRapidísimo returns rates for any address, priced in MXN even when you ask for COP. A rate from it does not mean the address is right.
  • trackUrl opens 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


Did this page help you?