Accounts

Companies post balance sheet, income statement, and statistical transactions to General Ledger accounts. Accounts make it easy to keep track of the transaction type, such as Accounts Payable, Accounts Receivable, Inventory, and the various sub-accounts for those transaction types. The comprehensive list of a company's General Ledger accounts is called its Chart of Accounts.

List accounts

get/objects/general-ledger/account

Returns a collection with a key, ID, and link for each account. This operation is mostly for use in testing; use the query service to find accounts that meet certain criteria and to specify the properties that you want in the response.

Permissions and other requirements
SubscriptionCompany
User typeBusiness, Employee, Project Manager, and Warehouse
PermissionsList, View Accounts
SecurityOAuth2
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "406",
      • "id": "9999",
      • "href": "/objects/general-ledger/account/406"
      },
    • {
      • "key": "407",
      • "id": "1501.06",
      • "href": "/objects/general-ledger/account/407"
      },
    • {
      • "key": "16",
      • "id": "1007",
      • "href": "/objects/general-ledger/account/16"
      }
    ],
  • "ia::meta": {
    • "totalCount": 3,
    • "start": 1,
    • "pageSize": 100,
    • "next": null,
    • "previous": null
    }
}

Create an account

post/objects/general-ledger/account

Creates a new General Ledger account.

Permissions and other requirements
SubscriptionCompany
User typeBusiness user with admin privileges
PermissionsAdd Accounts
SecurityOAuth2
Request
Request Body schema: application/json

Account to create

id
required
string

The primary account number. This number must be a specific length, which is set on the Accounting tab of the Company Information page.

Example: "1501.04"
name
required
string

Name or title of the account, which appears on report headings. Max length is 80.

Example: "Expense Account"
accountType
string
Default: "balanceSheet"

Type of account:

  • balanceSheet - A snapshot of the current state of a company's assets, liabilities, and equity at a specific time.
  • incomeStatement - Income statement accounts, sometimes called Profit and Loss statements, are cumulative for the selected period.
Enum: "balanceSheet" "incomeStatement"
Example: "balanceSheet"
normalBalance
string
Default: "debit"

Sets whether the normal balance, from an accounting standpoint, is a debit or credit. For example, expense accounts are normally a debit. Sales accounts are normally a credit.

Enum: "credit" "debit"
Example: "debit"
closingType
string
Default: "nonClosingAccount"

Sets the account as a closing or non-closing account. Instead of manually closing accounts at year end, you can set them to be closing accounts and then specify the account in which to close that period.

  • nonClosingAccount - Balance sheet accounts.
  • closingAccount - Income statement accounts. Also specify a closeToGLAccount, which will typically be Retained Earnings. Sage Intacct then zeroes closing-type accounts into retained earnings at year-end.
  • closedToAccount - An account that other accounts close to, such as Retained Earnings.
Enum: "closedToAccount" "closingAccount" "nonClosingAccount"
Example: "nonClosingAccount"
object

Account into which this account should close. Required if closingType is set to closingAccount.

key
string

System-assigned key for account.

Example: "5"
id
string

GL account number.

Example: "3500"
alternativeGLAccount
string
Default: "none"

Sets whether the account can be used as an override of the default AP or AR GL accounts.

  • payablesAccount - The account can be used as an override account for bill and adjustment transactions, and transactions involving a specific vendor.
  • receivablesAccount - The account can be used as an override for invoice and adjustment transactions and transactions involving a specific customer.
  • none - The account cannot be used as an override account.

The same alternative GL account can be used for all line items in a transaction, or different alternative accounts can be set for each line item. For vendors and customers, one alternative GL account can be used for balancing all transactions involving that vendor or customer.

Note: Currently, this field applies to bills, invoices, and adjustments only. It doesn't apply to recurring bills or invoices, manual payments, manual deposits, or advances.

Enum: "none" "payablesAccount" "receivablesAccount"
Example: "payablesAccount"
disallowDirectPosting
boolean
Default: false

Set to true to prevent direct entry of journal entries to the subledger control account (for example Accounts Payable, Accounts Receivable, etc.). Use this control to ensure that the account balance for the subledger account is accurate and has the necessary subledger details supporting the figure, rather than a direct entry which would not be reflected in the subledger application area.

Example: false
status
string
Default: "active"

Object status. Active objects are fully functional. Inactive objects are essentially hidden and cannot be used or referenced.

Enum: "active" "inactive"
Example: "active"
object

The dimensions that must be included on transactions that post to the account.

class
boolean
Default: false

Set to true to require a value for class.

Example: false
contract
boolean
Default: false

Set to true to require a value for contract.

Example: false
customer
boolean
Default: false

Set to true to require a value for customer.

Example: false
department
boolean
Default: false

Set to true to require a value for department.

Example: true
employee
boolean
Default: false

Set to true to require a value for employee.

Example: false
item
boolean
Default: false

Set to true to require a value for item.

