diff --git a/doc/build/html/README.html b/doc/build/html/README.html index c758dbb..2f01152 100644 --- a/doc/build/html/README.html +++ b/doc/build/html/README.html @@ -24,7 +24,7 @@ - +
@@ -38,7 +38,10 @@ modules |+ /transaction | ||
+ | + GET /transaction | + |
+ | + POST /transaction | + |
+ | + DELETE /transaction/<string:transaction_id> | + |
Get all transactions
+Example request
+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"
+ }
+ },
+ {
+ "__type__": "Posting",
+ "account": "Assets:Checking",
+ "amount": {
+ "__type__": "Amount",
+ "amount": "100",
+ "symbol": "$"
+ },
+ "metadata": {}
+ }
+ ]
+ },
+ {
+ "__type__": "Transaction",
+ "date": "2011-03-15",
+ "id": "but mind you if they collide.",
+ "metadata": {},
+ "payee": "Another J. Donor",
+ "postings": [
+ {
+ "__type__": "Posting",
+ "account": "Income:Foo:Donation",
+ "amount": {
+ "__type__": "Amount",
+ "amount": "-400",
+ "symbol": "$"
+ },
+ "metadata": {
+ "Approval": "Projects/Foo/earmark-record.txt"
+ }
+ },
+ {
+ "__type__": "Posting",
+ "account": "Assets:Checking",
+ "amount": {
+ "__type__": "Amount",
+ "amount": "400",
+ "symbol": "$"
+ },
+ "metadata": {}
+ }
+ ]
+ },
+ ]
+}
+
Json Parameters: | |
---|---|
|
+
Example request
+POST /transaction HTTP/1.1
+Host: accounting.example
+Content-Type: application/json
+Accept: 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"
+ }
+ },
+ {
+ "__type__": "Posting",
+ "account": "Assets:Checking",
+ "amount": {
+ "__type__": "Amount",
+ "amount": "100",
+ "symbol": "$"
+ },
+ "metadata": {}
+ }
+ ]
+ },
+ ]
+}
+
Example response
+HTTP/1.1 200 OK
+Content-Type: application/json
+
+{
+ "status": "OK",
+ "transaction_ids": [
+ "Ids can be anything"
+ ]
+}
+
Delete the transaction with ID transaction_id.
+Example request
+DELETE /transaction/123456 HTTP/1.1
+Host: accounting.example
+Accept: application/json
+
Example response
+HTTP/1.1 200 OK
+Content-Type: application/json
+
+{
+ "status": "OK"
+}
+