get https://secure.fusebill.com/v1/ProductItems?query=parameterName:Value&pageSize=100&pageNumber=0
This method returns a list of all tracked items, active and deleted, across your entire account. Due to the likely size of the request, pagination is strongly recommended. Filtering on status
"Active" and productId
may also be useful.
This call supports string filtering (Read More) and date filtering (Read More)
&query=parameterName:Value
Parameter Name | Acceptable values | Parameter Name | Acceptable values |
---|---|---|---|
customerId | Integer | Customer.QuickBooksId | Integer |
Customer.AccountStatus | Good, Collection, PoorStanding | Customer.Reference | String |
Customer.Arbalance | Decimal Range | Customer.SalesforceId | String |
Customer.CompanyName | String | Customer.Status | Draft, Active, Hold, Suspended, Cancelled |
Customer.CreatedTimestamp | Date Range | createdTimestamp | Date Range |
Customer.CurrencyId | Integer (1-24)* | description | String |
Customer.CurrentMrr | Decimal Range | modifiedTimestamp | Date Range |
Customer.CurrentNetMrr | Decimal Range | name | String |
Customer.CustomerReference.Reference1 | String | productId | Integer |
Customer.CustomerReference.Reference2 | String | Product.Code | String |
Customer.CustomerReference.Reference3 | String | Product.Description | String |
Customer.FirstName | String | Product.Name | String |
Customer.LastName | String | Purchase.Description | String |
Customer.MiddleName | String | Purchase.Name | String |
Customer.ModifiedTimestamp | Date Range | Purchase.PurchaseTimestamp | Date Range |
Customer.MonthlyRecurringRevenue | Decimal Range | Purchase.Status | Draft, Purchased, Reversed, Cancelled |
Customer.NetMRR | Decimal Range | reference | String |
Customer.NetSuiteId | String | status | Active, Deleted |
Customer.ParentId | Integer |
* 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/productItems?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/productItems?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/productItems?query={query}&pageSize=100&pageNumber=0’, headers=headers)
print(r.content)
Response
[
{
"reference": "vh63k2jxu77291",
"name": "Liscence Code",
"description": "Premium Edition",
"purchaseId": 165111,
"customerId": 650594,
"productId": 46818,
"status": "Active",
"createdDate": "2019-11-08T13:50:32",
"modifiedDate": "2019-11-08T13:50:32.64",
"id": 242593,
"uri": "https://secure.fusebill.com/v1/purchaseProductItems/242593"
},
{
"reference": 123459651622156,
"name": "Thermostat",
"description": "MODEL MC1-0092",
"subscriptionProductId": 2334138,
"subscriptionId": 305425,
"customerId": 643539,
"productId": 46818,
"status": "Active",
"createdDate": "2019-11-01T11:51:26",
"modifiedDate": "2019-11-01T11:51:26.77",
"id": 242386,
"uri": "https://secure.fusebill.com/v1/subscriptionProductItems/242386"
}
]
//malformed query string.
{
"ErrorId": 0,
"HttpStatusCode": 400,
"Errors": [
{
"Key": "Api Error",
"Value": "Bad request, the query is not valid. Please check your request and try again."
}
]
}