Differences

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

Link to this comparison view

Next revisionBoth sides next revision
api:api_invoices [2014/07/12 12:59] – created Lauri Elevantapi:api_invoices [2014/07/12 13:03] Lauri Elevant
Line 1: Line 1:
 +====== /api/invoices ======
 +
 +===== HEAD, GET =====
 +
 +List invoices using the filters set as parameters. The number of invoices is represented in the ''X-Count'' header - use the ''HEAD'' request to simply count the number of invoices matching the filters. Use the ''GET'' request to actually fetch them.
 +
 +==== Syntax ====
 +
 +  GET /api/invoices
 +  Host: apply.example.edu
 +  Authorization: DREAM apikey="..."
 +
 ==== Parameters ==== ==== Parameters ====
  
 ^ Name ^  ^ Description ^ Notes ^ ^ Name ^  ^ Description ^ Notes ^
-| ''byCitizenships'' | Optional | List of [[http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2|ISO 3166-1 alpha-2 country codes]] | [1] | +| ''byApplicantIDs'' | Optional | List of [[api:api_applicants|applicant ID-s]] | [1] | 
-| ''byTrackerIDs'' | Optional | List of [[api:api_applicants_trackers|tracker ID-s]] | [1] [2] | +| ''bySerieIDs'' | Optional | List of [[api:api_invoices_series|serie ID-s]] | [1] | 
-| ''byTrackerCodes'' | Optional | List of [[api:api_applicants_trackers|tracker codes]] | [1] [2] |+| ''byCurrencies'' | Optional | List of 3-letter currency symbols | [1] 
 +| ''byCollected'' | Optional | Set ''true'' to only fetch invoices that have been collected. Set ''false'' to only fetch invoices that have not been collected yet. | | 
 +| ''byOverdue'' | Optional | Set ''true'' to only fetch invoices that are overdue (not collected and deadline has passed). Set ''false'' to fetch invoices that are not overdue (collected or deadline not yet arrived). | |
  
   * // Note [1]: Lists can be either comma or space separated. All list items are combined with logical ''OR'' operators - in other words an application is considered matching if it matches to any of the values in the list.//   * // Note [1]: Lists can be either comma or space separated. All list items are combined with logical ''OR'' operators - in other words an application is considered matching if it matches to any of the values in the list.//
-  * //Note [2]you may use either tracker ID-s or codes to reference trackers. However ID-s are guaranteed not to change while the tracker codes offer no such guarantee. //+ 
 +==== Response headers ==== 
 + 
 +  Content-Type: application/json 
 +  Content-Length1234 
 +  X-Count: 15