Advances

Advances allow you to make a payment to a vendor in advance of receiving a bill. For example, if a vendor requires an up-front deposit, create an advance payment and post it to an established prepayment account.

Please be aware that this object is currently "Uncertified", signifying that it has not undergone the complete review process and the design may change during ongoing refinement. Users are advised to exercise discretion in using this object and are encouraged to provide feedback.

List advances

get/objects/accounts-payable/advance

Returns a collection with a key, ID, and link for each advance. 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 Payable
User typeBusiness
PermissionsList, View AP advances
SecurityOAuth2
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "625510",
      • "id": "625510",
      • "href": "/objects/accounts-payable/advance/625510"
      },
    • {
      • "key": "558105",
      • "id": "558105",
      • "href": "/objects/accounts-payable/advance/558105"
      },
    • {
      • "key": "558543",
      • "id": "558543",
      • "href": "/objects/accounts-payable/advance/558543"
      }
    ],
  • "ia::meta": {
    • "totalCount": 3,
    • "start": 1,
    • "pageSize": 100,
    • "next": null,
    • "previous": null
    }
}

Create an advance

post/objects/accounts-payable/advance

Creates a new advance.

Permissions and other requirements
SubscriptionAccounts Payable
ConfigurationCompanies with multiple base currencies must create advances at the entity level.
User typeBusiness
PermissionsList, View, Add AP advances
SecurityOAuth2
Request
Request Body schema: application/json
paymentMethod
required
string

Payment method for the AP advance. A payment method for AP advances defines how funds are transferred to a vendor, which determines the approval process and workflow steps needed to complete the advance payment.

Enum: "ach" "cash" "creditCard" "eft" "printedCheck"
Example: "printedCheck"
required
object

Financial account from which the reconciliation is done.

id
string

Account number or other unique identifier for the bank account.

Example: "BOA"
advanceDate
required
string <date>

Date the advance payment was made.

Example: "2021-01-23"
referenceNumber
string or null

A number, such as a purchase order or account number, useful for searches or reports. This number appears on the GL Details report and is printed on checks and vendor stubs.

Example: "INV-902852"
description
string or null

Description of the AP advance.

Example: "Computer Hardware & Software Expenses 03/01/20 - 08/31/21 Subscription charges."
object
key
string

Location Key

Example: "1"
id
string

Location

Example: "US"
dueDate
string <date>

Due date for the AP advance.

Example: "2021-01-23"
object
clearingDate
string or null <date>

The date when reconciliation is completed. This value is automatically populated.

Example: "2021-01-23"
cleared
string
Default: "false"

Indicates the reconciliation status.

Enum: "false" "matched" "true"
Example: "false"
isSystemGenerated
string
Default: "false"

Indicates whether the advance record is created by the system. A value of true means it is system-generated and not based on user input.

Enum: "false" "true"
Example: "true"
object

Currency details for this AP advance.

txnCurrency
required
string

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

Example: "USD"
baseCurrency
string

Base currency for the AP advance.

Example: "USD"
object

Exchange rate details used to calculate the base amount.

date
string or null <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 or null

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

Example: 1.0789
typeId
string or null

The type of exchange rate used to calculate the base amount from the transaction amount.

Example: "1"
object

Supporting document ID for this attachment.

key
string or null
Example: "21"
id
string or null
Example: "Sales01"
object

Vendor associated with the AP advance.

id
required
string

Unique identifier for the vendor.

Example: "Vendor_01"
key
string

System-assigned unique key for the vendor.

Example: "15"
name
string

Name of the vendor.

Example: "Logic Solutions"
Array of objects

Line items of the advance.

Array
txnAmount
required
string <decimal-precision-2>

The transaction amount for the AP advance line item in the currency specified for the transaction.

Example: "100"
required
object
object
memo
string or null

Additional notes or comments about the advance line item for reference.

Example: "Service charges"
object

Base location for the line item.

object

Meaningful name of the account.

Responses
201

Created

400

Bad Request

