Create an invoice
POST
/invoicesCosts 2 rate-limit points · Rate limits
Create (or retrieve) an invoice from a Shopify order ID. If the invoice already exists, it is returned. Optionally generates the PDF immediately.
Request body
order_idintegerRequiredShopify order or draft order ID.
draftbooleanSet
truefor draft orders (quotes/pro-formas).Defaultfalsegenerate_pdfbooleanWhether to generate the PDF immediately.
Defaulttruetemplate_idintegerOptional template ID for PDF generation.
packing_slipbooleanGenerate the packing slip instead of the invoice. Inferred automatically when
template_idpoints at a packing slip template.Defaultfalse
Returns
The invoice object.
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
Rate limit exceeded. Check X-RateLimit-Reset header.
POST/invoices
curl -X POST "https://app.invoicefalcon.com/api/v1/external/invoices" \
-H "X-Auth-Token: $INVOICE_FALCON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"order_id": 5873241604411
}'const res = await fetch("https://app.invoicefalcon.com/api/v1/external/invoices", {
method: "POST",
headers: {
"X-Auth-Token": process.env.INVOICE_FALCON_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"order_id": 5873241604411
}),
});
const data = await res.json();import os
import requests
res = requests.post(
"https://app.invoicefalcon.com/api/v1/external/invoices",
headers={"X-Auth-Token": os.environ["INVOICE_FALCON_API_KEY"]},
json={
"order_id": 5873241604411
},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.invoicefalcon.com/api/v1/external/invoices")
req = Net::HTTP::Post.new(uri, "X-Auth-Token" => ENV["INVOICE_FALCON_API_KEY"], "Content-Type" => "application/json")
req.body = {
order_id: 5873241604411
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)POST/invoices
curl -X POST "https://app.invoicefalcon.com/api/v1/external/invoices" \
-H "X-Auth-Token: $INVOICE_FALCON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"order_id": 5873241604411,
"generate_pdf": false
}'const res = await fetch("https://app.invoicefalcon.com/api/v1/external/invoices", {
method: "POST",
headers: {
"X-Auth-Token": process.env.INVOICE_FALCON_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"order_id": 5873241604411,
"generate_pdf": false
}),
});
const data = await res.json();import os
import requests
res = requests.post(
"https://app.invoicefalcon.com/api/v1/external/invoices",
headers={"X-Auth-Token": os.environ["INVOICE_FALCON_API_KEY"]},
json={
"order_id": 5873241604411,
"generate_pdf": False
},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.invoicefalcon.com/api/v1/external/invoices")
req = Net::HTTP::Post.new(uri, "X-Auth-Token" => ENV["INVOICE_FALCON_API_KEY"], "Content-Type" => "application/json")
req.body = {
order_id: 5873241604411,
generate_pdf: false
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)POST/invoices
curl -X POST "https://app.invoicefalcon.com/api/v1/external/invoices" \
-H "X-Auth-Token: $INVOICE_FALCON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"order_id": 1146789216411,
"draft": true
}'const res = await fetch("https://app.invoicefalcon.com/api/v1/external/invoices", {
method: "POST",
headers: {
"X-Auth-Token": process.env.INVOICE_FALCON_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"order_id": 1146789216411,
"draft": true
}),
});
const data = await res.json();import os
import requests
res = requests.post(
"https://app.invoicefalcon.com/api/v1/external/invoices",
headers={"X-Auth-Token": os.environ["INVOICE_FALCON_API_KEY"]},
json={
"order_id": 1146789216411,
"draft": True
},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.invoicefalcon.com/api/v1/external/invoices")
req = Net::HTTP::Post.new(uri, "X-Auth-Token" => ENV["INVOICE_FALCON_API_KEY"], "Content-Type" => "application/json")
req.body = {
order_id: 1146789216411,
draft: true
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)POST/invoices
curl -X POST "https://app.invoicefalcon.com/api/v1/external/invoices" \
-H "X-Auth-Token: $INVOICE_FALCON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"order_id": 5873241604411,
"template_id": 314,
"packing_slip": true
}'const res = await fetch("https://app.invoicefalcon.com/api/v1/external/invoices", {
method: "POST",
headers: {
"X-Auth-Token": process.env.INVOICE_FALCON_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"order_id": 5873241604411,
"template_id": 314,
"packing_slip": true
}),
});
const data = await res.json();import os
import requests
res = requests.post(
"https://app.invoicefalcon.com/api/v1/external/invoices",
headers={"X-Auth-Token": os.environ["INVOICE_FALCON_API_KEY"]},
json={
"order_id": 5873241604411,
"template_id": 314,
"packing_slip": True
},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.invoicefalcon.com/api/v1/external/invoices")
req = Net::HTTP::Post.new(uri, "X-Auth-Token" => ENV["INVOICE_FALCON_API_KEY"], "Content-Type" => "application/json")
req.body = {
order_id: 5873241604411,
template_id: 314,
packing_slip: true
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)Response
{
"invoice": {
"id": 48213,
"slug": "k7xq2m9d4r",
"number": "INV-1042",
"invoice_type": "invoice",
"total_price": "100.94",
"currency": "USD",
"financial_status": "paid",
"fulfillment_status": "fulfilled",
"order_name": "#1042",
"order_number": 1042,
"processed_at": "2026-01-15T09:30:00Z",
"note": "Please leave at the front desk.",
"created_at": "2026-01-15T09:31:12Z",
"updated_at": "2026-01-15T09:31:40Z",
"customer": {
"id": 9177,
"email": "jane.doe@example.com",
"first_name": "Jane",
"last_name": "Doe"
},
"billing_address": {
"first_name": "Jane",
"last_name": "Doe",
"company": "Doe Studio",
"address1": "12 Example Street",
"address2": "Suite 4",
"city": "Springfield",
"province": "Illinois",
"country": "United States",
"zip": "62701",
"phone": "+1 555 010 0199"
},
"shipping_address": {
"first_name": "Jane",
"last_name": "Doe",
"company": null,
"address1": "12 Example Street",
"address2": null,
"city": "Springfield",
"province": "Illinois",
"country": "United States",
"zip": "62701",
"phone": "+1 555 010 0199"
},
"line_items": [
{
"title": "Canvas tote bag",
"variant_title": "Natural / Large",
"quantity": 2,
"price": "45.00",
"sku": "TOTE-NAT-L"
},
{
"title": "Gift wrapping",
"variant_title": null,
"quantity": 1,
"price": "5.00",
"sku": null
}
],
"tax_lines": [
{
"title": "State tax",
"rate": 0.0625,
"price": "5.94"
}
]
}
}{
"error": "Invalid API key"
}{
"error": "REST API access requires a paid plan"
}{
"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)."
}