Skip to main content

Get Sales Order Invoice Preview

GET 

/api/sales-orders/:salesOrder/invoice-preview

What can be invoiced on an order right now: billable quantities per line (shipped and ordered; bundle_id / bundle_name name the bundle a component line belongs to), fee remainders with the default allocation, shippable shipments and their quantities, the default invoice date, payment term, due date and number preview, and the order's on-account payments.

Required scope: orders:read

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Also returned:

  • create_blocked_reason (string|null): why no invoice can be created on this order right now, or null.
  • supports_deposit (boolean): whether a deposit invoice (source: deposit) can be created — true for orders invoiced per shipment or manually.
  • sales_order: {id, sales_order_number, customer {id, name}, currency_code, invoicing_policy, is_edi, edi_partner_name} — is_edi is true when the order came in over EDI, and edi_partner_name names the trading partner.
  • issue_effects: what issuing an invoice will do — accounting_provider (xero, qbo or null: where the invoice posts), sends_edi_810 (whether an EDI 810 invoice goes to the trading partner), edi_partner_name, and email_to (the address the invoice is emailed to on issue, or null when emailing on issue is off or the customer has no invoice email).

Requires orders:read and sales_invoices.create.

Returns 404 {"message": "Sales order not found"} when the sales order does not exist.

deposit_issue_blocked_reason is why a deposit invoice can't be issued right now (no Customer Deposits account mapped while the books are kept), or null.

Request​

Responses​

OK

Response Headers
    Content-Type