Print credit note
/documents/credit_notes/{id}/pdfCosts 2 rate-limit points · Rate limits
Renders the credit note PDF (or reuses the stored one when nothing changed) and returns a signed download URL valid for one week, the file name and when it was generated.
Rendering a new PDF counts against a free plan invoice limit.
Also searched asdownload credit note pdfget credit note pdfprint credit noteregenerate credit note pdfcredit note pdf linkrender credit note
Path parameters
idstringRequired
Request body
regeneratebooleantrue renders the PDF again even when the stored one is current (default false).
template_idintegerTemplate to render with. Default: the shop default for this document type.
Returns
idintegerExample:980190964urlstring, nullablefilenamestring, nullablegenerated_atstring, nullable
Errors
Missing or unknown X-Auth-Token, or the shop uninstalled the app.
v3_required: the shop still runs the previous dashboard. paid_plan_required: API access needs a paid plan.
The resource does not exist for this shop, or no action is registered at this path.
The request failed validation. Nothing was saved.
Rate limited: cost-weighted per key (reads cost less than writes). Wait Retry-After seconds; see X-RateLimit-* headers.
Every error has the same shape: see Errors.
curl -X POST "https://app.invoicefalcon.com/api/v3/external/documents/credit_notes/980191059/pdf" \
-H "X-Auth-Token: $INVOICE_FALCON_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'const res = await fetch("https://app.invoicefalcon.com/api/v3/external/documents/credit_notes/980191059/pdf", {
method: "POST",
headers: {
"X-Auth-Token": process.env.INVOICE_FALCON_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const data = await res.json();import os
import requests
res = requests.post(
"https://app.invoicefalcon.com/api/v3/external/documents/credit_notes/980191059/pdf",
headers={"X-Auth-Token": os.environ["INVOICE_FALCON_API_KEY"]},
json={},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.invoicefalcon.com/api/v3/external/documents/credit_notes/980191059/pdf")
req = Net::HTTP::Post.new(uri, "X-Auth-Token" => ENV["INVOICE_FALCON_API_KEY"], "Content-Type" => "application/json")
req.body = {}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)curl -X POST "https://app.invoicefalcon.com/api/v3/external/documents/credit_notes/980191059/pdf" \
-H "X-Auth-Token: $INVOICE_FALCON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"regenerate": true,
"template_id": 313
}'const res = await fetch("https://app.invoicefalcon.com/api/v3/external/documents/credit_notes/980191059/pdf", {
method: "POST",
headers: {
"X-Auth-Token": process.env.INVOICE_FALCON_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"regenerate": true,
"template_id": 313
}),
});
const data = await res.json();import os
import requests
res = requests.post(
"https://app.invoicefalcon.com/api/v3/external/documents/credit_notes/980191059/pdf",
headers={"X-Auth-Token": os.environ["INVOICE_FALCON_API_KEY"]},
json={
"regenerate": True,
"template_id": 313
},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.invoicefalcon.com/api/v3/external/documents/credit_notes/980191059/pdf")
req = Net::HTTP::Post.new(uri, "X-Auth-Token" => ENV["INVOICE_FALCON_API_KEY"], "Content-Type" => "application/json")
req.body = {
regenerate: true,
template_id: 313
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body){
"id": 980190964,
"url": null,
"filename": null,
"generated_at": null
}{
"errors": [
"Invalid API key"
],
"code": "unauthorized"
}{
"errors": [
"API access requires a paid plan"
],
"code": "paid_plan_required"
}{
"errors": [
"Resource not found"
],
"code": "not_found"
}{
"errors": [
"id is missing"
]
}{
"errors": [
"Rate limit exceeded"
],
"code": "rate_limited"
}