Invoices

An invoice object represents an invoice sent to a customer for goods or services provided.

List invoices

get/objects/accounts-receivable/invoice

Returns a collection with a key, ID, and link for each invoice. This operation is mostly for use in testing; use query to find objects that meet certain criteria and to specify properties that are returned.

Permissions and other requirements
SubscriptionAccounts Receivable
User typeBusiness, Employee, Approver
PermissionsList, View Invoices
SecurityOAuth2
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "498",
      • "id": "498",
      • "href": "/objects/accounts-receivable/invoice/498"
      },
    • {
      • "key": "501",
      • "id": "501",
      • "href": "/objects/accounts-receivable/invoice/501"
      },
    • {
      • "key": "978",
      • "id": "978",
      • "href": "/objects/accounts-receivable/invoice/978"
      }
    ],
  • "ia::meta": {
    • "totalCount": 3,
    • "start": 1,
    • "pageSize": 100
    }
}

Create an invoice

post/objects/accounts-receivable/invoice

Creates a new invoice. For the invoice to be posted, you must specify at least the account and an amount for each line item.

Permissions and other requirements
SubscriptionAccounts Receivable
User typeBusiness, Employee, Approver
PermissionsAdd Invoices
SecurityOAuth2
Request
Request Body schema: application/json
invoiceDate
required
string <date>

Date the invoice was created.

Example: "2022-12-06"
dueDate
required
string <date>

Date the invoice is due.

Example: "2022-12-31"
action
string
Default: "submit"

Action to take on the invoice.

Enum: "draft" "submit"
Example: "submit"
invoiceNumber
string

Specify a unique invoice number while creating an invoice unless document sequencing is configured, in which case the number is auto-generated.

Example: "INV-001"
referenceNumber
string

Customer purchase order number or another reference number.

Example: "PO6917"
description
string

Description of the invoice, which prints on the Customer Ledger report.

Example: "Regular invoice"
documentId
string

ID of the associated document.

Example: "Sales Invoice-SI-00188"
object

Currency details for this invoice.

baseCurrency
string

Base currency for the invoice.

Example: "USD"
txnCurrency
string

The transaction currency to use for this invoice. If this currency is different from the base currency, provide an exchange rate.

Example: "USD"
object

Exchange rate details used to calculate the base amount.

date
string <date>

Exchange rate date for this transaction. Can be the current date, the date the transaction was issued, or the date the transaction will be paid.

Example: "2021-01-23"
rate
number

Exchange rate used to calculate the base amount from the transaction amount.

Example: 1.0789
typeId
string

Exchange rate type used to calculate the base amount from the transaction amount.

Example: "Intacct Daily Rate"
object

Message to include on the customer's invoice.

key
string

System-assigned key for the customer message.

Example: "10"
id
string

ID for the customer message.

Example: "welcome message"
message
string

Message text for the customer message.

Example: "welcome to the company"
object

Associated contacts

object

Pay to contact information from the customer record.

key
string

System-assigned key to uniquely identify the contact.

Example: "176"
id
string

Name of the contact.

Example: "Power Aerospace Materials(C1)"
object

Return to contact information from the customer record.

key
string

System-assigned key to uniquely identify the contact.

Example: "176"
id
string

Name of the contact

Example: "Power Aerospace Materials(C1)"
object

Tax related information for the ship-to contact.

object

If AR is configured for inter-entity bill back, the template to use to create a matching bill.

key
string

System-assigned key for the template.

Example: "18"
id
string

ID for the template.

Example: "BBT-error5"
object

Supporting document attached to the invoice.

key
string

System-assigned key for the supporting document.

Example: "11"
id
string

System-assigned ID for the supporting document.

Example: "11"
object

Customer to receive the invoice.

Example: "1"
id
required
string

Unique identifier of the customer.

Example: "C-00019"
key
string

System-assigned key for the customer.

Example: "14"
deliveryOptions
string
Default: "print"

Invoice delivery options for the customer.

Enum: "both" "email" "print"
Example: "both"
object

Term details for the invoice.

key
string

System-assigned key for the term.

