Get invoice PDF download link
GET
/invoices/{slug}/pdfCosts 1 rate-limit point · Rate limits
Generate (if needed) and return a signed download URL for the invoice or packing slip PDF. Optionally specify a template.
Path parameters
slugstringRequiredThe invoice's unique slug (UUID).
Query parameters
template_idintegerOptional template ID. Falls back to the store's default.
packing_slipbooleanSet
trueto return the packing slip instead of the invoice. Inferred automatically whentemplate_idpoints at a packing slip template. Packing slips are stored separately, so both documents stay retrievable for the same order.
Returns
invoiceobjectShow 3 child attributesHide child attributes
slugstringExample:k7xq2m9d4rnumberstringExample:INV-1042pdf_urlstringSigned download URL.
Errors
401
Missing or invalid API key.
403
The store is not on a paid plan. API access requires a paid Invoice Falcon plan.
404
Resource not found.
422
Request could not be processed.
429
Rate limit exceeded. Check X-RateLimit-Reset header.
GET/invoices/{slug}/pdf
curl "https://app.invoicefalcon.com/api/v1/external/invoices/{slug}/pdf" \
-H "X-Auth-Token: $INVOICE_FALCON_API_KEY"const res = await fetch("https://app.invoicefalcon.com/api/v1/external/invoices/{slug}/pdf", {
headers: {
"X-Auth-Token": process.env.INVOICE_FALCON_API_KEY,
},
});
const data = await res.json();import os
import requests
res = requests.get(
"https://app.invoicefalcon.com/api/v1/external/invoices/{slug}/pdf",
headers={"X-Auth-Token": os.environ["INVOICE_FALCON_API_KEY"]},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.invoicefalcon.com/api/v1/external/invoices/{slug}/pdf")
req = Net::HTTP::Get.new(uri, "X-Auth-Token" => ENV["INVOICE_FALCON_API_KEY"])
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)Response
{
"invoice": {
"slug": "k7xq2m9d4r",
"number": "INV-1042",
"pdf_url": "https://invoicefalcon.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZXhhbXBsZSI6dHJ1ZX19/INV-1042.pdf?disposition=attachment"
}
}{
"error": "Invalid API key"
}{
"error": "REST API access requires a paid plan"
}{
"error": "Not found"
}{
"error": "param is missing or the value is empty: customer",
"errors": {}
}{
"error": "Rate limit exceeded",
"retry_after": 30,
"message": "You have exceeded the rate limit of 40 points per 60 seconds. Read requests cost 1 point(s) and write requests cost 2 point(s). Please retry after 30 second(s)."
}