get https://secure.fusebill.com/v1/Invoices?query=parameterName:value&pageSize=100&pageNumber=0
This function returns an array of all posted Invoices.
In order to manage the size of the data returned it is recommended for the number of results to be controlled by the pagesize
parameter. It is also possible to use the query parameter for filtering. Note that there is no breakdown of line-items in these objects. For that, use List Invoices by Customer.
This call supports string filtering (Read More) and datetime/numeric range filtering (Read More)
&query=parameterName:Value
Parameter Name | Acceptable Values | Parameter Name | Acceptable Values |
---|---|---|---|
createdTimestamp | Date Range | Customer.NetMRR | Decimal Range |
closingArBalance | Decimal Range | Customer.ParentId | Integer |
customerId | Integer | Customer.Status | Draft, Active, Cancelled, Hold, Suspended |
Customer.AccountStatus | Good, PoorStanding, Collection | effectiveTimestamp | Date Range |
Customer.Arbalance | Decimal Range | invoiceNumber | Integer |
Customer.CreatedTimestamp | Date Range | netsuiteId | String |
Customer.CurrentMrr | Decimal Range | openingArBalance | Decimal Range |
Customer.CurrentNetMrr | Decimal Range | poNumber | Date Range |
Customer.CustomerReference.Reference1 | String | postedTimestamp | Date Range |
Customer.CustomerReference.Reference2 | String | SalesforceID | String |
Customer.CustomerReference.Reference3 | String | totalInstallments | Integer |
Customer.ModifiedTimestamp | Date Range | quickBooksId | Integer |
Customer.MonthlyRecurringRevenue | Decimal Range |
This call supports pagination (Read More)
&pageSize=100&pageNumber=0
This call supports sorting (Read More)
&sortOrder=Ascending
or &sortOrder=Descending
&sortExpression=expression
Request Examples
GET https://secure.fusebill.com/v1/Invoices?pageSize=20&pageNumber=0&sortOrder=Ascending&sortExpression=postedTimestamp
Authorization: Basic {{apikey}}
//this example returns at most 20 invoices ordered from oldest post timestamp to newest
GET https://secure.fusebill.com/v1/Invoices?pageSize=20&pageNumber=0&query=postedTimestamp:2019-08-08|2019-08-20
Authorization: Basic {{apikey}}
//this example returns at most 20 invoices with a post timestamp in the given range
Examples
curl –X GET https://secure.fusebill.com/v1/Invoices?query={query}&pageSize=100&pageNumber=0 \
-H "Content-Type: application/json" \
-H "Authorization: Basic {APIKey}"
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/Invoices?query={query}&pageSize=100&pageNumber=0");
//Add Content type
request.ContentType = "application/json";
request.ContentLength = 0;
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "GET";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
result = streamReader.ReadToEnd();
}
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI and Headers
r = requests.get('https://secure.fusebill.com/v1/Invoices?query={query}&pageSize=100&pageNumber=0', headers=headers)
print(r.content)
Response
[
{
"invoiceNumber": 10,
"invoiceSignature": "<p><strong>Company Name</strong> \r</p>\n<p><em>Company Name | | [][1]</em></p>\n<p>[1]: </p>\n",
"poNumber": null,
"effectiveTimestamp": "2019-08-19T18:33:11",
"postedTimestamp": "2019-08-19T18:33:11",
"modifiedTimestamp": "2019-10-15T15:10:16",
"charges": [],
"subtotal": 25.0000,
"invoiceAmount": 25.0000,
"totalPayments": 0.0000,
"unsettled": false,
"outstandingBalance": 25.0000,
"terms": "Net30",
"defaultTerms": "Net30",
"isDefaultTerms": true,
"customerId": 11796788,
"invoiceCustomer": {
"firstName": "Jim",
"middleName": null,
"lastName": "Davis",
"companyName": "Fusebill",
"suffix": null,
"primaryEmail": null,
"primaryPhone": null,
"secondaryEmail": null,
"secondaryPhone": null,
"title": "",
"reference": null,
"status": null,
"customerAccountStatus": null,
"currency": "USD",
"customerReference": null,
"customerAcquisition": null,
"monthlyRecurringRevenue": 0.0,
"netMonthlyRecurringRevenue": 0.0,
"salesforceId": null,
"salesforceAccountType": null,
"salesforceSynchStatus": null,
"netsuiteId": null,
"netsuiteSynchStatus": null,
"netsuiteCustomerType": null,
"portalUserName": null,
"parentId": null,
"quickBooksLatchType": null,
"quickBooksId": null,
"quickBooksSyncToken": null,
"hubSpotId": null,
"id": 0,
"uri": null
},
"invoiceCustomerAddressPreference": {
"contactName": null,
"shippingInstructions": null,
"useBillingAddressAsShippingAddress": false,
"billingAddress": {
"customerAddressPreferenceId": 0,
"companyName": "sample string 3",
"line1": "sample string 4",
"line2": "sample string 5",
"countryId": 10,
"country": "Antarctica",
"stateId": null,
"state": "sample string 9",
"city": "sample string 6",
"postalZip": "1234567890",
"addressType": null,
"valid": false,
"id": 1009228,
"uri": null
},
"shippingAddress": {
"customerAddressPreferenceId": 0,
"companyName": "sample string 3",
"line1": "sample string 4",
"line2": "sample string 5",
"countryId": 10,
"country": "Antarctica",
"stateId": null,
"state": "sample string 9",
"city": "sample string 6",
"postalZip": "1234567890",
"addressType": null,
"valid": false,
"id": 1009227,
"uri": null
},
"id": 0,
"uri": null
},
"sumOfCreditNotes": 0.0000,
"totalWriteoffs": 0.0000,
"taxes": [],
"totalDiscount": 0.0000,
"paymentSchedules": [
{
"dueDateTimestamp": "2019-09-18T04:00:00",
"status": "Due",
"amount": 25.0000,
"outstandingBalance": 25.0000,
"daysDueAfterTerm": 0
}
],
"notes": null,
"customerReferenceValue": null,
"openingArBalance": 0.0000,
"closingArBalance": 25.0000,
"invoiceInMemoryOnly": false,
"invoiceRevisions":[],
"totalTaxes": 0.0000,
"isSummarized": false,
"rollUpPdf": false,
"id": 7743578,
"uri": "https://secure.fusebill.com/v1/Invoices/7743578"
}
]
{
"ErrorId": 0,
"HttpStatusCode": 400,
"Errors": [
{
"Key": "Api Error",
"Value": "Bad request, the query is not valid. Please check your request and try again."
}
]
}