Mass Invoicing API
Submit bounded JSON batches of native invoices, credit memos, sales receipts and refund receipts, with deterministic customer matching and individual outcomes.
Open this screen
Settings > AI > Enable Mass Invoicing API. Monitor batches in FOR:OMNI.
When it is available
FOR:CEO only, with an active subscription and authorization by the company's primary user. FOR staff can make the feature unavailable for one company. Availability alone never creates a key or grants consent.
QuickBooks connection
This API records documents in FOR:CEO only. It does not write to QuickBooks or create billing plans, sales orders or inventory movements.
Authorize access and copy the key
Only the primary user can enable, disable or regenerate the company key. Enabling authorizes customer creation, financial recording and automatic SDI submission of eligible Italian invoices and credit memos after validation. This is separate from FOR:AGENT and other JSON integrations.
- Enable the checkbox and accept the displayed authorization notice.
- Use Copy API key during that visit. The field always displays a mask; the Copy button supplies the real value to your clipboard.
- Store the copied value in your integration's secret store. Never place it in a URL, JSON body, log, ticket or chat.
Authentication, schemas and limits
Base URL: https://api.forquickbooks.com/v1/companies/{company_id}/mass-invoicing. Send the company key in the x-api-key header and JSON requests as application/json. GET /capabilities returns the required schema profile. US, Canada and Australia use the non-VAT profile; other supported countries use the VAT profile. This is an input convention, not an exemption from local taxes.
Download OpenAPIDownload VAT profileDownload non-VAT profileDownload shared schema definitions- Use 1 to 100 documents per batch, up to 1000 commercial lines per document, and no more than 1,000,000 UTF-8 bytes for the whole request. A large individual document may need further reduction for safe recording.
- Use invoice, credit_memo, sales_receipt or refund_receipt. Dates use YYYY-MM-DD and currency uses its three-letter code. Supply non-negative quantities and signed net unit prices explicitly; zero is not the same as an omitted value. Native checks still reject a credit/refund with a negative total.
- Unknown fields and duplicate JSON property names are rejected. Do not submit accounting account overrides, posting instructions, inventory identities or transmission flags.
Products, taxes and funding accounts
GET /catalog?kind=products&document_type=invoice lists eligible products. Other kinds are tax_codes, cash_accounts, payment_terms and payment_methods. Pass the returned continuation value unchanged to read the next page; an empty filtered page can still have a continuation.
- Each line identifies exactly one financial product by item_id or exact item_code. The product must already exist; the API never invents products or accounts. An inventory-linked or inventory-declared product rejects the entire document, including credit and refund documents.
- Choose tax_code_id from the selected document type's catalogue. Italian invoice/credit codes differ from sales-receipt/refund codes. Zero-rate and OSS visibility are not permission to use an incompatible code.
- Amounts are tax-exclusive. Native tax, currency, rounding, number assignment, closed-period and funding checks remain authoritative. Supplied expected_totals are optional assertions, not overrides. Receipt and refund documents require cash_account_id; they record the financial event but do not initiate a payment.
Customer matching and billing addresses
When tax_id is supplied, matching uses the normalized readable tax identity. A tax miss does not fall back to name. Without tax_id, matching uses the exact normalized name, not fuzzy search. VAT-profile invoices and credit memos require a VAT/tax registration; an Italian personal fiscal code alone does not replace that registration.
- Omit billing_address only when an unambiguous existing customer has a complete saved address. If several customers share the same identity, provide the intended address; the API never chooses the first match arbitrarily.
- For a new customer, provide name and billing_address with street, city, country and applicable postal code/region. The country and billing country must agree.
- A different billing address creates another customer with a random suffix in its display name, without changing the original. Later requests reuse the same verified address variant. Printed and electronic documents use its unsuffixed legal company name.
Submit a batch
POST /batches with a stable batch_id and a stable external_id for each document. Replace example product/tax references with values from your company's catalogue. Credentials belong only in the request header.
{
"schema": "mass-invoicing-non-vat-v1",
"batch_id": "sales-2026-12-02-001",
"documents": [{
"external_id": "invoice-001",
"type": "invoice",
"date": "2026-12-02",
"currency": "USD",
"customer": {
"name": "Example Customer LLC",
"country": "US",
"billing_address": {"line1": "100 Example Street", "city": "New York", "region": "NY", "postal_code": "10001", "country": "US"}
},
"lines": [{"item_code": "SERVICE", "quantity": 1, "unit_price": 100, "tax_code_id": "TAX"}]
}]
}{
"schema": "mass-invoicing-vat-v1",
"batch_id": "vendite-2026-12-02-001",
"documents": [{
"external_id": "fattura-001",
"type": "invoice",
"date": "2026-12-02",
"currency": "EUR",
"customer": {
"name": "Cliente Esempio Srl",
"country": "IT",
"tax_id": "IT01234567897",
"sdi_code": "0000000",
"billing_address": {"line1": "Via Esempio 10", "city": "Roma", "region": "RM", "postal_code": "00100", "country": "IT"}
},
"lines": [{"item_code": "SERVIZIO", "quantity": 1, "unit_price": 100, "tax_code_id": "REPLACE_WITH_SALES_TAX_CODE_ID"}]
}]
}Poll, correct and reconcile
Poll the returned status_url or open FOR:OMNI. Each document reports its external ID, recording status, errors and separate fiscal status. Successful documents return their saved ID, actual number, customer and totals. One rejected document does not roll back successful neighbors.
- After a timeout, resend the identical batch ID and payload or poll the existing batch. Reusing a batch ID with different content conflicts. A document's type and external ID are unique across the company, not just within one batch.
- For a retryable unrecorded rejection or pause, POST /batches/{id}/retry with a new request_id (32 hexadecimal characters) and document containing the corrected payload with the same external_id and type. Follow the new batch receipt. Do not change the identity to evade a held outcome.
- For an interrupted or uncertain recording, POST /batches/{id}/resume with a new request_id. Resume reconciles only the original frozen operation; it never blindly creates another document. Conflicting evidence remains held for review.