Bulk generate PDFs
POST
/invoices/bulk_pdfCosts 2 rate-limit points · Rate limits
Queue a bulk PDF generation job for a set of invoice IDs. Returns a bulk action ID to track progress. Maximum 5,000 invoices per request.
Request body
invoice_idsarray of integersRequiredArray of invoice IDs to generate PDFs for.
template_namestringTemplate name to use.
Default"default"
Returns
bulk_actionobjectShow 3 child attributesHide child attributes
idintegerExample:2087statusstringExample:pendingtotal_countintegerExample:3
Errors
401
Missing or invalid API key.
403
The store is not on a paid plan. API access requires a paid Invoice Falcon plan.
422
Request could not be processed.
429
A bulk action is already in progress for the store, or the rate limit was exceeded.
POST/invoices/bulk_pdf
curl -X POST "https://app.invoicefalcon.com/api/v1/external/invoices/bulk_pdf" \
-H "X-Auth-Token: $INVOICE_FALCON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"invoice_ids": [
48213,
48190,
48177
]
}'const res = await fetch("https://app.invoicefalcon.com/api/v1/external/invoices/bulk_pdf", {
method: "POST",
headers: {
"X-Auth-Token": process.env.INVOICE_FALCON_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"invoice_ids": [
48213,
48190,
48177
]
}),
});
const data = await res.json();import os
import requests
res = requests.post(
"https://app.invoicefalcon.com/api/v1/external/invoices/bulk_pdf",
headers={"X-Auth-Token": os.environ["INVOICE_FALCON_API_KEY"]},
json={
"invoice_ids": [
48213,
48190,
48177
]
},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.invoicefalcon.com/api/v1/external/invoices/bulk_pdf")
req = Net::HTTP::Post.new(uri, "X-Auth-Token" => ENV["INVOICE_FALCON_API_KEY"], "Content-Type" => "application/json")
req.body = {
invoice_ids: [
48213,
48190,
48177
]
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)POST/invoices/bulk_pdf
curl -X POST "https://app.invoicefalcon.com/api/v1/external/invoices/bulk_pdf" \
-H "X-Auth-Token: $INVOICE_FALCON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"invoice_ids": [
48213,
48190
],
"template_name": "Wholesale invoice"
}'const res = await fetch("https://app.invoicefalcon.com/api/v1/external/invoices/bulk_pdf", {
method: "POST",
headers: {
"X-Auth-Token": process.env.INVOICE_FALCON_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"invoice_ids": [
48213,
48190
],
"template_name": "Wholesale invoice"
}),
});
const data = await res.json();import os
import requests
res = requests.post(
"https://app.invoicefalcon.com/api/v1/external/invoices/bulk_pdf",
headers={"X-Auth-Token": os.environ["INVOICE_FALCON_API_KEY"]},
json={
"invoice_ids": [
48213,
48190
],
"template_name": "Wholesale invoice"
},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.invoicefalcon.com/api/v1/external/invoices/bulk_pdf")
req = Net::HTTP::Post.new(uri, "X-Auth-Token" => ENV["INVOICE_FALCON_API_KEY"], "Content-Type" => "application/json")
req.body = {
invoice_ids: [
48213,
48190
],
template_name: "Wholesale invoice"
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)Response
{
"bulk_action": {
"id": 2087,
"status": "pending",
"total_count": 3
}
}{
"error": "Invalid API key"
}{
"error": "REST API access requires a paid plan"
}{
"error": "param is missing or the value is empty: customer",
"errors": {}
}{
"error": "A bulk action is already in progress"
}