List Invoices By Customer

This action allows you to retrieve a list of posted invoices that belong to the customer being referenced.


URL Parameters

This call supports string filtering (Read More) and datetime/numeric range filtering (Read More)
&query=parameterName:Value

Parameter NameAcceptable ValuesParameter NameAcceptable Values
createdTimestampDate RangepoNumberString
closingArBalanceDecimal RangepostedTimestampDate Range
effectiveTimestampDate RangesalesforceIDString
invoiceNumberIntegertotalInstallmentsInteger
netsuiteIdStringquickBooksIdInteger
openingArBalanceDecimal Range

This call supports pagination (Read More)
&pageSize=100&pageNumber=0
This call supports sorting (Read More)
&sortOrder=Ascending or &sortOrder=Descending
&sortExpression=expression

Examples
curl -X GET "https://secure.fusebill.com/v1/Customers/{customerId}/Invoices/?showTrackedItems=false&query={query}&pageSize=100&pageNumber=0" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}"
//query parameter
bool showTrackedItems = false;
int customerId = {customerId};
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/Customers/"+ customerId + "/Invoices/?showTrackedItems="+ showTrackedItems + "&query={query}&pageSize=100&pageNumber=0");
//Add Content type
request.ContentType = "application/json";
//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/Customers/{id}/Invoices/?showTrackedItems=false&query={query}&pageSize=100&pageNumber=0', headers=headers)
print(r.content)
Response
[
  {
    "invoiceNumber": 290,
    "invoiceSignature": "<p><img src=\"https://fbhostedpagesdev.blob.core.windows.net/local/logo-636308250333992560.png\" alt=\"ID\">  <strong>mattLtest</strong>  \n</p>\n<p><em> |  | [][1]</em></p>\n<p>[1]: </p>\n",
    "poNumber": null,
    "effectiveTimestamp": "2017-06-12T19:48:51",
    "postedTimestamp": "2017-06-12T19:48:51",
    "modifiedTimestamp": "2019-10-15T15:10:16",
    "charges": [
      {
        "quantity": 7,
        "unitPrice": 37.714285,
        "amount": 264,
        "name": "Tiered product 2",
        "description": null,
        "glCode": "",
        "effectiveTimestamp": "2017-06-12T19:48:51",
        "proratedUnitPrice": null,
        "startServiceDate": "2017-06-12T19:48:51",
        "endServiceDate": "2017-06-25T04:00:00",
        "rangeQuantity": null,
        "isReversable": true,
        "discount": null,
        "discounts": [],
        "subscriptionProduct": {
          "id": 123456,
          "uri": "https://secure.fusebill.com/v1/subscriptionProducts/{ID}"
        },
        "purchase": null,
        "chargeTiers": [
          {
            "label": "0-2",
            "quantity": 2,
            "unitPrice": 22,
            "amount": 44
          },
          {
            "label": ">2-4",
            "quantity": 2,
            "unitPrice": 33,
            "amount": 66
          },
          {
            "label": ">4-5",
            "quantity": 1,
            "unitPrice": 44,
            "amount": 44
          },
          {
            "label": ">5",
            "quantity": 2,
            "unitPrice": 55,
            "amount": 110
          }
        ],
        "id": 123456,
        "uri": null
      }
    ],
    "subtotal": 264,
    "invoiceAmount": 264,
    "totalPayments": 0,
    "outstandingBalance": 264,
    "terms": "Net10",
    "customerId": 123456,
    "invoiceCustomer": {
      "firstName": "John",
      "middleName": null,
      "lastName": "Smith",
      "companyName": null,
      "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,
      "netMonthlyRecurringRevenue": 0,
      "salesforceId": null,
      "salesforceAccountType": null,
      "salesforceSynchStatus": null,
      "netsuiteId": null,
      "netsuiteCustomerType": null,
      "portalUserName": null,
      "parentId": null,
      "quickBooksLatchType": null,
      "quickBooksId": null,
      "quickBooksSyncToken": null,
      "id": 0,
      "uri": null
    },
    "invoiceCustomerAddressPreference": {
      "contactName": null,
      "shippingInstructions": null,
      "useBillingAddressAsShippingAddress": false,
      "billingAddress": null,
      "shippingAddress": null,
      "id": 0,
      "uri": null
    },
    "sumOfCreditNotes": 0,
    "totalWriteoffs": 0,
    "taxes": [],
    "totalDiscount": 0,
    "paymentSchedules": [
      {
        "dueDateTimestamp": "2017-06-22T19:48:51",
        "status": "Due",
        "amount": 264,
        "outstandingBalance": 264,
        "daysDueAfterTerm": 0
      }
    ],
    "notes": "api test",
    "customerReferenceValue": "",
    "openingArBalance": 22,
    "closingArBalance": 286,
    "invoiceInMemoryOnly": false,
    "id": 123456,
    "uri": "https://secure.fusebill.com/v1/Invoices/{ID}"
  },
  {
    "invoiceNumber": 283,
    "invoiceSignature": "<p><img src=\"https://fbhostedpagesdev.blob.core.windows.net/local/logo-636308250883322560.png\" alt=\"{user}\">  <strong>mattLtest</strong>  \n</p>\n<p><em>{user} |  | [][1]</em></p>\n<p>[1]: </p>\n",
    "poNumber": null,
    "effectiveTimestamp": "2017-06-09T13:16:43",
    "postedTimestamp": "2017-06-09T13:16:43",
    "charges": [
      {
        "quantity": 1,
        "unitPrice": 22,
        "amount": 22,
        "name": "Tiered product 2",
        "description": null,
        "glCode": "",
        "effectiveTimestamp": "2017-06-09T13:16:43",
        "proratedUnitPrice": null,
        "startServiceDate": "2017-06-09T13:16:43",
        "endServiceDate": "2017-06-25T04:00:00",
        "rangeQuantity": null,
        "isReversable": true,
        "discount": null,
        "discounts": [],
        "subscriptionProduct": {
          "id": 123456,
          "uri": "https://secure.fusebill.com/v1/subscriptionProducts/{ID}"
        },
        "purchase": null,
        "chargeTiers": [
          {
            "label": "0-2",
            "quantity": 1,
            "unitPrice": 22,
            "amount": 22
          }
        ],
        "id": 123456,
        "uri": null
      }
    ],
    "subtotal": 22,
    "invoiceAmount": 22,
    "totalPayments": 0,
    "outstandingBalance": 22,
    "terms": "Net10",
    "customerId": 123456,
    "invoiceCustomer": {
      "firstName": "John",
      "middleName": null,
      "lastName": "Smith",
      "companyName": null,
      "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,
      "netMonthlyRecurringRevenue": 0,
      "salesforceId": null,
      "salesforceAccountType": null,
      "salesforceSynchStatus": null,
      "netsuiteId": null,
      "netsuiteCustomerType": null,
      "portalUserName": null,
      "parentId": null,
      "quickBooksLatchType": null,
      "quickBooksId": null,
      "quickBooksSyncToken": null,
      "id": 0,
      "uri": null
    },
    "invoiceCustomerAddressPreference": {
      "contactName": null,
      "shippingInstructions": null,
      "useBillingAddressAsShippingAddress": false,
      "billingAddress": null,
      "shippingAddress": null,
      "id": 0,
      "uri": null
    },
    "sumOfCreditNotes": 0,
    "totalWriteoffs": 0,
    "taxes": [],
    "totalDiscount": 0,
    "paymentSchedules": [
      {
        "dueDateTimestamp": "2017-06-19T13:16:43",
        "status": "Due",
        "amount": 22,
        "outstandingBalance": 22,
        "daysDueAfterTerm": 0
      }
    ],
    "notes": "api test",
    "customerReferenceValue": "",
    "openingArBalance": 0,
    "closingArBalance": 22,
    "invoiceInMemoryOnly": false,
    "invoiceRevisions":[],
    "id": 162281,
    "uri": "https://secure.fusebill.com/v1/Invoices/{ID}"
  }
]
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Bad request, the query is not valid.  Please check your request and try again."
        }
    ]
}
Path Params
boolean
required

showZeroDollarCharges: When set to true, this option tells Stax Bill to return details of any tracked items purchased on these invoices.

integer
required

This Customer ID determines which Customer account you query for Invoices.

Response
200
Language
Credentials
Header
LoadingLoading…