Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
api [2017/07/05 17:14]
daniel@atomx.com
api [2017/08/18 04:35]
daniel@atomx.com
Line 28: Line 28:
  
 For a list of models and their attributes see: [[api models]]. For a list of models and their attributes see: [[api models]].
 +
 +
 +Invoices
 +--------
 +
 +Invoice lists and the invoice PDFs can be received with the different
 +`/invoices` endpoints.
 +
 +Invoice `type` is one of: `advertiser`,​ `publisher`,​ `network-sell` or `network-buy`.
 +
 +Adding a '​date>'​ request parameter changes the start date (inclusive)
 +of the invoice list and '​date<'​ the end date (exclusive).
 +`date` has the format `YYYY-MM`.
 +
 +E.g. `GET :​api/​invoices/​network-buy/​42?​date>​=2016-10&​date<​=2017-03`
 +will get all invoices from 10.2016 (including) to 03.2017 (excluded).
 +
 +- `/​invoices/​{type}`
 +  Receive all invoices for the specified type.
 +  If no `data` parameter is given it will return a list of invoices for
 +  the current month.
 +- `/​invoices/​{type}/​{id}`
 +  Receive all invoice for the specified type plus id.
 +  If no `date` parameter is given it will default to January this year to the
 +  current month.
 +
 +  E.g. to receive all invoices for advertiser with id 42 of the current year
 +  `GET /​invoices/​advertiser/​42`
 +- `/​invoices/​{type}/​{id}/​{date}`
 +  Download the invoice PDF for the specified date.