This endpoint is used to suggest location (state, city, province, district,...), project (as Vinhomes, TimeCitys,...), streets (as Cau Giay, Giai Phong,...), and rooms base on term user typed.
| Method | URI | Headers |
|---|---|---|
| GET | /api/search/suggestion | Accept: application/json Accept-Language: <language> |
| Param | Description | Type | Required |
|---|---|---|---|
| query | Term search. | String | Yes |
Example request
curl -X POST \
'https://api.luxstay.com/api/search/suggestion?page=1' \
-H 'Accept: application/json' \
-H 'Accept-Language: en' \
-H 'Mobile-Client: android' \
-H 'cache-control: no-cache' \
-d query=hanoi
Example response
{
"data": {
"country": [
],
"state": [
{
"id": 352,
"display_text": "Ha\u0300 N\u00f4\u0323i, Vietnam",
"type": "state",
"count": 1270,
"name": "H\u00e0 N\u1ed9i",
"path": "vietnam\/ha-noi"
}
],
"city": [
],
"area": [
],
"room": [
{
"id": 13671,
"display_text": "Bungalow Room 3 apartment - T\u1ea3n \u0110\u00e0 Spa Resort",
"type": "Rooms",
"count": 0
},
{
"id": 13674,
"display_text": "Bungalow 1 ph\u00f2ng - T\u1ea3n \u0110\u00e0 Spa Resort",
"type": "Rooms",
"count": 0
},
{
"id": 13678,
"display_text": "Family Room Lake View - T\u1ea3n \u0110\u00e0 Spa Resort",
"type": "Rooms",
"count": 0
},
{
"id": 17109,
"display_text": "V\u01b0\u1eddn Qu\u1ea3 Villa",
"type": "Rooms",
"count": 0
},
{
"id": 13675,
"display_text": "Lake view Executive Suite 02 - T\u1ea3n \u0110\u00e0 Spa Resort",
"type": "Rooms",
"count": 0
},
{
"id": 13670,
"display_text": "Manor House - T\u1ea3n \u0110\u00e0 Spa Resort",
"type": "Rooms",
"count": 0
}
],
"destination": [
]
},
"code": 200,
"request_id": "14891298-9b01-4058-9c15-53cc17b1e53a"
}
Reason validation errors
Example response
{
"message": "The given data was invalid.",
"errors": {
"name": [
"The query field is required."
]
}
}