get https://secure.fusebill.com/v1/subscriptionproductitems/
This method will return a single Subscription Product Item.
Path Parameters
Property | Type | Description |
---|---|---|
subscriptionProductItemId | Integer | This is the Fusebill generated ID of the subscription product item |
Examples
curl -X GET "https://secure.fusebill.com/v1/subscriptionproductitems/{subscriptionProductId}" \
-H "Content-Type: application/json" \
-H "Authorization: Basic {APIKey}"
//path parameter
int pathParameter = {subscriptionProductId};
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/subscriptionproductitems/"+pathParameter);
//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/subscriptionProductItems/{id}', headers=headers)
print(r.content)
Response
{
"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": 404,
"Errors": [
{
"Key": "Api Error",
"Value": "SubscriptionProductItem with id 1234 not found."
}
]
}