Example: false
location
boolean
Default: false

Set to true to require a value for location.

Example: false
project
boolean
Default: false

Set to true to require a value for project.

Example: false
vendor
boolean
Default: false

Set to true to require a value for vendor.

Example: false
warehouse
boolean
Default: false

Set to true to require a value for warehouse.

Example: false
asset
boolean
Default: false

Set to true to require a value for asset.

Example: false
affiliateEntity
boolean
Default: false

Set to true to require a value for affiliate entity.

Example: false
category
string

Account categories are pre-defined groupings that arrange accounts into out-of-the-box reports, graphs, and performance cards. This field is available only for companies that were created with a QuickStart template or chose one later. If enabled, set a category for the account. The available values are tied to the particular QuickStart template used for the company. The category chosen will automatically set values for accountType, normalBalance, and closingType.

Example: "Cash and Cash Equivalents"
isTaxable
boolean
Default: false

Set to true to mark the account as taxable.

Example: false
taxCode
string

Provide the tax return code needed by external tax compliance products to map tax codes to the tax forms that the company uses. Requires tax codes to be enabled in the General Ledger.

Example: "CST"
mrcCode
string

The M-3 return code box to map M-3 return codes to your M-3 form.

Example: "m-3 1065"
Responses
201

Created

400

Bad Request

