This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
developers:api:invoice [2014/10/18 07:37] Jaco van Wyk |
developers:api:invoice [2016/05/26 14:34] Jaco van Wyk |
||
---|---|---|---|
Line 7: | Line 7: | ||
<code php> | <code php> | ||
$ curl -u user:pass -d "date=2013-01-07" \ | $ curl -u user:pass -d "date=2013-01-07" \ | ||
- | > -d "description[]=rolls&unit_cost[]=1.12&quantity[]=13" \ | + | > -d "description[0]=rolls&unit_cost[0]=1.12&quantity[0]=13" \ |
- | > -d "description[]=chips&unit_cost[]=20&quantity[]=1" \ | + | > -d "description[1]=chips&unit_cost[1]=20&quantity[1]=1" \ |
> https://api.snapbill.com/v1/client/158958/add_invoice.json | > https://api.snapbill.com/v1/client/158958/add_invoice.json | ||
</code> | </code> | ||
Line 92: | Line 92: | ||
|↳ unit_cost_cents | |get |The cost per unit of the line as an integer number of cents.| | |↳ unit_cost_cents | |get |The cost per unit of the line as an integer number of cents.| | ||
|↳ quantity |add |get |The quantity for the invoice line| | |↳ quantity |add |get |The quantity for the invoice line| | ||
- | |↳ total | |get The total of the given line (tax included) as a string| | + | |↳ total | |get |The total of the given line (tax included) as a string| |
|↳ total_cents | |get |The total as an integer number of cents| | |↳ total_cents | |get |The total as an integer number of cents| | ||
|↳ package | |get |If the line is linked to a service, the package of that service at the time of generating the invoice.| | |↳ package | |get |If the line is linked to a service, the package of that service at the time of generating the invoice.| |