Retrieves an array of invoices for a specified date range, optionally filtered by one or more properties.
GET https://api.commissionfactory.com/V1/Affiliate/Invoices?apiKey=[apiKey]&fromDate=[fromDate]&toDate=[toDate]&number=[number]
Name | Type | Description |
---|---|---|
apiKey Required |
String | A valid API key that represents an affiliate account. |
fromDate Required |
DateTime | The start date of the date range to select. |
toDate Required |
DateTime | The end date of the date range to select. |
number Optional |
String | If specified, filters results by number. |
Type | Description |
---|---|
InvoiceArray | Represents zero or more invoices. |
Error | Description |
---|---|
400 Bad Request | One or more parameters could not be parsed correctly. |
401 Unauthorised | The API key is missing, invalid, or for a different account type; or the user account has been suspended or closed. |
429 Too Many Requests | The API call rate limit for the user account has been exceeded. |
500 Internal Server Error | An unexpected error occurred while processing your request. |
The selected date range is inclusive of the fromDate and toDate parameters.
Both parameters are truncated so that only their date components are used, and their time components (if present) are ignored.
If fromDate is greater than toDate, then the parameters are swapped.
GET /V1/Affiliate/Invoices?apiKey=ABC123&fromDate=2000-01-01&toDate=2000-01-03 HTTP/1.1 Accept: application/json Host: api.commissionfactory.com
GET /V1/Affiliate/Invoices?apiKey=ABC123&fromDate=2000-01-01&toDate=2000-01-03 HTTP/1.1 Accept: application/xml Host: api.commissionfactory.com
[ { "Id": 1, "DateCreated": "2000-01-01T00:00:00.000", "DatePaid": "2000-01-01T00:00:00.000", "Number": "CF-1-0001", "Description": "Commissions up to 1/01/2000", "SubTotal": 100.0000, "GST": null, "Total": 100.0000 }, { "Id": 2, "DateCreated": "2000-02-01T00:00:00.000", "DatePaid": "2000-02-01T00:00:00.000", "Number": "CF-1-0002", "Description": "Commissions up to 1/02/2000", "SubTotal": 100.0000, "GST": null, "Total": 100.0000 }, { "Id": 3, "DateCreated": "2000-03-01T00:00:00.000", "DatePaid": "2000-03-01T00:00:00.000", "Number": "CF-1-0003", "Description": "Commissions up to 1/03/2000", "SubTotal": 100.0000, "GST": null, "Total": 100.0000 } ]
<InvoiceArray xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://api.commissionfactory.com/V1/Affiliate"> <Invoice> <Id>1</Id> <DateCreated>2000-01-01T00:00:00.000</DateCreated> <DatePaid>2000-01-01T00:00:00.000</DatePaid> <Number>CF-1-0001</Number> <Description>Commissions up to 1/01/2000</Description> <SubTotal>100.0000</SubTotal> <GST>null</GST> <Total>100.0000</Total> </Invoice> <Invoice> <Id>2</Id> <DateCreated>2000-02-01T00:00:00.000</DateCreated> <DatePaid>2000-02-01T00:00:00.000</DatePaid> <Number>CF-1-0002</Number> <Description>Commissions up to 1/02/2000</Description> <SubTotal>100.0000</SubTotal> <GST>null</GST> <Total>100.0000</Total> </Invoice> <Invoice> <Id>3</Id> <DateCreated>2000-03-01T00:00:00.000</DateCreated> <DatePaid>2000-03-01T00:00:00.000</DatePaid> <Number>CF-1-0003</Number> <Description>Commissions up to 1/03/2000</Description> <SubTotal>100.0000</SubTotal> <GST>null</GST> <Total>100.0000</Total> </Invoice> </InvoiceArray>