Created
January 22, 2020 19:27
-
-
Save jbogard/9d6f5ad54c6a975d47c2087aab304346 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET /invoices | |
200 OK | |
{ | |
[ | |
{ | |
"@id": "/invoices/123", | |
"status": 0, | |
"total": 199.99, | |
"actions": [ | |
{ "approve": "/invoices/123/approve" } | |
] | |
}, | |
{ | |
"@id": "/invoices/456", | |
"status": 1, | |
"total": 299.99, | |
"actions": [ | |
{ "reject": "/invoices/123/reject" } | |
] | |
} | |
] | |
} | |
GET /invoices/123/approve | |
200 OK | |
{ | |
"fields": [ | |
{ "name": "approver_id", "type": "number", "required": true }, | |
{ "name": "comment", "type": "string" } | |
] | |
} | |
POST /invoices/123/approve | |
{ | |
"approver_id" : 789 | |
} | |
302 FOUND | |
Location: /invoices/123 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment