-
Notifications
You must be signed in to change notification settings - Fork 0
/
APITest.http
42 lines (38 loc) · 1.54 KB
/
APITest.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
GET http://localhost:8000/healthcheck HTTP/1.1
###
POST http://localhost:8000/v1/auth/users
Content-Type: application/json
{
"email": "admin@example.com",
"name": "admin1",
"password": "Pwd@123"
}
###
POST http://localhost:8000/v1/auth/users/tokens
Content-Type: application/json
{
"email": "admin@example.com",
"name": "admin1",
"password": "Pwd@123"
}
###
{"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxIiwiZXhwIjoxNjk4NjI2NDA1LCJpc19hZG1pbiI6ZmFsc2V9.pt_PE2U-ccD9si7EYb1y_jj9pIh_tbO0wgtS94DlrMI","refresh_token":"tRsAs8kUZoHOCc4jky6FEbkY1UXRUuiEYOfyOga9fk5IiwvrEXIRrNw9NEZYcd2I"}
###
POST http://localhost:8000/v1/bookings HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxIiwiZXhwIjoxNjk4NjI2NDA1LCJpc19hZG1pbiI6ZmFsc2V9.pt_PE2U-ccD9si7EYb1y_jj9pIh_tbO0wgtS94DlrMI
{
"restaurant_id": 1,
"table_number": 1,
"start_at": "2023-10-15T10:35:00",
"guest_email": "user@example.com",
"payment_amount": 5000,
"payment_method": "cash",
"payment_provider": "cash"
}
### admin
{"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyIiwiZXhwIjoxNjk4NjQyMzE4LCJpc19hZG1pbiI6ZmFsc2V9.es858XO0sxqP5NXp1qVubGPvsMBJIw8mFQ8hycncMGI","refresh_token":"TJcWXesJxeNEHE0TuFchM1dibzm2PyvpPMWt7mObLUnrvPMDTazosBOyJxq2nig1"}
###
PUT http://localhost:8000/v1/bookings/2/approval HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyIiwiZXhwIjoxNjk4NjQyMzE4LCJpc19hZG1pbiI6ZmFsc2V9.es858XO0sxqP5NXp1qVubGPvsMBJIw8mFQ8hycncMGI