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.
Returns up to 100 statistical GL accounts from the 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.
Subscription | Company |
---|---|
User type | Business, Employee, Project Manager, and Warehouse |
Permissions | List, View Statistical Accounts |
OK
Bad Request
{- "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
}
}
Creates a new statistical account. You should assign a completely 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.
Subscription | Company, General Ledger |
---|---|
User type | Business user with admin privileges |
Permissions | Add Statistical Accounts |
id required | string Statistical account ID. 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. Example: "forPeriod" | ||||||||||||||||||||||
object The dimensions that must be included on transactions that post to the account. | |||||||||||||||||||||||
| |||||||||||||||||||||||
isTaxable | boolean Default: false Set to 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 tied to 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. Example: "active" |
Created
Bad Request
{- "id": "9030",
- "name": "Customer Account",
- "reportType": "forPeriod",
- "status": "active",
- "requireDimensions": {
- "department": true,
- "location": true
}, - "isTaxable": false,
- "category": "Customers"
}
{- "ia::result": {
- "key": "439",
- "id": "9030",
- "href": "/objects/general-ledger/statistical-account/439"
}, - "ia::meta": {
- "totalCount": 1,
- "totalSuccess": 1,
- "totalError": 0
}
}
Returns detailed information for a specified statistical account.
Subscription | Company |
---|---|
User type | Business, Employee, Project Manager, and Warehouse |
Permissions | List, View Statistical Accounts |
key required | string System-assigned key for the statistical account. Example: 439 |
OK
Bad Request
{- "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
}
}
Updates an existing statistical account by setting field values. Any fields not provided remain unchanged.
Subscription | Company |
---|---|
User type | Business user with admin privileges |
Permissions | Edit Statistical Accounts |
key required | string System-assigned key for the statistical account. Example: 439 |
id | string Statistical account ID. 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. Example: "forPeriod" | ||||||||||||||||||||||
object The dimensions that must be included on transactions that post to the account. | |||||||||||||||||||||||
| |||||||||||||||||||||||
isTaxable | boolean Default: false Set to 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 tied to 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. Example: "active" |
OK
Bad Request
{- "name": "Customer Accounts",
- "isTaxable": true
}
{- "ia::result": {
- "key": "397",
- "id": "9001",
- "href": "/objects/general-ledger/statistical-account/397"
}, - "ia::meta": {
- "totalCount": 1,
- "totalSuccess": 1,
- "totalError": 0
}
}
Deletes a statistical account. You can delete an account from the Accounts list unless the account is used in a book transaction. Deleted accounts cannot be recovered.
Subscription | Company, General Ledger |
---|---|
User type | Business, Employee |
Permissions | Delete Statistical Accounts |
key required | string System-assigned key for the statistical account. Example: 439 |
No Content
Bad Request
{- "ia::result": {
- "ia::error": {
- "code": "invalidRequest",
- "message": "Payload contains errors",
- "supportId": "sQrM9%7EYdh5oDEWVb80mrn9xuHjoAAAABBQ",
- "errorId": "REST-1064",
- "additionalInfo": {
- "messageId": "IA.PAYLOAD_CONTAINS_ERRORS",
- "placeholders": { },
- "propertySet": { }
}, - "details": [
- {
- "code": "invalidRequest",
- "message": "/testDate is not a valid field",
- "errorId": "REST-1043",
- "target": "/testDate",
- "additionalInfo": {
- "messageId": "IA.NOT_A_VALID_FIELD",
- "placeholders": {
- "FIELD": "/testDate"
}, - "propertySet": { }
}
}
]
}, - "ia::meta": {
- "totalCount": 3,
- "totalSuccess": 2,
- "totalError": 1
}
}, - "ia::error": {
- "code": "invalidRequest",
- "message": "Malformed URL",
- "supportId": "sQrM9%7EYdh5oDEWVb80mrn9xuHjoAAAABBQ",
- "details": [
- {
- "code": "invalidRequest",
- "message": "The content type is not valid",
- "correction": "TODO"
}
]
}
}
Queries an object for filtered data.
object | string Object type to query, in the form Example: "general-ledger/statistical-account" | ||||||||
fields | Array of strings List of fields to include in the response. Can be any combination of these:
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 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
These are most useful for queries that you want to save and use repeatedly, such as for views or reports. Just change the For example,
| |||||||||
filterExpression | string Default: "and" Logical operators to apply when there are multiple filter conditions. The conditions in the Shortcuts:
Example: "(1 and 2) or 3" | ||||||||
| |||||||||
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
| |||||||||
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 |
OK
Bad Request
{- "object": "general-ledger/statistical-account",
- "filters": [
- {
- "$eq": {
- "reportType": "cumulative"
}
}
], - "fields": [
- "key",
- "id",
- "name",
- "status",
- "href"
], - "orderBy": [
- {
- "id": "asc"
}
]
}
{- "ia::result": [
- {
- "key": "351",
- "id": "9088",
- "name": "Customer count",
- "status": "active",
- "href": "/objects/general-ledger/statistical-account/351"
}, - {
- "key": "352",
- "id": "9100",
- "name": "Employee headcount",
- "status": "active",
- "href": "/objects/general-ledger/statistical-account/352"
}
], - "ia::meta": {
- "totalCount": 2,
- "start": 1,
- "pageSize": 100,
- "next": null,
- "previous": null
}
}