get https://secure.fusebill.com/v1/subscriptionProducts//items?query=parameterName:value&pageSize=100&pageNumber=0
This endpoint will return a list of subscription product items for a specific subscription product.
Path Parameters
Property | Type | Description |
---|---|---|
subscriptionProductId | Integer | This is the unique ID of the subscription product for which you would like to retrieve a list of subscription product items. |
This call supports string filtering (Read More) and date filtering (Read More)
&query=parameterName:Value
Parameter Name | Acceptable Values | Parameter Name | Acceptable Values |
---|---|---|---|
createdTimestamp | Date Range | name | String |
description | String | reference | String |
modifiedTimestamp | Date Range | status | One of "Active", "Deleted" |
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/subscriptionProducts/{subscriptionProductId}/items?query=parameterName:value&pageSize=100&pageNumber=0" \
-H "Content-Type: application/json" \
-H "Authorization: Basic {APIKey}"
//path parameter, FusebillId
int pathParameter = {customerId};
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/subscriptionProducts/{subscriptionProductId}/items?query=parameterName:value&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/subscriptionProducts/{subscriptionProductId}/items?query=parameterName:value&pageSize=100&pageNumber=0', headers=headers)
print(r.content)
Response
[
{
"reference": 1234895132564231,
"name": "Thermostat",
"description": "MODEL MC1-0092",
"subscriptionProductId": 123456,
"subscriptionId": 1354892,
"customerId": 643539,
"productId": 46818,
"status": "Active",
"createdDate": "2019-11-01T11:51:26",
"modifiedDate": "2019-11-01T11:51:26.77",
"id": 242387,
"uri": "https://secure.fusebill.com/v1/subscriptionProductItems/242387"
},
{
"reference": 123459651622156,
"name": "Thermostat",
"description": "MODEL MC1-0092",
"subscriptionProductId": 123456,
"subscriptionId": 1354892,
"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"
}
]
{
"ErrorId": 0,
"HttpStatusCode": 400,
"Errors": [
{
"Key": "Api Error",
"Value": "Bad request, the query is not valid. Please check your request and try again."
}
]
}