Example: "16"
id
string

Name of the term.

Example: "30 Days"
object

Tax solution details for this invoice.

key
string or null

System-assigned key to uniquely identify the tax solution.

Example: "4"
id
string or null

Name or other unique identifier for the tax solution.

Example: "Australia GST"
object

Summary details for this invoice. Summaries are collections of the same types of transactions grouped together for processing.

key
string

System-assigned key to uniquely identify the summary.

Example: "33"
id
string

Name of the summary.

Example: "OE Sales Invoice: 2023 Batch 1"
Array of objects

Line items of the invoice.

Example: [{"txnAmount":"100.00","glAccount":{"id":"4010"},"dimensions":{"location":{"id":"1"}}}]
Array
txnAmount
required
string <decimal-precision-2>

Amount for the AR invoice line item in the transaction currency.

Example: "100.00"
object

General Ledger (GL) account associated with the line item.

Example: {"id":"4010"}
object

An alternative AR account to override the default GL AR account for the invoice line item.

memo
string

Memo or notes about the AR invoice line item.

Example: "Replaces discontinued part"
object

Transaction allocation template for the line item, which distributes the invoice amount across specified dimensions.

object

Meaningful name of AR account.

Array of objects

Tax entries for the AR invoice.

object
Example: {"location":{"id":"1"}}
Responses
201

Created

400

Bad Request

