Returns the 25 most recent expenses in the given project. The {page} parameter is optional. If there are older expenses not included in the response, the root response element will also have a “continued-at” attribute specifying the path where the next oldest 25 expenses can be retrieved.
{
"continued-at":"/projects/1/expenses/2",
"expenses":[
{
"id":"61755784",
"date":"2018-03-30",
...
},
{
"id":"35371388",
"date":"2018-04-29",
...
},
...
]
}
Returns a single expense record identified by its integer ID.
{
"expense":{
"id":"61755784",
"date":"2018-04-30",
...
}
}
Creates a new expense.
{
"expense":{
"category-id":"51524282",
"date":"2018-04-14",
"amount":"250",
"notes": "Restaurant",
"billable":"not billable"
}
}
Returns HTTP status code 201 (“Created”) on success. The response contain the new expense ID. On failure, a non-200 status code will be returned, possibly with error information in JSON format as the response's content.
{
"expense-id":"140104985"
}
Updates an existing expense.
{
"expense":{
"date":"2018-04-25"
}
}
Returns HTTP status code 200 on success, or any other code (and possibly error information in JSON format) on error.
Destroys the given expense.
Returns HTTP status code 200 on success, or any other code (and possibly error information in JSON format) on error.