Theme
Invoice
An invoice records a sale to a customer that is paid later. Invoice is a transaction entity. Besides create, read, query and update, it can be downloaded as a PDF, sent by e-mail, voided and deleted.
Business rules
- Create needs
CustomerRefand at least one line. - A sales line needs
DetailType,AmountandSalesItemLineDetail. "When a line lacks an ItemRef it is treated as documentation and the Line.Amount attribute is ignored." - Non-US companies need
SalesItemLineDetail.TaxCodeRefon each taxable line. US companies useTAXorNON. - "If both UnitPrice and Line.Amount are passed in, the value in Line.Amount is discarded and the calculated value is used instead." An amount that is not
Qty * UnitPricegives 6070. - Void: "The transaction remains active but all amounts and quantities are zeroed and the string, Voided, is injected into Invoice.PrivateNote". Linked payments become unapplied.
- Delete: "You must unlink any linked transactions associated with the invoice object before deleting it."
- Send: the sandbox allows 40 e-mails per day per company.
- Run order matters: Void and Delete act on the invoice that Create invoice made.
CurrencyRefis required when multicurrency is on.DocNumber(max 21 characters) follows the company's custom transaction number setting.
Postman folder: 7. Invoices. Intuit reference: Invoice.
The Invoice object
Fields the collection uses. The full attribute list is in Intuit's reference.
| Attribute | Requirement | Type | Description |
|---|---|---|---|
Id | * Required for update | String, filterable | Unique id. |
SyncToken | * Required for update | String | Version number for optimistic locking. |
CustomerRef | * Required | ReferenceType, filterable | {"value": "<Customer.Id>"}. |
Line | * Required | Array | At least one line. |
Line[]. | * Required | String | SalesItemLineDetail for an item line. |
Line[]. | * Required | Decimal | Line amount (2 decimals). Recalculated when UnitPrice is also sent. |
Line[]. | Optional | String | Line text. |
Line[]. | Optional | ReferenceType | The item sold. Without it, the line is documentation only. |
Line[]. | Optional | Decimal | Quantity. |
Line[]. | Optional | Decimal | Unit price (up to 7 decimals). |
Line[]. | * Conditionally required | ReferenceType | Tax code for the line. Needed for non-US companies. |
PrivateNote | Optional | String | Internal note. A void adds "Voided". |
DueDate | Optional | Date, filterable | Due date. |
TotalAmt | Decimal | Invoice total. The tests store it. | |
Balance | Decimal, filterable | Amount still open. | |
TxnDate | Optional | Date, filterable | Transaction date. |
EmailStatus | String | Set to EmailSent by Send. |
Create an invoice
Creates an invoice for the test customer, with one line for 2 × the service item at 120.
- Always send
requestid. Re-sending the samerequestidreturns the original invoice instead of creating a second one.
Request body
| Attribute | Requirement | Type | Description |
|---|---|---|---|
CustomerRef | * Required | ReferenceType | {"value": "{{customer_id}}"}. |
Line | * Required | Array | One SalesItemLineDetail line: ItemRef = item_id, Qty 2, UnitPrice 120, Amount 240, TaxCodeRef = sales_tax_code_id. |
PrivateNote | Optional | String | Test marker. |
Returns
The new Invoice object. The test stores Id, SyncToken and TotalAmt.
TotalAmt can differ from the sum of the line amounts, for example when tax is added for the tax code. Later requests use the stored invoice_total instead of assuming 240.
| Request | |
|---|---|
| Request URL | POST{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/invoice?requestid={{request_id}} |
| Intuit operation | POST/v3/company/<realmID>/invoice |
| Content type | application/json |
| Postman | 7. Invoices › Create invoice |
| Stores | invoice_id, invoice_sync_token, invoice_total |
Request body
json
{
"CustomerRef": {
"value": "{{customer_id}}"
},
"Line": [
{
"DetailType": "SalesItemLineDetail",
"Amount": 240,
"Description": "QBO Connect Postman test",
"SalesItemLineDetail": {
"ItemRef": {
"value": "{{item_id}}"
},
"Qty": 2,
"UnitPrice": 120,
"TaxCodeRef": {
"value": "{{sales_tax_code_id}}"
}
}
}
],
"PrivateNote": "QBO Connect Postman test"
}Returns (abridged)
json
{
"Invoice": {
"Id": "148",
"SyncToken": "0",
"CustomerRef": {
"value": "64"
},
"Line": [
{
"DetailType": "SalesItemLineDetail",
"Amount": 240,
"Description": "QBO Connect Postman test",
"SalesItemLineDetail": {
"ItemRef": { "value": "31" },
"Qty": 2,
"UnitPrice": 120,
"TaxCodeRef": { "value": "5" }
}
}
],
"PrivateNote": "QBO Connect Postman test",
"TotalAmt": 271.2,
"Balance": 271.2
},
"time": "2026-12-01T02:18:00.000-08:00"
}Read an invoice
Retrieves one Invoice object. The test refreshes invoice_sync_token.
| Request | |
|---|---|
| Request URL | GET{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/invoice/{{invoice_id}} |
| Intuit operation | GET/v3/company/<realmID>/invoice/<invoiceId> |
| Accept | application/json |
| Postman | 7. Invoices › Read invoice |
| Stores | invoice_sync_token |
Query an invoice
| Postman request | Query | Test |
|---|---|---|
| Query invoices by customer | select * from Invoice where CustomerRef = '{{customer_id}}' ORDERBY TxnDate DESC MAXRESULTS 10 | at least 1 row |
| Query open invoices (Balance > 0) | select * from Invoice where Balance > '0' ORDERBY DueDate STARTPOSITION 1 MAXRESULTS 20 | HTTP 200 |
Request URL: GET {{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/query?query=<selectStatement>. Returns QueryResponse.Invoice[].
Sparse update an invoice
Changes the private note and due date and leaves the lines as they are.
Request body
| Attribute | Requirement | Type | Description |
|---|---|---|---|
Id | * Required for update | String | {{invoice_id}}. |
SyncToken | * Required for update | String | {{invoice_sync_token}}. |
sparse | * Required for a sparse update | Boolean | true. |
PrivateNote | Optional | String | New note. |
DueDate | Optional | Date | 2026-12-31. |
Returns
The updated Invoice object. The test stores the new SyncToken.
| Request | |
|---|---|
| Request URL | POST{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/invoice?requestid={{request_id}} |
| Intuit operation | POST/v3/company/<realmID>/invoice |
| Content type | application/json |
| Postman | 7. Invoices › Update invoice (sparse) |
| Stores | invoice_sync_token |
Request body
json
{
"Id": "{{invoice_id}}",
"SyncToken": "{{invoice_sync_token}}",
"sparse": true,
"PrivateNote": "Updated by QBO Connect Postman test",
"DueDate": "2026-12-31"
}Get an invoice as PDF
"returns the specified object in the response body as an Adobe Portable Document Format (PDF) file... formatted according to custom form styles in the company settings." Send Accept: application/pdf. QBO Connect relays the PDF bytes with Intuit's Content-Type, and Content-Disposition when Intuit sends one.
Returns
A PDF file. The test checks that Content-Type includes application/pdf.
| Request | |
|---|---|
| Request URL | GET{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/invoice/{{invoice_id}}/pdf |
| Intuit operation | GET/v3/company/<realmID>/invoice/<invoiceId>/pdf |
| Accept | application/pdf |
| Postman | 7. Invoices › Download invoice PDF |
Send an invoice
E-mails the invoice. With sendTo, the e-mail goes to that address and BillEmail.Address is overwritten with it. The body is empty, with Content-Type: application/octet-stream. The proxy accepts octet-stream only on {entity}/{id}/send requests, and only with an empty body.
Query parameters
| Parameter | Requirement | Type | Description |
|---|---|---|---|
sendTo | Optional | String | Recipient. The collection uses test_email. Without it, Intuit uses the invoice's BillEmail. |
requestid | Recommended | String | Idempotency key. |
Returns
The Invoice object, with EmailStatus set and DeliveryInfo filled. The test checks EmailStatus and stores the new SyncToken.
| Request | |
|---|---|
| Request URL | POST{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/invoice/{{invoice_id}}/send?sendTo={{test_email}}&requestid={{request_id}} |
| Intuit operation | POST/v3/company/<realmID>/invoice/<invoiceId>/send?sendTo=<emailAddr> |
| Content type | application/octet-stream (empty body) |
| Accept | application/json |
| Postman | 7. Invoices › Send invoice by e-mail |
| Stores | invoice_sync_token |
Returns (abridged)
json
{
"Invoice": {
"Id": "148",
"SyncToken": "2",
"EmailStatus": "EmailSent"
},
"time": "2026-12-01T02:19:00.000-08:00"
}Void an invoice
Keeps the invoice, as an audit trail, with all amounts zeroed. Linked payments become unapplied. The body has only Id and SyncToken, with no sparse.
Request body
| Attribute | Requirement | Type | Description |
|---|---|---|---|
Id | * Required | String | {{invoice_id}}. |
SyncToken | * Required | String | {{invoice_sync_token}}. |
Returns
The voided Invoice object. The test stores the new SyncToken.
| Request | |
|---|---|
| Request URL | POST{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/invoice?operation=void&requestid={{request_id}} |
| Intuit operation | POST/v3/company/<realmID>/invoice?operation=void |
| Content type | application/json |
| Postman | 7. Invoices › Void invoice |
| Stores | invoice_sync_token |
Request body
json
{
"Id": "{{invoice_id}}",
"SyncToken": "{{invoice_sync_token}}"
}Returns (abridged)
json
{
"Invoice": {
"Id": "148",
"SyncToken": "3",
"TotalAmt": 0,
"Balance": 0
},
"time": "2026-12-01T02:20:00.000-08:00"
}Delete an invoice
Deletes the invoice permanently. Unlink any linked transactions first.
Request body
| Attribute | Requirement | Type | Description |
|---|---|---|---|
Id | * Required | String | {{invoice_id}}. |
SyncToken | * Required | String | {{invoice_sync_token}}, the latest version (after the void). |
Returns
A short status object. The test checks that Invoice.status is Deleted.
| Request | |
|---|---|
| Request URL | POST{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/invoice?operation=delete&requestid={{request_id}} |
| Intuit operation | POST/v3/company/<realmID>/invoice?operation=delete |
| Content type | application/json |
| Postman | 7. Invoices › Delete invoice |
Request body
json
{
"Id": "{{invoice_id}}",
"SyncToken": "{{invoice_sync_token}}"
}Returns
json
{
"Invoice": {
"status": "Deleted",
"domain": "QBO",
"Id": "148"
},
"time": "2026-12-01T02:21:00.000-08:00"
}