Request samples
application/json
{
  • "invoiceNumber": "SI-0034",
  • "customer": {
    • "id": "C-00019"
    },
  • "customerMessage": {
    • "id": "welcome message"
    },
  • "referenceNumber": "B9R456",
  • "description": "Regular invoice",
  • "term": {
    • "id": "N15"
    },
  • "invoiceDate": "2022-12-06",
  • "dueDate": "2022-12-31",
  • "currency": {
    • "txnCurrency": "USD",
    • "exchangeRate": {
      • "date": "2022-12-06",
      • "typeId": "Intacct Daily Rate",
      • "rate": 0.05112
      }
    },
  • "contacts": {
    • "payTo": {
      • "id": "Power Aerospace Materials(C1)"
      },
    • "returnTo": {
      • "id": "Power Aerospace Materials(C1)"
      }
    },
  • "lines": [
    • {
      • "txnAmount": "100.40",
      • "glAccount": {
        },
      • "accountLabel": {
        },
      • "dimensions": {
        }
      },
    • {
      • "txnAmount": "-10",
      • "glAccount": {
        },
      • "accountLabel": {
        },
      • "dimensions": {
        }
      }
    ]
}
Response samples
application/json
{
  • "ia::result": {
    • "id": "2091",
    • "key": "2091",
    • "href": "/objects/accounts-receivable/invoice/2091"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Get an invoice

get/objects/accounts-receivable/invoice/{key}

Returns detailed information for a specified invoice.

Permissions and other requirements
SubscriptionAccounts Receivable
User typeBusiness, Employee, Approver
PermissionsList, View Invoices
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the invoice.

Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "id": "292",
    • "key": "292",
    • "recordType": "ri",
    • "invoiceNumber": "ADJDEC0002",
    • "state": "posted",
    • "customer": {
      • "id": "1",
      • "key": "1",
      • "name": "Power Aerospace Materials",
      • "emailOption": false,
      • "customerDue": "-17909.55",
      • "deliveryOptions": "print",
      • "href": "/objects/accounts-receivable/customer/1"
      },
    • "customerMessage": {
      • "key": null,
      • "id": null,
      • "message": null
      },
    • "referenceNumber": null,
    • "description": "nextGen Recurr",
    • "documentId": null,
    • "term": {
      • "id": "Due upon pay",
      • "key": "15",
      • "href": "/objects/accounts-receivable/term/15"
      },
    • "invoiceDate": "2024-09-24",
    • "invoiceSummary": {
      • "glPostingDate": "2024-09-24",
      • "id": "Invoices: 2024/09/24 Batch",
      • "key": "199",
      • "isSummaryOpen": "open",
      • "isSummaryPosted": "false",
      • "href": "/objects/accounts-receivable/summary/199"
      },
    • "discountCutOffDate": "2024-09-24",
    • "dueDate": "2024-09-24",
    • "paymentInformation": {
      • "fullyPaidDate": null,
      • "totalBaseAmountSelectedForPayment": "0.00",
      • "totalBaseAmountPaid": "0.00",
      • "totalTxnAmountSelectedForPayment": "0.00",
      • "totalTxnAmountPaid": "0.00"
      },
    • "currency": {
      • "baseCurrency": "AUD",
      • "txnCurrency": "AUD",
      • "exchangeRate": {
        }
      },
    • "totalBaseAmount": "440.00",
    • "totalBaseAmountDue": "440.00",
    • "totalTxnAmount": "440.00",
    • "totalTxnAmountDue": "440.00",
    • "contacts": {
      • "payTo": {
        },
      • "returnTo": {
        }
      },
    • "moduleKey": "accountsReceivable",
    • "recurringSchedule": {
      • "key": "24"
      },
    • "isSystemGeneratedDocument": false,
    • "billbackTemplate": {
      • "id": null,
      • "key": null
      },
    • "audit": {
      • "createdDateTime": "2024-09-24T14:18:20Z",
      • "modifiedDateTime": "2024-09-24T14:18:20Z",
      • "createdBy": "1",
      • "modifiedBy": "1"
      },
    • "dueInDays": 3,
    • "taxSolution": {
      • "key": "1",
      • "id": "Australia - GST",
      • "href": "/objects/tax/tax-solution/1"
      },
    • "attachment": {
      • "id": "atch1",
      • "key": "6",
      • "href": "/objects/company-config/attachment/6"
      },
    • "dunningCount": 0,
    • "entity": {
      • "key": null,
      • "id": null,
      • "name": null
      },
    • "lines": [
      • {
        }
      ],
    • "href": "/objects/accounts-receivable/invoice/292"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Update an invoice

patch/objects/accounts-receivable/invoice/{key}

Updates an existing invoice by setting field values. Any fields not provided remain unchanged. Allowed edits depend on the state an invoice is in. For more information, see About editing invoices.

Permissions and other requirements
SubscriptionAccounts Receivable
User typeBusiness, Employee, Approver
PermissionsEdit Invoices
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the invoice.

Request Body schema: application/json
action
string
Default: "submit"

Action to take on the invoice.

Enum: "draft" "submit"
Example: "submit"
invoiceNumber
string

Specify a unique invoice number while creating an invoice unless document sequencing is configured, in which case the number is auto-generated.

Example: "INV-001"
referenceNumber
string

Customer purchase order number or another reference number.

Example: "PO6917"
description
string

Description of the invoice, which prints on the Customer Ledger report.

Example: "Regular invoice"
documentId
string

ID of the associated document.

Example: "Sales Invoice-SI-00188"
invoiceDate
string <date>

Date the invoice was created.

Example: "2022-12-06"
dueDate
string <date>

Date the invoice is due.

Example: "2022-12-31"
object

Currency details for this invoice.

baseCurrency
string

Base currency for the invoice.

Example: "USD"
txnCurrency
string

The transaction currency to use for this invoice. If this currency is different from the base currency, provide an exchange rate.

Example: "USD"
object

Exchange rate details used to calculate the base amount.

date
string <date>

Exchange rate date for this transaction. Can be the current date, the date the transaction was issued, or the date the transaction will be paid.

Example: "2021-01-23"
rate
number

Exchange rate used to calculate the base amount from the transaction amount.

Example: 1.0789
typeId
string

Exchange rate type used to calculate the base amount from the transaction amount.

Example: "Intacct Daily Rate"
object

Message to include on the customer's invoice.

key
string

System-assigned key for the customer message.

Example: "10"
id
string

ID for the customer message.

Example: "welcome message"
message
string

Message text for the customer message.

Example: "welcome to the company"
object

Associated contacts

object

Pay to contact information from the customer record.

key
string

System-assigned key to uniquely identify the contact.

Example: "176"
id
string

Name of the contact.

Example: "Power Aerospace Materials(C1)"
object

Return to contact information from the customer record.

key
string

System-assigned key to uniquely identify the contact.

Example: "176"
id
string

Name of the contact

Example: "Power Aerospace Materials(C1)"
object

Tax related information for the ship-to contact.

object

If AR is configured for inter-entity bill back, the template to use to create a matching bill.

key
string

System-assigned key for the template.

Example: "18"
id
string

ID for the template.

Example: "BBT-error5"
object

Supporting document attached to the invoice.

key
string

System-assigned key for the supporting document.

Example: "11"
id
string

System-assigned ID for the supporting document.

Example: "11"
object

Customer to receive the invoice.

key
string

System-assigned key for the customer.

Example: "14"
id
string

Unique identifier of the customer.

Example: "C-00019"
deliveryOptions
string
Default: "print"

Invoice delivery options for the customer.

Enum: "both" "email" "print"
Example: "both"
object

Term details for the invoice.

key
string

System-assigned key for the term.

Example: "16"
id
string

Name of the term.

Example: "30 Days"
object

Tax solution details for this invoice.

key
string or null

System-assigned key to uniquely identify the tax solution.

Example: "4"
id
string or null

Name or other unique identifier for the tax solution.

Example: "Australia GST"
object

Summary details for this invoice. Summaries are collections of the same types of transactions grouped together for processing.

key
string

System-assigned key to uniquely identify the summary.

Example: "33"
id
string

Name of the summary.

Example: "OE Sales Invoice: 2023 Batch 1"
Array of objects

Line items of the invoice.

Array
object

General Ledger (GL) account associated with the line item.

object

An alternative AR account to override the default GL AR account for the invoice line item.

txnAmount
string <decimal-precision-2>

Amount for the AR invoice line item in the transaction currency.

Example: "16740.00"
memo
string

Memo or notes about the AR invoice line item.

Example: "Replaces discontinued part"
object

Transaction allocation template for the line item, which distributes the invoice amount across specified dimensions.

object

Meaningful name of AR account.

Array of objects

Tax entries for the AR invoice.

object
Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "description": "Special off-cycle order"
}
Response samples
application/json
{
  • "ia::result": {
    • "id": "2091",
    • "key": "2091",
    • "href": "/objects/accounts-receivable/invoice/2091"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Delete an invoice

delete/objects/accounts-receivable/invoice/{key}

Deletes an invoice. Only invoices with a draft or posted state can be deleted.

Permissions and other requirements
SubscriptionAccounts Receivable
User typeBusiness, Employee, Approver
PermissionsDelete Invoices
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the invoice.

Responses
204

No Content

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "ia::error": {
      • "code": "invalidRequest",
      • "message": "A POST request requires a payload",
      • "errorId": "REST-1028",
      • "additionalInfo": {
        },
      • "supportId": "Kxi78%7EZuyXBDEGVHD2UmO1phYXDQAAAAo"
      }
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 0,
    • "totalError": 1
    }
}

Query invoices

post/services/core/query

Queries an object for filtered data.

SecurityOAuth2
Request
Request Body schema: application/json
object
string

Object type to query, in the form <application-name>/<object name>. For custom objects use platform-apps/nsp::<object-name>.

Example: "accounts-receivable/invoice"
fields
Array of strings

List of fields to include in the response. Can be any combination of these:

  • The name of a field in the object that you are querying, such as id.

  • The name of a field in a related object, using the form relatedObjectName.fieldName, such as vendor.id.

  • The result of an aggregate function run against the values in the returned objects. Use the form function:fieldName, such as min:startDate to return the earliest starting date. Valid function names are:

    • count
    • avg
    • sum
    • min
    • max
  • The result of an aggregate function run against the values in related objects, using the form function:relatedObjectName.fieldName, such as max:vendor.creditLimit. The same functions are supported as for object fields.

Example: ["key","id","max:vendor.creditLimit"]
Array of equal (object) or not equal (object) or less than (object) or (less than or equal (object)) or greater than (object) or (greater than or equal (object)) or in (object) or not in (object) or between (object) or not between (object) or contains (object) or does not contain (object) or starts with (object) or does not start with (object) or ends with (object) or does not end with (object)

Filter conditions to select the objects to return based on their field values. You use operators and conditions to build your filter, such as {"$eq":{"status":"active"}} to select objects in which status is equal to "active".

Example: [{"$eq":{"status":"active"}},{"$gt":{"totalDue":"1000"}},{"$contains":{"name":"Acme"}}]
Array
Any of:

Field value must be equal to this specified value.

For date fields, you can use these macro values that are relative to the current date or the asOfDate in filterParameters, if set:

  • today
  • currentWeek
  • currentMonth
  • currentQuarter
  • currentYear
  • yesterday
  • lastWeek
  • priorMonth
  • priorQuarter
  • priorYear

These are most useful for queries that you want to save and use repeatedly, such as for views or reports. Just change the asOfDate each time to retrieve the same data set for different time periods.

For example, {"eq":{"postingDate":"priorYear"}}.

object

The field name and value to be compared with object values.

Example: {"status":"active"}
filterExpression
string
Default: "and"

Logical operators to apply when there are multiple filter conditions. The conditions in the filters array are implicitly numbered starting at 1. Supports and, or, and grouping with parentheses.

Shortcuts:

  • and by itself means that all conditions must be true.
  • or by itself means that at least one condition must be true.
Example: "(1 and 2) or 3"
object

Pre-defined filter options.

asOfDate
string <date>

The "as of" date to use with any relative date comparisons in filters. For example, if asOfDate is set to "2022-04-01" then priorMonth will be "03".

The current date is used if asOfDate is not set.

Example: "2022-04-01"
includeHierarchyFields
boolean
Default: false

Set to true to include hierarchical structure information with each object in the response.

Example: false
caseSensitiveComparison
boolean
Default: true

Queries are case-sensitive by default. Set to false to ignore case in a query.

Example: true
includePrivate
boolean
Default: false

By default, in a multi-entity company, queries from the top-level entity do not access data in private entities. Set includePrivate to true if you want to query data in private entities.

Example: false
Array of objects

Set the order of the results by specifying field names to sort by and whether they should be in ascending or descending order.

Example: [{"totalDue":"asc"},{"lastPaymentMadeDate":"desc"}]
Array
property name*
additional property
string
Enum: "asc" "desc"
start
integer

First record of the result set to include in the response.

Example: 1
size
integer

Number of records to include in the response.

Example: 100
Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "object": "accounts-receivable/invoice",
  • "filters": [
    • {
      • "$eq": {
        }
      }
    ],
  • "fields": [
    • "key",
    • "id",
    • "documentId",
    • "customer.name",
    • "customer.customerDue"
    ],
  • "orderBy": [
    • {
      • "id": "asc"
      }
    ]
}
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "294",
      • "id": "294",
      • "documentId": "Sales Invoice-SI-00331",
      • "customer.name": "Burns Textiles Corp of America",
      • "customer.customerDue": "14152925.84"
      },
    • {
      • "key": "312",
      • "id": "312",
      • "documentId": "Sales Invoice-SI-00751",
      • "customer.name": "Pinto Construction Inc.",
      • "customer.customerDue": "18000.00"
      },
    • {
      • "key": "316",
      • "id": "316",
      • "document.Id": "Sales Invoice-SI-00747",
      • "customer.name": "Dickens Doers",
      • "customer.customerDue": "873.00"
      },
    • {
      • "key": "325",
      • "id": "325",
      • "document.Id": "Sales Invoice-SI-00743",
      • "customer.name": "Grand Isle Hotels & Resorts Ltd",
      • "customer.customerDue": "5462.50"
      },
    • {
      • "key": "313",
      • "id": "313",
      • "document.Id": "Sales Invoice-SI-00746",
      • "customer.name": "University of Midland",
      • "customer.customerDue": "4330.00"
      }
    ],
  • "ia::meta": {
    • "totalCount": 5,
    • "start": 1,
    • "pageSize": 100,
    • "next": null,
    • "previous": null
    }
}