Skip to content

rdelgadol/Reservation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reservation API REST

It´s a booking service for the public company Cantur, that manages touristic resorts in the province of Cantabria (Spain).

The name is reservation, to avoid confusion whit the booking entity.

Design

This API REST uses an embedded H2 database available in the URL http://localhost:9002/h2-console

As requested, it manages bookings and blocks. Each concept has its entity, repository and service, but there is only a controller.

The port has been changed to 9002 in the properties file.

Endpoints

Both bookings and blocks can be managed through the following endpoints, examples are provided.

Get, to obtain entities that overlaps with the given dates:

Post, to record new entities. Accepts a JSON representation of the entity:

Put, to update any value of the entity, except the start date because it is the primary key. Accepts a JSON representation of the entity:

Delete, to remove entities:

The booking entity has an additional endpoint, just to change if it is available or not:

Only available bookings are considered in validations related to overlapping entities.

About

Reservations for hotel rooms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages