ScraperGet List Hotel

Get List Hotel

Get All List Hotel by User Id

Endpoint

Base URL
http://localhost:5000
Method and Endpoint
GET /api/users/current/listhotel
Headers
Authorization: Bearer access_token

Query Param

page : string (optional, default 1)

Responses

You will get responses like this:

Pagination

  • page : The current page
  • limit: Return a maximum of 10 hotels per page.
  • total : Total item in the page
  • totalPages : Number of the page on pagination

Responses

You will get responses like this:

200 (success)

Response Body
{
  "message": "Get Hotels Successfully",
  "data": [
    {
      "title": "Hotel Grand Central",
      "addr": "Jl. Merdeka No. 1, Jakarta",
      "originalPrice": "Rp 1.200.000",
      "price": "Rp 950.000",
      "rate": "8.5",
      "review": "150",
      "image": "https://example.com/image1.jpg"
    },
    {
      "title": "The Luxury Hotel",
      "addr": "Jl. Sudirman No. 10, Jakarta",
      "originalPrice": "Rp 2.500.000",
      "price": "Rp 2.100.000",
      "rate": "9.0",
      "review": "200",
      "image": "https://example.com/image2.jpg"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 2,
    "totalPages": 1
  }
}

401 (Unauthorized)

Response Body
{
  "message": "Unauthorized"
}

500 (server error)

Response Body
{
  "message": "Internal server error"
}