Overview
This is the Enjoys API built on AdonisJS. Use the endpoints below to interact with reservations, reports, and front-office features.
Base URL: https://api.enjoy-stay.com
Authentication
Most endpoints require authentication with a Bearer token in the
Authorization header.
Authorization: Bearer <YOUR_TOKEN>
Login
POST https://api.enjoy-stay.com/api/authLogin
curl -X POST "https://api.enjoy-stay.com/api/authLogin" \
-H "Content-Type: application/json" \
-d '{
"email": "admin@example.com",
"password": "Password123"
}'
Get Current User
GET https://api.enjoy-stay.com/api/auth
curl -X GET "https://api.enjoy-stay.com/api/auth" \
-H "Authorization: Bearer YOUR_TOKEN"
Logout
POST https://api.enjoy-stay.com/api/authLogout
curl -X POST "https://api.enjoy-stay.com/api/authLogout" \
-H "Authorization: Bearer YOUR_TOKEN"
Basic Health
GET https://api.enjoy-stay.com/ping
curl -X GET "https://api.enjoy-stay.com/ping"
Front Office
In-House Reservations
GET https://api.enjoy-stay.com/api/reports/front-office/inhouse-guests
- Lists in-house reservations (checked-in rooms)
- Query params:
hotelId(required),roomId,roomTypeId
curl -X GET "https://api.enjoy-stay.com/api/reports/front-office/inhouse-guests?hotelId=1" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"
Occupied Rooms
GET https://api.enjoy-stay.com/api/reports/front-office/occupied-rooms
- Lists occupied rooms with rate type
- Query params:
hotelId(required),roomTypeId
curl -X GET "https://api.enjoy-stay.com/api/reports/front-office/occupied-rooms?hotelId=1" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"
Swagger
For the complete list of routes and schemas, use Swagger UI.
GET https://api.enjoy-stay.com/swagger
open https://api.enjoy-stay.com/swagger
Quick Tests (Node.js)
Run this snippet with node (requires Node 18+ or node-fetch).
const token = process.env.ENJOYS_TOKEN || 'YOUR_TOKEN'
const baseUrl = 'https://api.enjoy-stay.com'
async function testInHouse() {
const res = await fetch(baseUrl + '/api/reports/front-office/inhouse-guests?hotelId=1', {
headers: { Authorization: 'Bearer ' + token }
})
const data = await res.json()
console.log('In-House:', data)
}
async function testOccupiedRooms() {
const res = await fetch(baseUrl + '/api/reports/front-office/occupied-rooms?hotelId=1', {
headers: { Authorization: 'Bearer ' + token }
})
const data = await res.json()
console.log('Occupied Rooms:', data)
}
testInHouse().then(testOccupiedRooms)
Notes
- Use actual
hotelId,roomId, androomTypeIdfrom your data. - Both endpoints filter rooms with status
checked_in. - If you encounter authentication errors, ensure your token is valid and not expired.