Skip to content

Postman docs › QuickBooks API (proxy) › Invoice

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 CustomerRef and at least one line.
  • A sales line needs DetailType, Amount and SalesItemLineDetail. "When a line lacks an ItemRef it is treated as documentation and the Line.Amount attribute is ignored."
  • Non-US companies need SalesItemLineDetail.TaxCodeRef on each taxable line. US companies use TAX or NON.
  • "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 * UnitPrice gives 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.
  • CurrencyRef is 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.

AttributeRequirementTypeDescription
Id* Required for updateread onlysystem definedString, filterableUnique id.
SyncToken* Required for updateread onlysystem definedStringVersion number for optimistic locking.
CustomerRef* RequiredReferenceType, filterable{"value": "<Customer.Id>"}.
Line* RequiredArrayAt least one line.
Line[].DetailType* RequiredStringSalesItemLineDetail for an item line.
Line[].Amount* RequiredDecimalLine amount (2 decimals). Recalculated when UnitPrice is also sent.
Line[].DescriptionOptionalStringLine text.
Line[].SalesItemLineDetail.ItemRefOptionalReferenceTypeThe item sold. Without it, the line is documentation only.
Line[].SalesItemLineDetail.QtyOptionalDecimalQuantity.
Line[].SalesItemLineDetail.UnitPriceOptionalDecimalUnit price (up to 7 decimals).
Line[].SalesItemLineDetail.TaxCodeRef* Conditionally requiredReferenceTypeTax code for the line. Needed for non-US companies.
PrivateNoteOptionalStringInternal note. A void adds "Voided".
DueDateOptionalDate, filterableDue date.
TotalAmtread onlyDecimalInvoice total. The tests store it.
Balanceread onlyDecimal, filterableAmount still open.
TxnDateOptionalDate, filterableTransaction date.
EmailStatusread only hereStringSet 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 same requestid returns the original invoice instead of creating a second one.

Request body ​

AttributeRequirementTypeDescription
CustomerRef* RequiredReferenceType{"value": "{{customer_id}}"}.
Line* RequiredArrayOne SalesItemLineDetail line: ItemRef = item_id, Qty 2, UnitPrice 120, Amount 240, TaxCodeRef = sales_tax_code_id.
PrivateNoteOptionalStringTest 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 URLPOST{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/invoice?requestid={{request_id}}
Intuit operationPOST/v3/company/<realmID>/invoice
Content typeapplication/json
Postman7. Invoices › Create invoice
Storesinvoice_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 URLGET{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/invoice/{{invoice_id}}
Intuit operationGET/v3/company/<realmID>/invoice/<invoiceId>
Acceptapplication/json
Postman7. Invoices › Read invoice
Storesinvoice_sync_token

Query an invoice ​

Postman requestQueryTest
Query invoices by customerselect * from Invoice where CustomerRef = '{{customer_id}}' ORDERBY TxnDate DESC MAXRESULTS 10at least 1 row
Query open invoices (Balance > 0)select * from Invoice where Balance > '0' ORDERBY DueDate STARTPOSITION 1 MAXRESULTS 20HTTP 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 ​

AttributeRequirementTypeDescription
Id* Required for updateString{{invoice_id}}.
SyncToken* Required for updateString{{invoice_sync_token}}.
sparse* Required for a sparse updateBooleantrue.
PrivateNoteOptionalStringNew note.
DueDateOptionalDate2026-12-31.

Returns ​

The updated Invoice object. The test stores the new SyncToken.

Request
Request URLPOST{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/invoice?requestid={{request_id}}
Intuit operationPOST/v3/company/<realmID>/invoice
Content typeapplication/json
Postman7. Invoices › Update invoice (sparse)
Storesinvoice_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 URLGET{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/invoice/{{invoice_id}}/pdf
Intuit operationGET/v3/company/<realmID>/invoice/<invoiceId>/pdf
Acceptapplication/pdf
Postman7. 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 ​

ParameterRequirementTypeDescription
sendToOptionalStringRecipient. The collection uses test_email. Without it, Intuit uses the invoice's BillEmail.
requestidRecommendedStringIdempotency key.

Returns ​

The Invoice object, with EmailStatus set and DeliveryInfo filled. The test checks EmailStatus and stores the new SyncToken.

Request
Request URLPOST{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/invoice/{{invoice_id}}/send?sendTo={{test_email}}&requestid={{request_id}}
Intuit operationPOST/v3/company/<realmID>/invoice/<invoiceId>/send?sendTo=<emailAddr>
Content typeapplication/octet-stream (empty body)
Acceptapplication/json
Postman7. Invoices › Send invoice by e-mail
Storesinvoice_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 ​

AttributeRequirementTypeDescription
Id* RequiredString{{invoice_id}}.
SyncToken* RequiredString{{invoice_sync_token}}.

Returns ​

The voided Invoice object. The test stores the new SyncToken.

Request
Request URLPOST{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/invoice?operation=void&requestid={{request_id}}
Intuit operationPOST/v3/company/<realmID>/invoice?operation=void
Content typeapplication/json
Postman7. Invoices › Void invoice
Storesinvoice_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 ​

AttributeRequirementTypeDescription
Id* RequiredString{{invoice_id}}.
SyncToken* RequiredString{{invoice_sync_token}}, the latest version (after the void).

Returns ​

A short status object. The test checks that Invoice.status is Deleted.

Request
Request URLPOST{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/invoice?operation=delete&requestid={{request_id}}
Intuit operationPOST/v3/company/<realmID>/invoice?operation=delete
Content typeapplication/json
Postman7. 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"
}