-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrest.http
20 lines (17 loc) · 869 Bytes
/
rest.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Create an invoice as user1 with role web_user
POST http://localhost:8000/invoices
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyMSIsInJvbGUiOiJ3ZWJfdXNlciIsImlzcyI6InhpYW5hLWFwaSIsImF1ZCI6ImFwaS1jb25zdW1lciIsImV4cCI6NTMxNjM4MTM3MH0.LBVc-1g0F1Ft8ulRDM-8H9kZa6XRXpls2rQXBlfLGFw
Content-Type: application/json
{
"name": "Invoice for user1",
"date": "2023-01-01",
"amount": 100,
"currency": "USD",
"bank_details": "Bank ABC, Account 123",
"attached_file": "invoice1.pdf",
"user_id": "0222f0be-edd6-4825-98ba-57657c242e5d",
"current_status": "created"
}
# Get an invoice as user1 with role web_user
GET http://localhost:8000/invoices
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyMSIsInJvbGUiOiJ3ZWJfdXNlciIsImlzcyI6InhpYW5hLWFwaSIsImF1ZCI6ImFwaS1jb25zdW1lciIsImV4cCI6NTMxNjM4MTM3MH0.LBVc-1g0F1Ft8ulRDM-8H9kZa6XRXpls2rQXBlfLGFw