Skip to content

SotirisSotiriou/hotel-management-system-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hotel Management System - REST API

REST API for hotel management system with PHP

Postman documentation here



User Management

Method URL Parameters (form) Description
POST http://{host}/api/login.php username: string *
password: string *
Returns a JWT if login successfully


Room Management

Method URL Parameters (JSON) Description
GET http://{host}/api/room Show all rooms in JSON format
GET http://{host}/api/room/{id} Show selected room data in JSON format
POST http://{host}/api/room beds: integer *
type: string
cost_per_day: number *
number: integer
Add room in the database
PATCH http://{host}/api/room/{id} beds: integer
type: string
cost_per_day: number
number: integer
Update room info
DELETE http://{host}/api/room/{id} Delete room from database


Customer Management

Method URL Parameters (JSON) Description
GET http://{host}/api/customer/ Show all customers in JSON fomrat
GET http://{host}/api/customer/{id} Show selected customer data in JSON format
POST http://{host}/api/customer/{id} firstname: string *
lastname: string *
phone: string *
Add customer in the database
PATCH http://{host}/api/customer/{id} firstname: string
lastname: string
phone: string
Update customer info
DELETE http://{host}/api/customer/{id} Delete customer from database


Reservation Management

Method URL Parameters (JSON) Description
GET http://{host}/api/reservation/ Show all customers in JSON fomrat
GET http://{host}/api/reservation/{id} Show selected customer data in JSON format
POST http://{host}/api/reservation/{id} checkin: string *
checkout: string *
customer_id: integer *
room_id: integer *
billed: boolean *
breakfast: boolean *
lunch: boolean *
dinner: boolean *
Add customer in the database
PATCH http://{host}/api/reservation/{id} checkin: string
checkout: string
customer_id: integer
room_id: integer
billed: boolean
breakfast: boolean
lunch: boolean
dinner: boolean
Update customer info
DELETE http://{host}/api/reservation/{id} Delete customer from database


About

PHP REST API with JWT authentication for hotel management system

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages