NAV
bash

Info

Welcome to the generated API reference.

general

Get Cities

Need to use Token for this request like this -H "Authorization: Bearer {token}" get cities by using the Region ID

Example request:

curl -X GET \
    -G "http://example.com/api/cities/5" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"

Example response (200):

{
    "success": [
        {
            "id": 11,
            "city_name": "Choapa"
        },
        {
            "id": 12,
            "city_name": "Elqui"
        },
        {
            "id": 13,
            "city_name": "Limarí"
        }
    ]
}

HTTP Request

GET api/cities/{region_id}

URL Parameters

Parameter Status Description
region_id required The ID of the region.

Get Regions

Need to use Token for this request like this -H "Authorization: Bearer {token}"

Example request:

curl -X GET \
    -G "http://example.com/api/regions" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"

Example response (200):

{
    "success": [
        {
            "id": 1,
            "region_name": "Arica y Parinacota"
        },
        {
            "id": 2,
            "region_name": "Tarapacá"
        },
        {
            "id": 3,
            "region_name": "Antofagasta"
        },
        {
            "id": 4,
            "region_name": "Atacama"
        },
        {
            "id": 5,
            "region_name": "Coquimbo"
        }
    ]
}

HTTP Request

GET api/regions

Get Communes

Need to use Token for this request like this -H "Authorization: Bearer {token}" get communes by using the City ID

Example request:

curl -X GET \
    -G "http://example.com/api/communes/11" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"

Example response (200):

{
    "success": [
        {
            "id": 30,
            "communes_name": "Canela"
        },
        {
            "id": 31,
            "communes_name": "Illapel"
        }
    ]
}

HTTP Request

GET api/communes/{city_id}

URL Parameters

Parameter Status Description
city_id required The ID of the region.

Get Properties Types

Need to use Token for this request like this -H "Authorization: Bearer {token}"

Example request:

curl -X GET \
    -G "http://example.com/api/property_type" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"

Example response (200):

{
    "success": [
        {
            "id": 3,
            "property_type_name": "Casa"
        },
        {
            "id": 4,
            "property_type_name": "Departamento"
        }
    ]
}

HTTP Request

GET api/property_type

Get Amenities

Need to use Token for this request like this -H "Authorization: Bearer {token}"

Example request:

curl -X GET \
    -G "http://example.com/api/amenities" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"

Example response (200):

{
    "success": [
        {
            "id": 1,
            "name": "Llave con clave de seguridad",
            "type": 0
        },
        {
            "id": 2,
            "name": "Caja de seguridad",
            "type": 0
        },
        {
            "id": 3,
            "name": "Cubiertos",
            "type": 2
        },
        {
            "id": 4,
            "name": "Frazadas y Cobijas",
            "type": 2
        },
        {
            "id": 5,
            "name": "Kit de limpieza",
            "type": 2
        },
        {
            "id": 6,
            "name": "Kit de limpieza personal",
            "type": 2
        }
    ]
}

HTTP Request

GET api/amenities

Get PropertiesFor

Need to use Token for this request like this -H "Authorization: Bearer {token}"

Example request:

curl -X GET \
    -G "http://example.com/api/property_for" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"

Example response (200):

{
    "success": [
        {
            "id": 13,
            "name": "Soltero"
        },
        {
            "id": 14,
            "name": "Estudiante"
        },
        {
            "id": 15,
            "name": "Familia Sin Hijos"
        },
        {
            "id": 16,
            "name": "Familia Con Hijos"
        },
        {
            "id": 17,
            "name": "Familia Con Mascotas"
        },
        {
            "id": 18,
            "name": "Ejecutivos"
        },
        {
            "id": 19,
            "name": "Grupos +5"
        }
    ]
}

HTTP Request

GET api/property_for

Create Property

Need to use Token for this request like this -H "Authorization: Bearer {token}"

Example request:

