get https://secure.fusebill.com/v1/SubscriptionProductItemStatuses?reference=&parentId=
This call returns the status for entities related to the tracked item identified by its reference and product ID.
The statuses are returned as follows:
- Subscription (one of 'Active','Draft','Cancelled','Provisioning','Expired','Migrated','StandingOrder', or 'Suspended')
- Customer (one of 'Draft', 'Active', 'Hold', 'Suspended', or 'Cancelled')
- Customer Accounting (one of 'Good', 'PoorStanding', or 'Collection')
If you are using tracked items to manage entitlements or licensees, this returned data may be useful to determine whether or not you permit the user access to the service.
URL Parameters
Property | Type | Description | Required |
---|---|---|---|
Reference | String | The unique identifier for this tracked item. This uniqueness is enforced by Fusebill across all tracked items for that product, not just tracked items on the given subscription product. | Yes |
ProductId | Integer | The Fusebill generated ID that uniquely identifies a product. | Yes |
Examples
curl –X GET https://secure.fusebill.com/v1/SubscriptionProductItemStatuses?reference={Reference}&parentId={ProductId} \
-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/SubscriptionProductItemStatuses?reference={Reference}&parentId={ProductId}");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "GET";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(jsonData);
streamWriter.Flush();
streamWriter.Close();
}
//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 json
#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/SubscriptionProductItemStatuses?reference={Reference}&parentId={ProductId}', headers=headers)
print(r.content)
Response
{
"subscriptionStatus": "Active",
"customerStatus": "Active",
"customerAccountingStatus": "PoorStanding",
"uri": null
}