Request samples
application/json
{
  • "id": "1501",
  • "name": "Vehicle Spare parts - Transmission",
  • "accountType": "balanceSheet",
  • "closingType": "nonClosingAccount",
  • "normalBalance": "debit",
  • "alternativeGLAccount": "none",
  • "status": "active",
  • "requireDimensions": {
    • "department": false,
    • "location": false
    },
  • "isTaxable": false,
  • "disallowDirectPosting": true
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "356",
    • "id": "1501",
    • "href": "/objects/general-ledger/account/356"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Get an account

get/objects/general-ledger/account/{key}

Returns detailed information for a specified account.

Permissions and other requirements
SubscriptionCompany
User typeBusiness, Employee, Project Manager, and Warehouse
PermissionsList, View Accounts
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the account.

Example: 411
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "key": "356",
    • "id": "1501",
    • "name": "Vehicle Spare parts - Transmission",
    • "accountType": "balanceSheet",
    • "normalBalance": "debit",
    • "closingType": "nonClosingAccount",
    • "closeToGLAccount": {
      • "id": null,
      • "key": null
      },
    • "status": "active",
    • "requireDimensions": {
      • "department": false,
      • "location": false,
      • "project": false,
      • "customer": false,
      • "vendor": false,
      • "employee": false,
      • "item": false,
      • "class": false,
      • "contract": false,
      • "warehouse": false
      },
    • "isTaxable": false,
    • "category": null,
    • "taxCode": null,
    • "mrcCode": null,
    • "alternativeGLAccount": "none",
    • "audit": {
      • "createdDateTime": "2022-10-15T00:05:46Z",
      • "modifiedDateTime": "2022-10-15T00:05:46Z",
      • "createdBy": "68",
      • "modifiedBy": "68"
      },
    • "disallowDirectPosting": true,
    • "href": "/objects/general-ledger/account/356"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Update an account

patch/objects/general-ledger/account/{key}

Updates an existing account by setting field values. Any fields not provided remain unchanged.

An account id (account number) can only be changed if the General Ledger is configured to allow changes to account numbers and by users who have permission to change financial account numbers. Changing account numbers affects important aspects of Sage Intacct such as reports, data imports, historical information, and automation.

Permissions and other requirements
SubscriptionCompany
User typeBusiness user with admin privileges
PermissionsEdit Accounts
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the account.

Example: 411
Request Body schema: application/json
id
string

The primary account number. This number must be a specific length, which is set on the Accounting tab of the Company Information page.

Example: "1501.04"
name
string

Name or title of the account, which appears on report headings. Max length is 80.

Example: "Expense Account"
accountType
string
Default: "balanceSheet"

Type of account:

  • balanceSheet - A snapshot of the current state of a company's assets, liabilities, and equity at a specific time.
  • incomeStatement - Income statement accounts, sometimes called Profit and Loss statements, are cumulative for the selected period.
Enum: "balanceSheet" "incomeStatement"
Example: "balanceSheet"
normalBalance
string
Default: "debit"

Sets whether the normal balance, from an accounting standpoint, is a debit or credit. For example, expense accounts are normally a debit. Sales accounts are normally a credit.

Enum: "credit" "debit"
Example: "debit"
closingType
string
Default: "nonClosingAccount"

Sets the account as a closing or non-closing account. Instead of manually closing accounts at year end, you can set them to be closing accounts and then specify the account in which to close that period.

  • nonClosingAccount - Balance sheet accounts.
  • closingAccount - Income statement accounts. Also specify a closeToGLAccount, which will typically be Retained Earnings. Sage Intacct then zeroes closing-type accounts into retained earnings at year-end.
  • closedToAccount - An account that other accounts close to, such as Retained Earnings.
Enum: "closedToAccount" "closingAccount" "nonClosingAccount"
Example: "nonClosingAccount"
object

Account into which this account should close. Required if closingType is set to closingAccount.

key
string

System-assigned key for account.

Example: "5"
id
string

GL account number.

Example: "3500"
alternativeGLAccount
string
Default: "none"

Sets whether the account can be used as an override of the default AP or AR GL accounts.

  • payablesAccount - The account can be used as an override account for bill and adjustment transactions, and transactions involving a specific vendor.
  • receivablesAccount - The account can be used as an override for invoice and adjustment transactions and transactions involving a specific customer.
  • none - The account cannot be used as an override account.

The same alternative GL account can be used for all line items in a transaction, or different alternative accounts can be set for each line item. For vendors and customers, one alternative GL account can be used for balancing all transactions involving that vendor or customer.

Note: Currently, this field applies to bills, invoices, and adjustments only. It doesn't apply to recurring bills or invoices, manual payments, manual deposits, or advances.

Enum: "none" "payablesAccount" "receivablesAccount"
Example: "payablesAccount"
disallowDirectPosting
boolean
Default: false

Set to true to prevent direct entry of journal entries to the subledger control account (for example Accounts Payable, Accounts Receivable, etc.). Use this control to ensure that the account balance for the subledger account is accurate and has the necessary subledger details supporting the figure, rather than a direct entry which would not be reflected in the subledger application area.

Example: false
status
string
Default: "active"

Object status. Active objects are fully functional. Inactive objects are essentially hidden and cannot be used or referenced.

Enum: "active" "inactive"
Example: "active"
object

The dimensions that must be included on transactions that post to the account.

class
boolean
Default: false

Set to true to require a value for class.

Example: false
contract
boolean
Default: false

Set to true to require a value for contract.

Example: false
customer
boolean
Default: false

Set to true to require a value for customer.

Example: false
department
boolean
Default: false

Set to true to require a value for department.

Example: true
employee
boolean
Default: false

Set to true to require a value for employee.

Example: false
item
boolean
Default: false

Set to true to require a value for item.

Example: false
location
boolean
Default: false

Set to true to require a value for location.

Example: false
project
boolean
Default: false

Set to true to require a value for project.

Example: false
vendor
boolean
Default: false

Set to true to require a value for vendor.

Example: false
warehouse
boolean
Default: false

Set to true to require a value for warehouse.

Example: false
asset
boolean
Default: false

Set to true to require a value for asset.

Example: false
affiliateEntity
boolean
Default: false

Set to true to require a value for affiliate entity.

Example: false
category
string

Account categories are pre-defined groupings that arrange accounts into out-of-the-box reports, graphs, and performance cards. This field is available only for companies that were created with a QuickStart template or chose one later. If enabled, set a category for the account. The available values are tied to the particular QuickStart template used for the company. The category chosen will automatically set values for accountType, normalBalance, and closingType.

Example: "Cash and Cash Equivalents"
isTaxable
boolean
Default: false

Set to true to mark the account as taxable.

Example: false
taxCode
string

Provide the tax return code needed by external tax compliance products to map tax codes to the tax forms that the company uses. Requires tax codes to be enabled in the General Ledger.

Example: "CST"
mrcCode
string

The M-3 return code box to map M-3 return codes to your M-3 form.

Example: "m-3 1065"
Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "disallowDirectPosting": false
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "356",
    • "id": "1501",
    • "href": "/objects/general-ledger/account/356"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Delete an account

delete/objects/general-ledger/account/{key}

Deletes an account. You cannot delete an account if the account is used in a book transaction. Deleted accounts cannot be recovered.

Permissions and other requirements
SubscriptionCompany
User typeBusiness user with admin privileges
PermissionsDelete Accounts
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the account.

Example: 411
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 accounts

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: "general-ledger/account"
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": "general-ledger/account",
  • "filters": [
    • {
      • "$eq": {
        }
      }
    ],
  • "fields": [
    • "key",
    • "id",
    • "name",
    • "status",
    • "href"
    ],
  • "orderBy": [
    • {
      • "id": "asc"
      }
    ]
}
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "82",
      • "id": "1001",
      • "name": "Savings",
      • "status": "active",
      • "href": "/objects/general-ledger/account/82"
      },
    • {
      • "key": "83",
      • "id": "1002",
      • "name": "Money Market",
      • "status": "active",
      • "href": "/objects/general-ledger/account/83"
      },
    • {
      • "key": "84",
      • "id": "1003",
      • "name": "Petty Cash",
      • "status": "active",
      • "href": "/objects/general-ledger/account/84"
      }
    ],
  • "ia::meta": {
    • "totalCount": 3,
    • "start": 1,
    • "pageSize": 100,
    • "next": null,
    • "previous": null
    }
}