# Regions

In the Wasi API the general term region refers to the Departments, States, Provinces and other denominations of the divisions of a country.

❗️ Note

The API calls in this section also support the variables quantity (boolean), id_property_type (see Property Types), for_sale (boolean), for_rent (boolean), for_transfer (boolean) and scope (number), for an example of this, see the Countries section.

To obtain information about all the regions of a specific country knowing its id, we have the general URI:

api.wasi.co/v1/location/regions-from-country/#id_country

For example for Colombia the id_country is 1, so the URI would be:

api.wasi.co/v1/location/regions-from-country/1

This should return a JSON similar to the following:

{
    "0": {
        "region_id": "1",
        "name": "Amazon",
        "id_country": "1"
    },
    "1": {
        "region_id": "2",
        "name": "Antioquia",
        "id_country": "1"
    },
    "2": {
        "region_id": "3",
        "name": "Arauca",
        "id_country": "1"
    },
    "status": "success"
}

To obtain information about a specific region by knowing its id, you have the general URI:

api.wasi.co/v1/location/region/#id_region

For example for Amazon the id_region is 1, so the URI would be:

api.wasi.co/v1/location/region/1

And the answer will come:

{
    "id_region": "1",
    "name": "Amazon",
    "id_country": "1",
    "status": "success"
}

❗ ️ Important

For all requests it is necessary to send credentials, for more information you can visit the section of Getting Started.

Last Updated: 8/3/2020, 9:51:52 PM