new file 100644
==========
REST API
Get transactions
----------------
.. http:get:: /transaction
Get all transactions
**Example request**
.. code-block:: http
GET /transaction HTTP/1.1
Host: accounting.example
Accept: application/json
**Example response**
HTTP/1.1 200 OK
Content-Type: application/json
{
"transactions": [
"__type__": "Transaction",
"date": "2010-01-01",
"id": "Ids can be anything",
"metadata": {},
"payee": "Kindly T. Donor",
"postings": [
"__type__": "Posting",
"account": "Income:Foo:Donation",
"amount": {
"__type__": "Amount",
"amount": "-100",
"symbol": "$"
},
"metadata": {
"Invoice": "Projects/Foo/Invoices/Invoice20100101.pdf"
}
"account": "Assets:Checking",
"amount": "100",
"metadata": {}
]
"date": "2011-03-15",
"id": "but mind you if they collide.",
"payee": "Another J. Donor",
"amount": "-400",
"Approval": "Projects/Foo/earmark-record.txt"
"amount": "400",
Add transactions
.. http:post:: /transaction
:jsonparam array transactions: A list of Transaction objects to add.
POST /transaction HTTP/1.1
"status": "OK",
"transaction_ids": [
"Ids can be anything"
Delete a transaction
--------------------
.. http:delete:: /transaction/<string:transaction_id>
Delete the transaction with ID :data:`transaction_id`.
DELETE /transaction/123456 HTTP/1.1
"status": "OK"