get https://secure.fusebill.com/v1/Products/
This function is used to retrieve a Product object by its unique ID.
Path Parameters
Property | Type | Description |
---|---|---|
productID | Integer | This is the Id value which uniquely identifies this Product in the Fusebill system. This value is unique to each Product. This is the Id of the Product you want to retrieve. |
Examples
curl -X GET "https://secure.fusebill.com/v1/Products/{productId}" \
-H "Content-Type: application/json" \
-H "Authorization: Basic {APIKey}"
//query parameter
int productsId = {productId};
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/Products/" + productsId);
//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/Products/{id}', headers=headers)
print(r.content)
Response
{
"code":"licenses",
"name":"Licenses",
"description":null,
"productType":"RecurringService",
"status":"Active",
"taxExempt":false,
"orderToCashCycle":null,
"availableForPurchase":false,
"isTrackingItems":false,
"quantity":null,
"avalaraItemCode":null,
"avalaraTaxCode":"O0000000",
"glCode":"",
"deletable":false,
"id":14935,
"uri":"https://secure.fusebill.com/v1/Products/14935"
}
{
"ErrorId": 0,
"HttpStatusCode": 404,
"Errors": [
{
"Key": "Api Error",
"Value": "Product with id 467322 not found."
}
]
}