curl -X POST \
    "http://example.com/api/save_property" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}" \
    -d '{"user_id":"4","user_role_id":2,"name":"Testing","condition":"0","description":"Condell 114, Limache, Chile","city_id":"11","address":"PortSaid","latitude":-33,"longitude":-71,"garden":"0","meters":100,"pool":"0","private_parking":"1","public_parking":"0","rooms":3,"bathrooms":1,"bedrooms":3,"terrace":"1","cellar":"0","furnished":"1","week_sale":2,"month_sale":3,"minimum_nights":2,"checkin_hour":"9 AM","checkout_hour":"2 PM","warranty_months_quantity":1,"months_advance_quantity":2,"is_project":0,"property_type":"Casa","type_stay":"LONG_STAY","available_date":"2020-02-01","rent":990,"cleaning_rate":200,"number_furnished":2,"furnished_description":"tesst","pet_preference":"1","smoking_allowed":"0","commune_id":"30","property_for_id":"1","cover_image":"qui","photo_spaces":[{image1},{image2}...]", amenities_ids":0,"rent_year_1":162410.969,"rent_year_2":2.611,"rent_year_3":1319.3323,"common_expenses_limit":"explicabo","warranty_ticket_price":"doloremque","term_year":"est","warranty_ticket":"omnis","tenanting_months_quantity":"cum","collateral_require":"asperiores"}'

Example response (200):

{
    "success": {
        "name": "Testing",
        "condition": "0",
        "description": "sdfsdfs",
        "city_id": null,
        "property_type_id": "Casa",
        "address": "dfsdfsdf",
        "latitude": "-33",
        "longitude": "-71",
        "garden": "0",
        "meters": "100",
        "pool": "0",
        "private_parking": "1",
        "public_parking": "0",
        "rooms": "3",
        "bathrooms": "1",
        "bedrooms": "3",
        "terrace": "1",
        "cellar": "0",
        "furnished": "1",
        "week_sale": 2,
        "month_sale": 3,
        "minimum_nights": 2,
        "checkin_hour": 9,
        "checkout_hour": 14,
        "type_stay": "LONG_STAY",
        "warranty_months_quantity": "1",
        "months_advance_quantity": "2",
        "is_project": 0,
        "available_date": "2020-02-01",
        "commune_id": "30",
        "rent": "990",
        "cleaning_rate": "200",
        "number_furnished": "2",
        "furnished_description": "hhhh",
        "pet_preference": "1",
        "smoking_allowed": "0",
        "active": true,
        "status": 0,
        "verified": true,
        "updated_at": "2020-01-27 18:37:21",
        "created_at": "2020-01-27 18:37:21",
        "id": 21
    }
}

Example response (422):

{
    "status": 422,
    "error": {
        "description": [
            "The description field is required."
        ]
    }
}

HTTP Request

POST api/save_property

Body Parameters

Parameter Type Status Description
user_id string required
user_role_id number required 2 (Owner) | 3 (Agent)
name string required
condition string required
description string required
city_id string required
address string required
latitude number optional
longitude number optional
garden string required
meters number required
pool string required
private_parking string required
public_parking string required
rooms number required
bathrooms number required
bedrooms number required
terrace string required
cellar string required
furnished string required
week_sale number optional
month_sale number optional
minimum_nights number required
checkin_hour string required
checkout_hour string required
warranty_months_quantity number optional
months_advance_quantity number optional
is_project number required 0 (for rent) | 1 (for sale)
property_type string required It has to be according to the parameter "is_project"
For rent: Casa | Departamento | Habitación
For sale: Casa | Departamento
type_stay string optional if parameter "is_project" = 0, pass => SHORT_STAY | LONG_STAY
available_date date required
rent number required
cleaning_rate number required
number_furnished number optional
furnished_description string optional
pet_preference string required
smoking_allowed string required
commune_id string required
property_for_id string required
cover_image file required
photo_spaces file required Maximum number of files allowed = 15
Minimum number of files allowed = 1
amenities_ids number optional
rent_year_1 number optional
rent_year_2 number optional
rent_year_3 number optional
common_expenses_limit string optional
warranty_ticket_price string optional
term_year string optional
warranty_ticket string optional
tenanting_months_quantity string optional
collateral_require string optional