Invoices
B7R makes one invoice for an order when the order moves to In Production: what B7R charged your wallet for it, the lines and the shipping. The two reads below need the invoices:read area, which goes with orders:read. They answer the invoice your order's page in the app shows, for any order of your account, whatever its channel. Another account's order answers 404 not_found, exactly like an order that does not exist.
- An order still Created has no invoice:
404 not_found. Read it again once the order is In Production. - An Admin edit of an order makes a new invoice beside the first: both reads answer the newest, as the app does.
creditedistruewhen a credit note reverses the invoice: the order was cancelled after it was made. A credit note is a document of its own and is not answered here.kindistax_invoicefor a VAT invoice andinvoicefor one made before B7R charged VAT.vat_rateis the rate locked on the order.
Read an invoice
The invoice as its PDF states it: each line net of VAT, then the totals as money (net, vat, gross). The buyer and seller details stay in the PDF. pdf_ready is false when B7R has no PDF of the invoice.
Headers
Bearer b7r_live_.... A key with the invoices:read area. X-B7R-Key works too; send one, never both.
ar for Arabic error titles; anything else gives English. Codes never change.
Path
B7R's order id: opaque, B and digits.
Answer
The invoice number, as on the PDF.
tax_invoice: a VAT invoice. invoice: an invoice issued before B7R charged VAT. One of tax_invoice, invoice.
Child fields
As the invoice prints it. The shipping line is the last: Shipping, then the carrier's name after a long dash when the order has one.
One unit, net of VAT.
The line, net of VAT.
The rate locked on the order, a decimal: 0.15 is 15 %. 0 to 1.
net: the lines with shipping, net of VAT; vat; gross: what the invoice totals.
Child fields
Always "SAR".
True when a credit note reverses this invoice: the order was cancelled after it was made.
False when B7R has no PDF of this invoice: the PDF read answers 409 invoice_not_ready, and retrying will not change that.
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | No |
| 404 | not_found | No |
| 429 | rate_limited | Yes |
| 500 | internal_error | Yes |
| 502 | upstream_unavailable | Yes |
| 503 | api_unavailable | Yes |
| 503 | request_expired | Yes |
| 503 | service_unavailable | Yes |
| 504 | upstream_timeout | Yes |
curl https://api.b7r.app/v1/orders/B26112200042/invoice \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/orders/B26112200042/invoice", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/orders/B26112200042/invoice",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json(){
"number": "WC26112400017",
"order_id": "B26112200042",
"kind": "invoice",
"issued_at": "2026-11-24T09:12:44.512Z",
"lines": [
{
"description": "T-shirt Classic (B7R-TS-001-BLK-M)",
"quantity": 2,
"unit_price": "40.00",
"total": "80.00"
},
{
"description": "Shipping",
"quantity": 1,
"unit_price": "25.00",
"total": "25.00"
}
],
"vat_rate": 0,
"total": {
"net": "105.00",
"vat": "0.00",
"gross": "105.00",
"currency": "SAR"
},
"credited": false,
"pdf_ready": true
}Download the invoice PDF
The PDF itself, as application/pdf, the same file the app downloads. Save the bytes as they come; the answer is never cached and names no file: the app saves the same file as B7R-<order_id>.pdf. When B7R has no PDF of the invoice, the answer is 409 invoice_not_ready, and retrying will not change that: open a ticket from the Help Center in the B7R app. Every download is written to your activity log with the key that made it.
Headers
Bearer b7r_live_.... A key with the invoices:read area. X-B7R-Key works too; send one, never both.
ar for Arabic error titles; anything else gives English. Codes never change.
Path
B7R's order id: opaque, B and digits.
Answer
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | No |
| 404 | not_found | No |
| 409 | invoice_not_ready | No |
| 429 | rate_limited | Yes |
| 500 | internal_error | Yes |
| 502 | upstream_unavailable | Yes |
| 503 | api_unavailable | Yes |
| 503 | request_expired | Yes |
| 503 | service_unavailable | Yes |
| 504 | upstream_timeout | Yes |
curl https://api.b7r.app/v1/orders/B26112200042/invoice/pdf \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/orders/B26112200042/invoice/pdf", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/orders/B26112200042/invoice/pdf",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json()application/pdf: the file, byte for byte