API Reference · v1

Hostela REST API

A clean, predictable JSON API for every part of your hostel. All endpoints are production-ready and versioned.

Base URL

https://api.hostela.app

Auth

Bearer token (per workspace)

Format

JSON · rate limited 1k/min

Rooms

GET/v1/rooms

List rooms with filters (type, status, page).

{
  "data": [{ "id": "r1", "type": "Suite", "price": 98, "status": "available" }],
  "page": 1, "total": 30
}
POST/v1/rooms

Create a new room.

{
  "number": "305", "type": "Private",
  "capacity": 2, "price": 64
}
PATCH/v1/rooms/:id

Update room details or status.

{ "status": "maintenance" }
DELETE/v1/rooms/:id

Remove a room.

{ "deleted": true }

Bookings

GET/v1/bookings

List bookings by status or guest.

{
  "data": [{ "id": "b1000", "status": "confirmed", "amount": 132 }]
}
POST/v1/bookings

Create a reservation.

{
  "roomId": "r4", "checkIn": "2025-07-12",
  "checkOut": "2025-07-15", "guests": 2
}
PATCH/v1/bookings/:id/check-in

Transition booking to checked-in.

{ "status": "checked-in", "payment": "paid" }
PATCH/v1/bookings/:id/cancel

Cancel and release availability.

{ "status": "cancelled", "payment": "refunded" }

Guests

GET/v1/guests

Search the guest directory.

{ "data": [{ "id": "g1", "name": "Mia Andersen", "stays": 6 }] }
POST/v1/guests

Add a guest record.

{ "name": "Alex Doe", "email": "alex@mail.com" }

Housekeeping

GET/v1/tasks

List housekeeping tasks.

{ "data": [{ "id": "t200", "type": "Cleaning", "status": "pending" }] }
PATCH/v1/tasks/:id

Advance task status.

{ "status": "done" }

Staff

GET/v1/staff

List team members.

{ "data": [{ "id": "s1", "role": "reception" }] }
POST/v1/staff

Add a staff member.

{ "name": "Sam Lee", "role": "housekeeping" }