Statistical accounts

Statistical accounts are used to track non-financial data, such as employee headcount, number of members, or even the number of rooms in a hotel.

List statistical accounts

get/objects/general-ledger/statistical-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 statistical GL accounts that meet certain criteria and to specify the properties that you want in the response.

SecurityOAuth2
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "397",
      • "id": "9001",
      • "href": "/objects/general-ledger/statistical-account/397"
      },
    • {
      • "key": "398",
      • "id": "9002",
      • "href": "/objects/general-ledger/statistical-account/398"
      },
    • {
      • "key": "399",
      • "id": "9003",
      • "href": "/objects/general-ledger/statistical-account/399"
      }
    ],
  • "ia::meta": {
    • "totalCount": 3,
    • "start": 1,
    • "pageSize": 100,
    • "next": null,
    • "previous": null
    }
}

Create a statistical account

post/objects/general-ledger/statistical-account

Creates a new statistical account. You should assign a different account range to statistical accounts so that they are not inadvertently grouped with general ledger accounts. Statistical accounts can be consolidated similarly to general ledger accounts, if you have a consolidated structure of companies with subsidiaries.

Individual statistical accounts are typically rolled up into account groups for use in reports.

SecurityOAuth2
Request
Request Body schema: application/json
required
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: "9001"
name
required
string

Name or title of this statistical account.

Example: "Customer Account"
reportType
string
Default: "forPeriod"

This is a non-functional field, for information purposes only. It does not affect how amounts are calculated for reporting.

Enum: "cumulative" "forPeriod"
Example: "forPeriod"
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
task
boolean
Default: false

Set to true to require a value for task.

Example: false
costType
boolean
Default: false

Set to true to require a value for cost type.

Example: false
isTaxable
boolean
Default: false

Set to true to mark the account as taxable.

Example: true
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 set by the particular QuickStart template used for the company.

Example: "Customers"
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"
Responses
201

Created

400

Bad Request

Request samples
application/json
{
  • "id": "9030",
  • "name": "Customer Account",
  • "reportType": "forPeriod",
  • "status": "active",
  • "requireDimensions": {
    • "department": true,
    • "location": true
    },
  • "isTaxable": false,
  • "category": "Customers"
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "439",
    • "id": "9030",
    • "href": "/objects/general-ledger/statistical-account/439"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Get a statistical account

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

Returns detailed information for a specified statistical account.

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the statistical account.

Example: 439
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "key": "397",
    • "id": "9001",
    • "name": "Customer Account",
    • "reportType": "forPeriod",
    • "status": "active",
    • "audit": {
      • "modifiedDateTime": "2023-10-21T04:55:32Z",
      • "createdDateTime": "2023-09-20T11:29:30Z",
      • "createdBy": "1",
      • "modifiedBy": "1"
      },
    • "requireDimensions": {
      • "department": false,
      • "location": false,
      • "project": false,
      • "customer": false,
      • "vendor": false,
      • "employee": false,
      • "item": false,
      • "class": false
      },
    • "isTaxable": true,
    • "category": "Customers",
    • "href": "/objects/general-ledger/statistical-account/397"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Update a statistical account

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

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

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the statistical account.

Example: 439
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: "9001"
name
string

Name or title of this statistical account.

Example: "Customer Account"
reportType
string
Default: "forPeriod"

This is a non-functional field, for information purposes only. It does not affect how amounts are calculated for reporting.

Enum: "cumulative" "forPeriod"
Example: "forPeriod"
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
task
boolean
Default: false

Set to true to require a value for task.

Example: false
costType
boolean
Default: false

Set to true to require a value for cost type.

Example: false
isTaxable
boolean
Default: false

Set to true to mark the account as taxable.

Example: true
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 set by the particular QuickStart template used for the company.

Example: "Customers"
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"
Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "name": "Customer Accounts",
  • "isTaxable": true
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "397",
    • "id": "9001",
    • "href": "/objects/general-ledger/statistical-account/397"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Delete a statistical account

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

Deletes a statistical account. Accounts used in a book transaction cannot be deleted. Deleted accounts cannot be recovered.

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the statistical account.

Example: 439
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
    }
}