All API must use this authentication
Request :
- Header :
- Authorization : "your jwt-token from response api login"
All API must use this authentication
Request :
- Header :
- Authorization : "your jwt-token from response api login"
- Method : POST
- Endpoint :
/v1/registration
- Header :
- Content-Type : application/json
- Accept : application/json
- Body :
{
"username": "string, unique",
"firstname": "string",
"lastname": "string",
"password": "string"
}
Response :
{
"code" : "number",
"status" : "string",
"data" : {
"user_id": "number",
"username": "string",
"firstname": "string",
"lastname": "string",
"date_created": "date"
}
}
- Method : POST
- Endpoint :
/v1/login
- Header :
- Content-Type : application/json
- Accept : application/json
- Body :
{
"username": "string, unique",
"password": "string"
}
Response :
{
"code" : "number",
"status" : "string",
"data" : {
"user_id": "number",
"username": "string",
"firstname": "string",
"lastname": "string",
"token": "string",
"date_created": "date"
}
}
- Method : GET
- Endpoint :
/v1/profile
- Header :
- Content-Type : application/json
- Accept : application/json
- Authorization : "string"
Response :
{
"code" : "number",
"status" : "string",
"data" : {
"user_id": "int",
"username": "string",
"firstname": "string",
"lastname": "string",
"token": "string",
"date_created": "date"
}
}
- Method : POST
- Endpoint :
/v1/registration
- Header :
- Content-Type : application/json
- Accept : application/json
- Body :
{
"username": "string, unique",
"firstname": "string",
"lastname": "string",
"password": "string"
}
Response :
{
"code" : "number",
"status" : "string",
"data" : {
"user_id": "number",
"username": "string",
"firstname": "string",
"lastname": "string",
"date_created": "date"
}
}
- Method : POST
- Endpoint :
/v1/login
- Header :
- Content-Type : application/json
- Accept : application/json
- Body :
{
"username": "string, unique",
"password": "string"
}
Response :
{
"code" : "number",
"status" : "string",
"data" : {
"user_id": "number",
"username": "string",
"firstname": "string",
"lastname": "string",
"token": "string",
"date_created": "date"
}
}
- Method : GET
- Endpoint :
/v1/profile
Response :
{
"code" : "number",
"status" : "string",
"data" : {
"user_id": "int",
"username": "string",
"firstname": "string",
"lastname": "string",
"token": "string",
"date_created": "date"
}
}
- Method : GET
- Endpoint :
/v1/hotel
Response :
{
"code": "number",
"status": "string",
"data": [
{
"hotel_id": "number",
"hotel_name": "string",
"hotel_address": "string",
"city": "string",
"state": "string",
"zipCode": "number",
"country": "string",
"price": "decimal"
}
]
}
- Method : DELETE
- Endpoint :
/v1/hotel/{id}
Response :
{
"rc": "number",
"message": "string",
"detail": "string",
"data": null
}
- Method : POST
- Endpoint :
/v1/hotel
Body Request :
{
"hotel_name": "string",
"hotel_address": "string",
"city": "string",
"state": "string",
"zipCode": "number",
"country": "string",
"price": "decimal"
}
Response :
{
"rc": "number",
"message": "string",
"detail": "string",
"data": [
{
"hotel_id": "number",
"hotel_name": "string",
"hotel_address": "string",
"city": "string",
"state": "string",
"zipCode": "number",
"country": "string",
"price": "decimal"
}
]
}
- Method : POST
- Endpoint :
/v1/hotel/update
Body Request :
{
"hotel_id": "number",
"hotel_name": "string",
"hotel_address": "string",
"city": "string",
"state": "string",
"zipCode": "number",
"country": "string",
"price": "decimal"
}
Response :
{
"rc": "number",
"message": "string",
"detail": "string",
"data": [
{
"hotel_id": "number",
"hotel_name": "string",
"hotel_address": "string",
"city": "string",
"state": "string",
"zipCode": "number",
"country": "string",
"price": "decimal"
}
]
}