Returns a single expense.
Status: 200 OK
<expense>
<amount type="float">12.52</amount>
<concept-id type="integer">49</concept-id>
<created-at type="datetime">2007-08-10T18:38:12Z</created-at>
<date type="date">2007-08-10</date>
<description>Lunch with Cristina</description>
<id type="integer">793</id>
<updated-at type="datetime">2007-08-10T18:38:12Z</updated-at>
</expense>
Returns a collection of expenses. Note that this request has no filter applied, so the response could be very long.
Status: 200 OK
<expenses>
<expense>
...
</expense>
<expense>
...
</expense>
</expenses>
Returns a collection of expenses that belongs to month and year (Based on current time in user's timezone).
Status: 200 OK
<expenses>
<expense>
...
</expense>
<expense>
...
</expense>
</expenses>
Returns a collection of expenses that belongs to period (Based on current time in user's timezone).
possible periods are:
Status: 200 OK
<expenses>
<expense>
...
</expense>
<expense>
...
</expense>
</expenses>
Returns a collection of expenses that belongs to the concept referred in the URL.
Tip: You could combine Period and Concept List to, for example, List this month's expenses that belongs to some concept:
GET /concepts/#{concept-id}/expenses.xml?filter=this_month
Status: 200 OK
<expenses>
<expense>
...
</expense>
<expense>
...
</expense>
</expenses>
Returns a collection of expenses that matchs the search properties. Possible properties are:
Examples:
GET /expenses/search.xml?initial_date=2007-08-01&description=Cristina - This would find expenses from 2007-08-01 matching description like Cristina.
GET /expenses/search.xml?final_cost=50&initial_date=2007-08-01 - This would find expenses from 2007-08-01 that costs below 50 Euro/Dollar/Whatever.
Status: 200 OK
<expenses>
<expense>
...
</expense>
<expense>
...
</expense>
</expenses>
Creates a new expense. The XML for the new expense is returned on a successful request with the timestamps recorded and ids for the expense.
<expense>
<date type="date">2007-08-10</date>
<concept-id type="integer">49</concept-id>
<amount type="float">12.52</amount>
<description>Lunch with Cristina</description>
</expense>
Status: 201 Created
Location: http://test.gastus.com/expenses/#{new-expense-id}.xml
<expense>
...
</expense>
Updates an existing expense with new details from the submitted XML.
<expense>
<date type="date">2007-08-10</date>
<concept-id type="integer">49</concept-id>
<amount type="float">12.52</amount>
<description>Lunch with Cristina</description>
</expense>
Status: 200 OK
Destroys the expense at the referenced URL.
Status: 200 OK