Purchase List Summary

This function is used to retrieve a list of purchase objects.

To manage the size of the data returned, it is strongly recommended that pagination is used.

URL Parameters

Parameter nameAcceptable Type
customerIDInteger
purchaseIdInteger
invoiceNumberInteger
firstNameString
lastNameString
referenceString
productCodeString
nameString
descriptionString
createdDateDate Range
cancellationDateDate Range
invoicedDateDate Range
datePaidDate Range
purchaseStatusString
purchaseOnPaidInvoicesBoolean
currencyString

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

* See here for Fusebill currency codes
This call supports pagination (Read More)
&pageSize=10&pageNumber=0
This call supports sorting (Read More)
&sortOrder=Ascending or &sortOrder=Descending
&sortExpression=expression

Examples
curl -X GET "https://secure.fusebill.com/v1/PurchaseSummary&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/purchases/getbyProductId?id={{productID}}&query=Quantity:0|5&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 JSON
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI, Payload and Headers
r = requests.get('https://secure.fusebill.com/v1/purchases/getbyProductId?id={{productID}}&query=Quantity:0|5&pageSize=100&pageNumber=0', headers=headers)
print(r.content)
Response
[
  {
    "name": "Widget",
    "description": "An arbitrary sale item",
    "reference": "AB44412",
    "customerFullName": "Samantha Smith",
    "firstName": "Samantha",
    "companyName": "",
    "invoiceNumber": 1125,
    "invoiceId": 30337,
    "status": "Purchased",
    "invoiceStatus": "Due",
    "customerId": 30534,
    "productCode": "PhysicalGood",
    "createdDate": "2022-10-24T18:10:46",
    "cancellationDate": null,
    "netAmount": 10.0,
    "currency": "USD",
    "finalizationDate": "2022-10-24T18:26:52",
    "id": 20035,
    "uri": "https://secure.fusebill.com/v1/PurchaseSummary/20035"
  }
]
{
  "ErrorId": 0,
  "HttpStatusCode": 404,
  "Errors": [
    {
      "Key": "Api Error",
      "Value": "Product with id 1 not found."
    }
  ]
}
Language
Authorization