2013-12-18 21:46:19 +00:00
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
2013-12-26 12:20:07 +00:00
< title > REST API Documentation — Accounting API 0.1-beta documentation< / title >
2013-12-18 21:46:19 +00:00
2013-12-20 15:00:09 +00:00
< link rel = "stylesheet" href = "_static/flasky.css" type = "text/css" / >
2013-12-18 21:46:19 +00:00
< link rel = "stylesheet" href = "_static/pygments.css" type = "text/css" / >
< script type = "text/javascript" >
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.1-beta',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
< / script >
< script type = "text/javascript" src = "_static/jquery.js" > < / script >
< script type = "text/javascript" src = "_static/underscore.js" > < / script >
< script type = "text/javascript" src = "_static/doctools.js" > < / script >
< link rel = "top" title = "Accounting API 0.1-beta documentation" href = "index.html" / >
2013-12-26 12:20:07 +00:00
< link rel = "prev" title = "accounting-api README" href = "README.html" / >
2013-12-20 15:00:09 +00:00
< meta name = "viewport" content = "width=device-width, initial-scale=0.9, maximum-scale=0.9" >
2013-12-18 21:46:19 +00:00
< / head >
< body >
2013-12-20 15:00:09 +00:00
2013-12-18 21:46:19 +00:00
< div class = "related" >
< h3 > Navigation< / h3 >
< ul >
< li class = "right" style = "margin-right: 10px" >
< a href = "genindex.html" title = "General Index"
accesskey="I">index< / a > < / li >
< li class = "right" >
< a href = "py-modindex.html" title = "Python Module Index"
>modules< / a > |< / li >
2013-12-26 20:07:17 +00:00
< li class = "right" >
< a href = "http-routingtable.html" title = "HTTP Routing Table"
>routing table< / a > |< / li >
2013-12-18 21:46:19 +00:00
< li class = "right" >
2013-12-26 12:20:07 +00:00
< a href = "README.html" title = "accounting-api README"
2013-12-18 21:46:19 +00:00
accesskey="P">previous< / a > |< / li >
< li > < a href = "index.html" > Accounting API 0.1-beta documentation< / a > » < / li >
< / ul >
< / div >
< div class = "document" >
< div class = "documentwrapper" >
< div class = "bodywrapper" >
< div class = "body" >
2013-12-26 12:20:07 +00:00
< div class = "section" id = "rest-api-documentation" >
< h1 > REST API Documentation< a class = "headerlink" href = "#rest-api-documentation" title = "Permalink to this headline" > ¶< / a > < / h1 >
< p > The accounting-api projects main application provides a REST API for accounting
data. This is the documentation for the various REST endpoints that the
accounting-api application provides.< / p >
2013-12-26 20:07:17 +00:00
< div class = "section" id = "get-all-transactions" >
< h2 > Get all transactions< a class = "headerlink" href = "#get-all-transactions" title = "Permalink to this headline" > ¶< / a > < / h2 >
2013-12-18 21:46:19 +00:00
< dl class = "get" >
< dt id = "get--transaction" >
< tt class = "descname" > GET < / tt > < tt class = "descname" > /transaction< / tt > < a class = "headerlink" href = "#get--transaction" title = "Permalink to this definition" > ¶< / a > < / dt >
2013-12-26 20:07:17 +00:00
< dd > < p > < strong > Example request< / strong > < / p >
2013-12-18 21:46:19 +00:00
< div class = "highlight-http" > < div class = "highlight" > < pre > < span class = "nf" > GET< / span > < span class = "nn" > /transaction< / span > < span class = "kr" > HTTP< / span > < span class = "o" > /< / span > < span class = "m" > 1.1< / span >
< span class = "na" > Host< / span > < span class = "o" > :< / span > < span class = "l" > accounting.example< / span >
< span class = "na" > Accept< / span > < span class = "o" > :< / span > < span class = "l" > application/json< / span >
< / pre > < / div >
< / div >
< p > < strong > Example response< / strong > < / p >
< div class = "highlight-http" > < div class = "highlight" > < pre > < span class = "kr" > HTTP< / span > < span class = "o" > /< / span > < span class = "m" > 1.1< / span > < span class = "m" > 200< / span > < span class = "ne" > OK< / span >
< span class = "na" > Content-Type< / span > < span class = "o" > :< / span > < span class = "l" > application/json< / span >
< span class = "p" > {< / span >
< span class = "nt" > " transactions" < / span > < span class = "p" > :< / span > < span class = "p" > [< / span >
< span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Transaction" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " date" < / span > < span class = "p" > :< / span > < span class = "s2" > " 2010-01-01" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " id" < / span > < span class = "p" > :< / span > < span class = "s2" > " Ids can be anything" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " metadata" < / span > < span class = "p" > :< / span > < span class = "p" > {},< / span >
< span class = "nt" > " payee" < / span > < span class = "p" > :< / span > < span class = "s2" > " Kindly T. Donor" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " postings" < / span > < span class = "p" > :< / span > < span class = "p" > [< / span >
< span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Posting" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " account" < / span > < span class = "p" > :< / span > < span class = "s2" > " Income:Foo:Donation" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Amount" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "s2" > " -100" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " symbol" < / span > < span class = "p" > :< / span > < span class = "s2" > " $" < / span >
< span class = "p" > },< / span >
< span class = "nt" > " metadata" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span >
< span class = "nt" > " Invoice" < / span > < span class = "p" > :< / span > < span class = "s2" > " Projects/Foo/Invoices/Invoice20100101.pdf" < / span >
< span class = "p" > }< / span >
< span class = "p" > },< / span >
< span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Posting" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " account" < / span > < span class = "p" > :< / span > < span class = "s2" > " Assets:Checking" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Amount" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "s2" > " 100" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " symbol" < / span > < span class = "p" > :< / span > < span class = "s2" > " $" < / span >
< span class = "p" > },< / span >
< span class = "nt" > " metadata" < / span > < span class = "p" > :< / span > < span class = "p" > {}< / span >
< span class = "p" > }< / span >
< span class = "p" > ]< / span >
< span class = "p" > },< / span >
< span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Transaction" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " date" < / span > < span class = "p" > :< / span > < span class = "s2" > " 2011-03-15" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " id" < / span > < span class = "p" > :< / span > < span class = "s2" > " but mind you if they collide." < / span > < span class = "p" > ,< / span >
< span class = "nt" > " metadata" < / span > < span class = "p" > :< / span > < span class = "p" > {},< / span >
< span class = "nt" > " payee" < / span > < span class = "p" > :< / span > < span class = "s2" > " Another J. Donor" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " postings" < / span > < span class = "p" > :< / span > < span class = "p" > [< / span >
< span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Posting" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " account" < / span > < span class = "p" > :< / span > < span class = "s2" > " Income:Foo:Donation" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Amount" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "s2" > " -400" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " symbol" < / span > < span class = "p" > :< / span > < span class = "s2" > " $" < / span >
< span class = "p" > },< / span >
< span class = "nt" > " metadata" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span >
< span class = "nt" > " Approval" < / span > < span class = "p" > :< / span > < span class = "s2" > " Projects/Foo/earmark-record.txt" < / span >
< span class = "p" > }< / span >
< span class = "p" > },< / span >
< span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Posting" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " account" < / span > < span class = "p" > :< / span > < span class = "s2" > " Assets:Checking" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Amount" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "s2" > " 400" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " symbol" < / span > < span class = "p" > :< / span > < span class = "s2" > " $" < / span >
< span class = "p" > },< / span >
< span class = "nt" > " metadata" < / span > < span class = "p" > :< / span > < span class = "p" > {}< / span >
< span class = "p" > }< / span >
< span class = "p" > ]< / span >
< span class = "p" > },< / span >
< span class = "p" > ]< / span >
< span class = "p" > }< / span >
< / pre > < / div >
< / div >
< / dd > < / dl >
2013-12-26 20:07:17 +00:00
< / div >
< div class = "section" id = "get-a-single-transaction" >
< h2 > Get a single transaction< a class = "headerlink" href = "#get-a-single-transaction" title = "Permalink to this headline" > ¶< / a > < / h2 >
< dl class = "get" >
< dt id = "get--transaction--string-transaction_id-" >
< tt class = "descname" > GET < / tt > < tt class = "descname" > /transaction/< string:transaction_id> < / tt > < a class = "headerlink" href = "#get--transaction--string-transaction_id-" title = "Permalink to this definition" > ¶< / a > < / dt >
< dd > < p > < strong > Example request< / strong > < / p >
< div class = "highlight-http" > < div class = "highlight" > < pre > < span class = "nf" > GET< / span > < span class = "nn" > /transaction/2aeea63b-0996-4ead-bc4c-e15505dff226< / span > < span class = "kr" > HTTP< / span > < span class = "o" > /< / span > < span class = "m" > 1.1< / span >
< span class = "na" > Host< / span > < span class = "o" > :< / span > < span class = "l" > accounting.example< / span >
< span class = "na" > Accept< / span > < span class = "o" > :< / span > < span class = "l" > application/json< / span >
< / pre > < / div >
< / div >
< p > < strong > Example response< / strong > < / p >
< div class = "highlight-http" > < div class = "highlight" > < pre > < span class = "kr" > HTTP< / span > < span class = "o" > /< / span > < span class = "m" > 1.0< / span > < span class = "m" > 200< / span > < span class = "ne" > OK< / span >
< span class = "na" > Content-Type< / span > < span class = "o" > :< / span > < span class = "l" > application/json< / span >
< span class = "p" > {< / span >
< span class = "nt" > " transaction" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Transaction" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " date" < / span > < span class = "p" > :< / span > < span class = "s2" > " 2013-12-26" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " id" < / span > < span class = "p" > :< / span > < span class = "s2" > " 2aeea63b-0996-4ead-bc4c-e15505dff226" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " metadata" < / span > < span class = "p" > :< / span > < span class = "p" > {},< / span >
< span class = "nt" > " payee" < / span > < span class = "p" > :< / span > < span class = "s2" > " January Rent" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " postings" < / span > < span class = "p" > :< / span > < span class = "p" > [< / span >
< span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Posting" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " account" < / span > < span class = "p" > :< / span > < span class = "s2" > " Assets:Checking" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Amount" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "s2" > " -424.24" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " symbol" < / span > < span class = "p" > :< / span > < span class = "s2" > " USD" < / span >
< span class = "p" > },< / span >
< span class = "nt" > " metadata" < / span > < span class = "p" > :< / span > < span class = "p" > {}< / span >
< span class = "p" > },< / span >
< span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Posting" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " account" < / span > < span class = "p" > :< / span > < span class = "s2" > " Expenses:Rent" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Amount" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "s2" > " 424.24" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " symbol" < / span > < span class = "p" > :< / span > < span class = "s2" > " USD" < / span >
< span class = "p" > },< / span >
< span class = "nt" > " metadata" < / span > < span class = "p" > :< / span > < span class = "p" > {}< / span >
< span class = "p" > }< / span >
< span class = "p" > ]< / span >
< span class = "p" > }< / span >
< span class = "p" > }< / span >
< / pre > < / div >
< / div >
< / dd > < / dl >
2013-12-18 21:46:19 +00:00
< / div >
< div class = "section" id = "add-transactions" >
< h2 > Add transactions< a class = "headerlink" href = "#add-transactions" title = "Permalink to this headline" > ¶< / a > < / h2 >
< dl class = "post" >
< dt id = "post--transaction" >
< tt class = "descname" > POST < / tt > < tt class = "descname" > /transaction< / tt > < a class = "headerlink" href = "#post--transaction" title = "Permalink to this definition" > ¶< / a > < / dt >
< dd > < table class = "docutils field-list" frame = "void" rules = "none" >
< col class = "field-name" / >
< col class = "field-body" / >
< tbody valign = "top" >
< tr class = "field-odd field" > < th class = "field-name" colspan = "2" > Json Parameters:< / th > < / tr >
< tr class = "field-odd field" > < td > < / td > < td class = "field-body" > < ul class = "first last simple" >
< li > < strong > transactions< / strong > (< em > array< / em > ) – A list of Transaction objects to add.< / li >
< / ul >
< / td >
< / tr >
< / tbody >
< / table >
< p > < strong > Example request< / strong > < / p >
< div class = "highlight-http" > < div class = "highlight" > < pre > < span class = "nf" > POST< / span > < span class = "nn" > /transaction< / span > < span class = "kr" > HTTP< / span > < span class = "o" > /< / span > < span class = "m" > 1.1< / span >
< span class = "na" > Host< / span > < span class = "o" > :< / span > < span class = "l" > accounting.example< / span >
< span class = "na" > Content-Type< / span > < span class = "o" > :< / span > < span class = "l" > application/json< / span >
< span class = "na" > Accept< / span > < span class = "o" > :< / span > < span class = "l" > application/json< / span >
< span class = "p" > {< / span >
< span class = "nt" > " transactions" < / span > < span class = "p" > :< / span > < span class = "p" > [< / span >
< span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Transaction" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " date" < / span > < span class = "p" > :< / span > < span class = "s2" > " 2010-01-01" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " id" < / span > < span class = "p" > :< / span > < span class = "s2" > " Ids can be anything" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " metadata" < / span > < span class = "p" > :< / span > < span class = "p" > {},< / span >
< span class = "nt" > " payee" < / span > < span class = "p" > :< / span > < span class = "s2" > " Kindly T. Donor" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " postings" < / span > < span class = "p" > :< / span > < span class = "p" > [< / span >
< span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Posting" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " account" < / span > < span class = "p" > :< / span > < span class = "s2" > " Income:Foo:Donation" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Amount" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "s2" > " -100" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " symbol" < / span > < span class = "p" > :< / span > < span class = "s2" > " $" < / span >
< span class = "p" > },< / span >
< span class = "nt" > " metadata" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span >
< span class = "nt" > " Invoice" < / span > < span class = "p" > :< / span > < span class = "s2" > " Projects/Foo/Invoices/Invoice20100101.pdf" < / span >
< span class = "p" > }< / span >
< span class = "p" > },< / span >
< span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Posting" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " account" < / span > < span class = "p" > :< / span > < span class = "s2" > " Assets:Checking" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Amount" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "s2" > " 100" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " symbol" < / span > < span class = "p" > :< / span > < span class = "s2" > " $" < / span >
< span class = "p" > },< / span >
< span class = "nt" > " metadata" < / span > < span class = "p" > :< / span > < span class = "p" > {}< / span >
< span class = "p" > }< / span >
< span class = "p" > ]< / span >
< span class = "p" > },< / span >
< span class = "p" > ]< / span >
< span class = "p" > }< / span >
< / pre > < / div >
< / div >
< p > < strong > Example response< / strong > < / p >
< div class = "highlight-http" > < div class = "highlight" > < pre > < span class = "kr" > HTTP< / span > < span class = "o" > /< / span > < span class = "m" > 1.1< / span > < span class = "m" > 200< / span > < span class = "ne" > OK< / span >
< span class = "na" > Content-Type< / span > < span class = "o" > :< / span > < span class = "l" > application/json< / span >
< span class = "p" > {< / span >
< span class = "nt" > " status" < / span > < span class = "p" > :< / span > < span class = "s2" > " OK" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " transaction_ids" < / span > < span class = "p" > :< / span > < span class = "p" > [< / span >
< span class = "s2" > " Ids can be anything" < / span >
< span class = "p" > ]< / span >
< span class = "p" > }< / span >
< / pre > < / div >
< / div >
< / dd > < / dl >
< / div >
< div class = "section" id = "delete-a-transaction" >
< h2 > Delete a transaction< a class = "headerlink" href = "#delete-a-transaction" title = "Permalink to this headline" > ¶< / a > < / h2 >
< dl class = "delete" >
< dt id = "delete--transaction--string-transaction_id-" >
< tt class = "descname" > DELETE < / tt > < tt class = "descname" > /transaction/< string:transaction_id> < / tt > < a class = "headerlink" href = "#delete--transaction--string-transaction_id-" title = "Permalink to this definition" > ¶< / a > < / dt >
< dd > < p > Delete the transaction with ID < tt class = "xref py py-data docutils literal" > < span class = "pre" > transaction_id< / span > < / tt > .< / p >
< p > < strong > Example request< / strong > < / p >
< div class = "highlight-http" > < div class = "highlight" > < pre > < span class = "nf" > DELETE< / span > < span class = "nn" > /transaction/123456< / span > < span class = "kr" > HTTP< / span > < span class = "o" > /< / span > < span class = "m" > 1.1< / span >
< span class = "na" > Host< / span > < span class = "o" > :< / span > < span class = "l" > accounting.example< / span >
< span class = "na" > Accept< / span > < span class = "o" > :< / span > < span class = "l" > application/json< / span >
< / pre > < / div >
< / div >
< p > < strong > Example response< / strong > < / p >
< div class = "highlight-http" > < div class = "highlight" > < pre > < span class = "kr" > HTTP< / span > < span class = "o" > /< / span > < span class = "m" > 1.1< / span > < span class = "m" > 200< / span > < span class = "ne" > OK< / span >
< span class = "na" > Content-Type< / span > < span class = "o" > :< / span > < span class = "l" > application/json< / span >
< span class = "p" > {< / span >
< span class = "nt" > " status" < / span > < span class = "p" > :< / span > < span class = "s2" > " OK" < / span >
< span class = "p" > }< / span >
< / pre > < / div >
< / div >
< / dd > < / dl >
2013-12-26 20:07:17 +00:00
< / div >
< div class = "section" id = "update-a-transaction" >
< h2 > Update a transaction< a class = "headerlink" href = "#update-a-transaction" title = "Permalink to this headline" > ¶< / a > < / h2 >
< dl class = "post" >
< dt id = "post--transaction--string-transaction_id-" >
< tt class = "descname" > POST < / tt > < tt class = "descname" > /transaction/< string:transaction_id> < / tt > < a class = "headerlink" href = "#post--transaction--string-transaction_id-" title = "Permalink to this definition" > ¶< / a > < / dt >
< dd > < p > < strong > Example request< / strong > < / p >
< div class = "highlight-http" > < div class = "highlight" > < pre > < span class = "nf" > POST< / span > < span class = "nn" > /transaction/2aeea63b-0996-4ead-bc4c-e15505dff226< / span > < span class = "kr" > HTTP< / span > < span class = "o" > /< / span > < span class = "m" > 1.1< / span >
< span class = "na" > Host< / span > < span class = "o" > :< / span > < span class = "l" > accounting.example< / span >
< span class = "na" > Content-Type< / span > < span class = "o" > :< / span > < span class = "l" > application/json< / span >
< span class = "na" > Accept< / span > < span class = "o" > :< / span > < span class = "l" > application/json< / span >
< span class = "p" > {< / span >
< span class = "nt" > " transaction" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Transaction" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " date" < / span > < span class = "p" > :< / span > < span class = "s2" > " 2013-12-26" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " id" < / span > < span class = "p" > :< / span > < span class = "s2" > " 2aeea63b-0996-4ead-bc4c-e15505dff226" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " metadata" < / span > < span class = "p" > :< / span > < span class = "p" > {},< / span >
< span class = "nt" > " payee" < / span > < span class = "p" > :< / span > < span class = "s2" > " February Rent" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " postings" < / span > < span class = "p" > :< / span > < span class = "p" > [< / span >
< span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Posting" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " account" < / span > < span class = "p" > :< / span > < span class = "s2" > " Assets:Checking" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Amount" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "s2" > " -424.24" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " symbol" < / span > < span class = "p" > :< / span > < span class = "s2" > " USD" < / span >
< span class = "p" > },< / span >
< span class = "nt" > " metadata" < / span > < span class = "p" > :< / span > < span class = "p" > {}< / span >
< span class = "p" > },< / span >
< span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Posting" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " account" < / span > < span class = "p" > :< / span > < span class = "s2" > " Expenses:Rent" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span >
< span class = "nt" > " __type__" < / span > < span class = "p" > :< / span > < span class = "s2" > " Amount" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " amount" < / span > < span class = "p" > :< / span > < span class = "s2" > " 424.24" < / span > < span class = "p" > ,< / span >
< span class = "nt" > " symbol" < / span > < span class = "p" > :< / span > < span class = "s2" > " USD" < / span >
< span class = "p" > },< / span >
< span class = "nt" > " metadata" < / span > < span class = "p" > :< / span > < span class = "p" > {}< / span >
< span class = "p" > }< / span >
< span class = "p" > ]< / span >
< span class = "p" > }< / span >
< span class = "p" > }< / span >
< / pre > < / div >
< / div >
< p > < strong > Example response< / strong > < / p >
< div class = "highlight-http" > < div class = "highlight" > < pre > < span class = "kr" > HTTP< / span > < span class = "o" > /< / span > < span class = "m" > 1.0< / span > < span class = "m" > 200< / span > < span class = "ne" > OK< / span >
< span class = "na" > Content-Type< / span > < span class = "o" > :< / span > < span class = "l" > application/json< / span >
< span class = "p" > {< / span >
< span class = "nt" > " status" < / span > < span class = "p" > :< / span > < span class = "s2" > " OK" < / span >
< span class = "p" > }< / span >
< / pre > < / div >
< / div >
< / dd > < / dl >
2013-12-18 21:46:19 +00:00
< / div >
< / div >
< / div >
< / div >
< / div >
< div class = "sphinxsidebar" >
< div class = "sphinxsidebarwrapper" >
2013-12-20 15:00:09 +00:00
< p class = "logo" > < a href = "index.html" >
< img class = "logo" src = "_static/accounting-api-logo.png" alt = "Logo" / >
< / a > < / p >
2013-12-18 21:46:19 +00:00
< h3 > < a href = "index.html" > Table Of Contents< / a > < / h3 >
< ul >
2013-12-26 12:20:07 +00:00
< li > < a class = "reference internal" href = "#" > REST API Documentation< / a > < ul >
2013-12-26 20:07:17 +00:00
< li > < a class = "reference internal" href = "#get-all-transactions" > Get all transactions< / a > < / li >
< li > < a class = "reference internal" href = "#get-a-single-transaction" > Get a single transaction< / a > < / li >
2013-12-18 21:46:19 +00:00
< li > < a class = "reference internal" href = "#add-transactions" > Add transactions< / a > < / li >
< li > < a class = "reference internal" href = "#delete-a-transaction" > Delete a transaction< / a > < / li >
2013-12-26 20:07:17 +00:00
< li > < a class = "reference internal" href = "#update-a-transaction" > Update a transaction< / a > < / li >
2013-12-18 21:46:19 +00:00
< / ul >
< / li >
< / ul >
2013-12-20 15:00:09 +00:00
< h3 > Related Topics< / h3 >
< ul >
< li > < a href = "index.html" > Documentation overview< / a > < ul >
2013-12-26 12:20:07 +00:00
< li > Previous: < a href = "README.html" title = "previous chapter" > accounting-api README< / a > < / li >
2013-12-20 15:00:09 +00:00
< / ul > < / li >
< / ul >
2013-12-18 21:46:19 +00:00
< h3 > This Page< / h3 >
< ul class = "this-page-menu" >
< li > < a href = "_sources/restapi.txt"
rel="nofollow">Show Source< / a > < / li >
< / ul >
< div id = "searchbox" style = "display: none" >
< h3 > Quick search< / h3 >
< form class = "search" action = "search.html" method = "get" >
< input type = "text" name = "q" / >
< input type = "submit" value = "Go" / >
< input type = "hidden" name = "check_keywords" value = "yes" / >
< input type = "hidden" name = "area" value = "default" / >
< / form >
< p class = "searchtip" style = "font-size: 90%" >
Enter search terms or a module, class or function name.
< / p >
< / div >
< script type = "text/javascript" > $ ( '#searchbox' ) . show ( 0 ) ; < / script >
< / div >
< / div >
< div class = "clearer" > < / div >
< / div >
2013-12-20 15:00:09 +00:00
< div class = "footer" >
© Copyright 2013, Joar Wandborg.
Created using < a href = "http://sphinx.pocoo.org/" > Sphinx< / a > .
< / div >
2013-12-18 21:46:19 +00:00
< / body >
< / html >