Skip to content

Instantly share code, notes, and snippets.

@jbogard
Created January 22, 2020 19:27
Show Gist options
  • Save jbogard/9d6f5ad54c6a975d47c2087aab304346 to your computer and use it in GitHub Desktop.
Save jbogard/9d6f5ad54c6a975d47c2087aab304346 to your computer and use it in GitHub Desktop.
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