Obtain the geographical information for the Deceval endpoints

The Deceval API endpoints require geographical fields in multiple inputs, luckily, Apitude has 3 endpoints to obtain the eligible values.

Description

The geographical fields required by the Deceval REST API endpoints should match the ones in the DANE (The National Administrative Department of Statistics) database for countries, states and cities. Only these values are eligible to be used in the endpoints.

Obtaining the list of countries from DANE

Using your favorite programming language and libraries, make the following GET request.

The endpoint will return a response like this

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "name": "COLOMBIA",
            "name_no_accents": "COLOMBIA"
        }
    ]
}
                
Ok, but what does each field in that JSON means?

  • count: This field has the number of records returned from the query.
  • next: This field contains the URL of the next page of results.
  • previous: This field contains the URL of the previous page of results.
  • results: This field contains an array of countries returned from the query.
  • name: This field contains the name of the country including accents.
  • name_no_accents: This field contains the name of the country without including accents. This is the value that the API receives as a valid parameter.

Obtaining the list of states/counties from DANE

Using your favorite programming language and libraries, make the following GET request.

The endpoint will return a response like this

{
    "count": 33,
    "next": "https://apitude.co/iou/deceval-co/dane-states/?page=2",
    "previous": null,
    "results": [
        {
            "name": "AMAZONAS",
            "name_no_accents": "AMAZONAS"
        },
        {
            "name": "ANTIOQUIA",
            "name_no_accents": "ANTIOQUIA"
        },
        {
            "name": "ARAUCA",
            "name_no_accents": "ARAUCA"
        },
        {
            "name": "ARCHIPIÉLAGO DE SAN ANDRÉS, PROVIDENCIA Y SANTA CATALINA",
            "name_no_accents": "ARCHIPIELAGO DE SAN ANDRES, PROVIDENCIA Y SANTA CATALINA"
        },
        {
            "name": "ATLÁNTICO",
            "name_no_accents": "ATLANTICO"
        },
        {
            "name": "BOGOTÁ",
            "name_no_accents": "BOGOTA"
        },
        {
            "name": "BOLÍVAR",
            "name_no_accents": "BOLIVAR"
        },
        {
            "name": "BOYACÁ",
            "name_no_accents": "BOYACA"
        },
        {
            "name": "CALDAS",
            "name_no_accents": "CALDAS"
        },
        {
            "name": "CAQUETÁ",
            "name_no_accents": "CAQUETA"
        }
    ]
}
                
Ok, but what does each field in that JSON means?

  • count: This field has the number of records returned from the query.
  • next: This field contains the URL of the next page of results.
  • previous: This field contains the URL of the previous page of results.
  • results: This field contains an array of states/counties returned from the query.
  • name: This field contains the name of the state/county including accents.
  • name_no_accents: This field contains the name of the state/county without including accents. This is the value that the API receives as a valid parameter.

Obtaining the list of cities from DANE

Using your favorite programming language and libraries, make the following GET request.

The endpoint will return a response like this

{
    "count": 1122,
    "next": "https://apitude.co/iou/deceval-co/dane-cities/?page=2",
    "previous": null,
    "results": [
        {
            "name": "ABEJORRAL",
            "name_no_accents": "ABEJORRAL"
        },
        {
            "name": "ABREGO",
            "name_no_accents": "ABREGO"
        },
        {
            "name": "ABRIAQUÍ",
            "name_no_accents": "ABRIAQUI"
        },
        {
            "name": "ACACÍAS",
            "name_no_accents": "ACACIAS"
        },
        {
            "name": "ACANDÍ",
            "name_no_accents": "ACANDI"
        },
        {
            "name": "ACEVEDO",
            "name_no_accents": "ACEVEDO"
        },
        {
            "name": "ACHÍ",
            "name_no_accents": "ACHI"
        },
        {
            "name": "AGRADO",
            "name_no_accents": "AGRADO"
        },
        {
            "name": "AGUA DE DIOS",
            "name_no_accents": "AGUA DE DIOS"
        },
        {
            "name": "AGUACHICA",
            "name_no_accents": "AGUACHICA"
        }
    ]
}
                
Ok, but what does each field in that JSON means?

  • count: This field has the number of records returned from the query.
  • next: This field contains the URL of the next page of results.
  • previous: This field contains the URL of the previous page of results.
  • results: This field contains an array of cities returned from the query.
  • name: This field contains the name of the city including accents.
  • name_no_accents: This field contains the name of the city without including accents. This is the value that the API receives as a valid parameter.

Want to start using this service?