Request samples
application/json
{
  • "description": "Advance for new equipment",
  • "paymentMethod": "cash",
  • "financialEntity": {
    • "id": "BOA"
    },
  • "advanceDate": "2023-07-23",
  • "vendor": {
    • "id": "1099 Int"
    },
  • "lines": [
    • {
      • "baseAmount": "12.34",
      • "memo": "Advance payment to vendor for retainer fee - to be applied against future invoices.",
      • "txnAmount": "1.23",
      • "dimensions": {
        },
      • "glAccount": {
        }
      }
    ]
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "625530",
    • "id": "625530",
    • "href": "/objects/accounts-payable/advance/625530"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Get an advance

get/objects/accounts-payable/advance/{key}

Returns detailed information for a specified advance.

Permissions and other requirements
SubscriptionAccounts Payable
User typeBusiness
PermissionsList, View AP advances
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned unique key for the advance.

Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "id": "20",
    • "key": "20",
    • "recordType": "pr",
    • "paymentMethod": "eft",
    • "description": null,
    • "vendor": {
      • "name": "1099 Int",
      • "id": "1099 Int",
      • "key": "43",
      • "totalDue": "-120.00",
      • "href": "/objects/accounts-payable/vendor/43"
      },
    • "totalEntered": "120.00",
    • "paymentInformation": {
      • "totalPaid": "0.00",
      • "totalSelected": "0.00",
      • "paidDate": "2024-05-20",
      • "txnTotalPaid": "0.00",
      • "txnTotalSelected": "0.00"
      },
    • "totalDue": "120.00",
    • "state": "advancePaid",
    • "audit": {
      • "createdDateTime": "2024-05-20T00:00:00Z",
      • "modifiedDateTime": "2024-05-20T08:39:25Z",
      • "createdBy": "1",
      • "modifiedBy": "1"
      },
    • "entity": {
      • "id": "1",
      • "key": "1",
      • "name": "United States of America"
      },
    • "dueDate": "2024-05-20",
    • "referenceNumber": "Advace for 1099 Int",
    • "reconciliationGroup": {
      • "cleared": "false",
      • "clearingDate": null
      },
    • "isSystemGenerated": "false",
    • "currency": {
      • "txnCurrency": "USD",
      • "baseCurrency": "USD",
      • "exchangeRate": {
        }
      },
    • "txnTotalEntered": "120.00",
    • "txnTotalDue": "120.00",
    • "location": {
      • "key": "1"
      },
    • "financialEntity": {
      • "id": "BOA"
      },
    • "advanceDate": "2024-05-20",
    • "attachment": {
      • "id": "Invc-001",
      • "key": "2",
      • "href": "/objects/company-config/attachment/2"
      },
    • "lines": [
      • {
        }
      ],
    • "href": "/objects/accounts-payable/advance/20"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Update an advance

patch/objects/accounts-payable/advance/{key}

Updates an existing advance by setting field values. Any fields not provided remain unchanged. You can only update advances in a draft state or advances that were declined during the approval process.

Permissions and other requirements
SubscriptionAccounts Payable
User typeBusiness
PermissionsList, View, Edit AP advances
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned unique key for the advance.

Request Body schema: application/json
paymentMethod
string

Payment method for the AP advance. A payment method for AP advances defines how funds are transferred to a vendor, which determines the approval process and workflow steps needed to complete the advance payment.

Enum: "ach" "cash" "creditCard" "eft" "printedCheck"
Example: "printedCheck"
referenceNumber
string or null

A number, such as a purchase order or account number, useful for searches or reports. This number appears on the GL Details report and is printed on checks and vendor stubs.

Example: "INV-902852"
description
string or null

Description of the AP advance.

Example: "Computer Hardware & Software Expenses 03/01/20 - 08/31/21 Subscription charges."
advanceDate
string <date>

Date the advance payment was made.

Example: "2021-01-23"
object
key
string

Location Key

Example: "1"
id
string

Location

Example: "US"
dueDate
string <date>

Due date for the AP advance.

Example: "2021-01-23"
object

Financial account from which the reconciliation is done.

id
string

Account number or other unique identifier for the bank account.

Example: "BOA"
object
clearingDate
string or null <date>

The date when reconciliation is completed. This value is automatically populated.

Example: "2021-01-23"
cleared
string
Default: "false"

Indicates the reconciliation status.

Enum: "false" "matched" "true"
Example: "false"
isSystemGenerated
string
Default: "false"

Indicates whether the advance record is created by the system. A value of true means it is system-generated and not based on user input.

Enum: "false" "true"
Example: "true"
object

Currency details for this AP advance.

baseCurrency
string

Base currency for the AP advance.

Example: "USD"
txnCurrency
string

The transaction currency to use for this advance. 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 or null <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 or null

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

Example: 1.0789
typeId
string or null

The type of exchange rate used to calculate the base amount from the transaction amount.

Example: "1"
object

Supporting document ID for this attachment.

key
string or null
Example: "21"
id
string or null
Example: "Sales01"
object

Vendor associated with the AP advance.

id
string

Unique identifier for the vendor.

Example: "Vendor_01"
key
string

System-assigned unique key for the vendor.

Example: "15"
name
string

Name of the vendor.

Example: "Logic Solutions"
Array of objects

Line items of the advance.

Array
txnAmount
string <decimal-precision-2>

The transaction amount for the AP advance line item in the currency specified for the transaction.

Example: "100"
object
memo
string or null

Additional notes or comments about the advance line item for reference.

Example: "Service charges"
object

Base location for the line item.

object

Meaningful name of the account.

object
Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "description": "Updated description of advance"
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "625529",
    • "id": "625529",
    • "href": "/objects/accounts-payable/advance/625529"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Delete an advance

delete/objects/accounts-payable/advance/{key}

Deletes an advance. Only draft advances can be deleted.

Permissions and other requirements
SubscriptionAccounts Payable
User typeBusiness
PermissionsList, View, Delete AP advances
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned unique key for the advance.

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 advances

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-payable/advance"
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-payable/advance",
  • "filters": [
    • {
      • "$eq": {
        }
      }
    ],
  • "fields": [
    • "key",
    • "id",
    • "description",
    • "referenceNumber",
    • "totalEntered",
    • "advanceDate",
    • "state",
    • "vendor.id",
    • "vendor.name"
    ],
  • "orderBy": [
    • {
      • "id": "asc"
      }
    ]
}
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "23",
      • "id": "23",
      • "description": "Computer Hardware & Software Expenses 03/01/20 - 08/31/21 Subscription charges.",
      • "referenceNumber": "INV-902852",
      • "totalEntered": "100.20",
      • "advanceDate": "2021-01-23",
      • "state": "draft",
      • "vendor": {
        }
      },
    • {
      • "key": "24",
      • "id": "24",
      • "description": "Office Supplies Advance",
      • "referenceNumber": "ADV-902853",
      • "totalEntered": "200.50",
      • "advanceDate": "2021-02-01",
      • "state": "draft",
      • "vendor": {
        }
      },
    • {
      • "key": "25",
      • "id": "25",
      • "description": "Travel Expenses Advance",
      • "referenceNumber": "ADV-902854",
      • "totalEntered": "150.75",
      • "advanceDate": "2021-03-01",
      • "state": "draft",
      • "vendor": {
        }
      }
    ],
  • "ia::meta": {
    • "totalCount": 3,
    • "start": 1,
    • "pageSize": 100,
    • "next": null,
    • "previous": null
    }
}