get https://secure.fusebill.com/v1/CreditNotes/pdf/
This action reads a specific credit note as a PDF and not the JSON representation. It is not as detailed as Read Credit Note.
Warning
Throttled Endpoint.
Where possible, use Read Credit Note. It will contain the same data but is less demanding and more responsive.
Path Parameter
Property | Type | Description |
---|---|---|
creditNoteId | Integer | Fusebill generated ID of the specific credit note you want to read |
Examples
curl –X GET https://secure.fusebill.com/v1/CreditNotes/pdf/{creditNoteId} \
-H "Content-Type: application/json" \
-H "Authorization: Basic {APIKey}"
//Setup Credit Note ID:
int creditNoteId = {creditNoteId}
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/CreditNotes/pdf/" + creditNoteId);
//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 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/CreditNotes/pdf/{creditNoteId}', headers=headers)
print(r.content)
Response
Upon success, a rendered version of the credit note information in PDF format.
{
"ErrorId": 0,
"HttpStatusCode": 404,
"Errors": [
{
"Key": "Api Error",
"Value": "CreditNoteGroup with id 4 not found."
}
]
}