# Countries

To get the list of all the countries supported by Wasi you must use the URI:

api.wasi.co/v1/location/all-countries

This should return a JSON similar to the following:

{
    "0": {
        "id_country": "1",
        "name": "Colombia",
        "iso": "CO"
    },
    "1": {
        "id_country": "5",
        "name": "Argentina",
        "iso": "AR"
    },
    "2": {
        "id_country": "9",
        "name": "Belgica",
        "iso": "BE"
    },
    "status": "success"
}

Additionally to obtain the amount of Active or Featured properties in the system we can add the variables quantity, id_property_type, for_sale, for_rent, for_transfer, and scope:

Name Type
quantity Boolean Boolean value (true or false) to obtain the quantity of real estate.
id_property_type Number Property type identifier, see Property types.
for_sale Boolean Boolean value (true or false) which indicates whether the properties are available for sale or not.
for_rent Boolean Boolean value (true or false) which indicates whether the properties are available for rent (hire, lease) or not.
for_transfer Boolean Boolean value (true or false) which indicates if the property is available for exchange.
scope Number Indicates if the quantity is obtained by counting the own or allied properties, see scope

# Scope

Value Represents
1 Private, only properties created by the company count.
2 Allies, only active properties of allied companies count.
3 All, counts private properties and active properties of allied companies. (default option)
4 Group, only active properties in groups are counted.

If you want to see the amounts in general for this example, it would look like this:

api.wasi.co/v1/location/all-countries?quantity=true

If you want to see specifically how many houses there are (Code 1 for Houses) for this example it would look like this:

api.wasi.co/v1/location/all-countries?quantity=true&id_property_type=1

If you want to see specifically how many houses there are (Code 1 for Houses) that are for sale, for this example it would look like this:

api.wasi.co/v1/location/all-countries?quantity=true&id_property_type=1&for_sale=true

All the above cases should return a JSON similar to the following:

{
    "0": {
        "id_country": "1",
        "name": "Colombia",
        "iso": "CO",
        "quantity": 102
    },
    "1": {
        "id_country": "5",
        "name": "Argentina",
        "iso": "AR",
        "quantity": 13
    },
    "2": {
        "id_country": "9",
        "name": "Belgica",
        "iso": "BE",
        "quantity": 0
    },
    "status": "success"
}

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

api.wasi.co/v1/location/country/#id_country

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

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

And you get the answer:

{
    "id_country": "1",
    "name": "Colombia",
    "iso": "CO",
    "status": "success"
}

As with the previous example to obtain the amount of Active or Featured properties in the system we can add the variables quantity (boolean), id_property_type (see Property Types), for_sale (boolean), for_rent (boolean), for_transfer (boolean) and scope (number).

If you want to see the quantities in general for this example it would look like this:

api.wasi.co/v1/location/country/1?quantity=true

If you want to see specifically how many houses there are (Code 1 for Houses) for this example it would look like this:

api.wasi.co/v1/location/country/1?quantity=true&id_property_type=1

If you want to see specifically how many houses there are (Code 1 for Houses) that are for sale, for this example it would look like this:

api.wasi.co/v1/location/country/1?quantity=true&id_property_type=1&for_sale=true

If you want to see specifically how many properties are active that are from partner companies, for this example it would look like this:

api.wasi.co/v1/location/country/1?quantity=true&scope=2

All cases should return a JSON similar to the following:

{
    "id_country": "1",
    "name": "Colombia",
    "iso": "CO",
    "quantity": 102,
    "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