Search Destination
To get the data in the specified collection. If no parameters are passed, it lists all of them. Otherwise, it lists the documents in the collection matching the specified parameters:
Method : GET
URL : /api/destination?q=bali
Response : 200 - OK
[
{
"id": 1,
"name": "Kintamani: Bali's Scenic Gem",
"slug": "kintamani-balis-scenic-gem",
"image_url": "https://www.indonesia.travel/content/dam/indtravelrevamp/en/destinations/revision-2019/all-revision-destination/bali-nusa-tenggara/Kintamani.jpg",
"description": "Explore the scenic gem of Kintamani in Bali. Marvel at Mount Batur's beauty, serene Lake Batur, and captivating volcanic landscapes",
"location": "Kintamani, Bali",
"vacation_island": {
"id": 2,
"name": "Bali",
"slug": "bali"
},
"vacation_province": {
"id": 15,
"name": "Bali",
"slug": "bali"
}
},
{
"id": 2,
"name": "Bali",
"slug": "bali",
"image_url": "https://www.indonesia.travel/content/dam/indtravelrevamp/en/destinations/revisi-2020/destinations-thumbnail/Bali-Thumbnail.jpg",
"description": "Bali is also known as the Land of the Gods with dramatic dances and colorful ceremonies, to its luxurious beach resorts with exciting nightlife and famous for surfersβ paradise.",
"location": "Bali, Indonesia",
"vacation_island": {
"id": 2,
"name": "Bali",
"slug": "bali"
},
"vacation_province": {
"id": 15,
"name": "Bali",
"slug": "bali"
}
}
]
URL : /api/destination?q=notfoundquery
Response : 200 - OK
[]
Response : 404 - Not Found
Not Found
Response : 500 - Server Error
Internal Server Error