get https://secure.fusebill.com/v1/Invoices/html/?showTrackedItems=
This action allows you to retrieve a single posted invoice by Id as an HTML file.
Path Parameters
Parameter | Type | Description |
---|---|---|
Id | Integer | The Id of the invoice you want to retrieve. |
URL Parameters
Parameter | Type | Description | Required |
---|---|---|---|
option | Boolean | When set to true, this option will tell Fusebill to return details of any tracked items which were purchased on this invoice. | Optional |
Examples
curl -X GET "https://secure.fusebill.com/v1/Invoices/html/{Id}?showTrackedItems=false" \
-H "Authorization: Basic {APIKey}"
//query parameter
bool showTrackedItems = false;
int invoiceId = {invoiceId};
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/Invoices/pdf/" + invoiceId + "?showTrackedItems=" + showTrackedItems);
//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/Invoices/pdf/{id}?showTrackedItems=false', headers=headers)
Response
Upon success, an HTML file is returned. This will look the same as the PDF invoice.
{
"ErrorId": 0,
"HttpStatusCode": 404,
"Errors": [
{
"Key": "Api Error",
"Value": "Invoice with id 2 not found."
}
]
}