reserv service - Watthakorn/EZ_finance GitHub Wiki
reserv-service
-
list-of-reserve api
GET /reservs
Request
{}
Response
[
{
"reserv_id": 1,
"reserv_user": "TestUser",
"reserv_field_id": 1,
"reserv_ex_id": 1,
"reserv_time": 1,
"reserv_date": "2017-03-12",
"reserv_status": "pending"
},
{
"reserv_id": 2,
"reserv_user": "TestUser",
"reserv_field_id": 1,
"reserv_ex_id": 1,
"reserv_time": 2,
"reserv_date": "2017-03-12",
"reserv_status": "pending"
},
{
"reserv_id": 3,
"reserv_user": "TestUser",
"reserv_field_id": 1,
"reserv_ex_id": 1,
"reserv_time": 3,
"reserv_date": "2017-03-12",
"reserv_status": "pending"
},
{
"reserv_id": 4,
"reserv_user": "TestUser",
"reserv_field_id": 1,
"reserv_ex_id": 1,
"reserv_time": 4,
"reserv_date": "2017-03-12",
"reserv_status": "pending"
}
]
-
do-reserve api
POST /reserv
Request
{
"reserv_user":"name",
"reserv_field_id":2,
"reserv_ex_id":2,
"reserv_time":9,
"reserv_date":"2017/03/15"
}
Response: status 201 Created
{}
-
reserv-detail api
GET /reserv/{reserv_id}
Request
{
"reserv_id": 21
}
Response
{
"reserv_id": 21,
"reserv_user": "name",
"reserv_field_id": 2,
"reserv_ex_id": 2,
"reserv_time": 9,
"reserv_date": "2017-03-15",
"reserv_status": "pending"
}
-
confirm-reserve api
put /reserv/{reserv_id}/confirm
Request
{
"reserv_id": 21
}
Response : status 200 OK
{
}
-
cancel-reserve api
put /reserv/{reserv_id}/cancel
Request
{
"reserv_id": 21
}
Response : status 200 OK
{
}
-
cancel-reserve api
DELETE /reserv/{reserv_id}/delete
Request
{
"reserv_id": 21
}
Response : status 200 OK
{
}