Class is a flexible dimension that can be defined in a company and used to track just about anything. You can rename the class dimension and add custom fields if needed, and then select a class and provide values for the fields in applicable transactions. You can use the data to create custom reports that provide important business insights.
Note that renaming the class dimension in the UI does not change the name of this object in the API. You still use class
in API requests.
Returns up to 100 object references from the collection with a key, ID, and link for each object. This operation is mostly for use in testing; use the query service to find objects that meet certain criteria and specify the properties that are returned.
Subscription | Company |
---|---|
User type | Business, Employee, Payment Approver |
Permissions | List, View Classes |
OK
Bad Request
{- "ia::result": [
- {
- "key": "1",
- "id": "Class_1",
- "href": "/objects/company-config/class/1"
}, - {
- "key": "2",
- "id": "Class_2",
- "href": "/objects/company-config/class/2"
}
], - "ia::meta": {
- "totalCount": 2,
- "start": 1,
- "pageSize": 100,
- "next": null,
- "previous": null
}
}
Creates a new class. You can think of this as adding a new value to the dimension that you can use to tag transactions for reporting.
Subscription | Company |
---|---|
User type | Business user with admin privileges |
Permissions | Add Classes |
Class object to create
id required | string Unique ID for the class. Example: "1-Goods" | ||||
name required | string Name of this class. Example: "Goods" | ||||
description | string Description of the class. Example: "Goods available for donations" | ||||
status | string Status of the dimension object:
Example: "active" | ||||
object Parent class, for class hierarchies. | |||||
|
Created
Bad Request
{- "id": "SW",
- "name": "Software",
- "description": "All software titles",
- "status": "active"
}
{- "ia::result": {
- "key": "1",
- "id": "SW",
- "href": "/objects/company-config/class/1"
}, - "ia::meta": {
- "totalCount": 1
}
}
Returns detailed information for a specified class.
Subscription | Company |
---|---|
User type | Business, Employee, Payment Approver |
Permissions | List, View Classes |
key required | string System-assigned key for the class. Example: 43 |
OK
Bad Request
{- "ia::result": {
- "key": "9",
- "id": "SW-Office",
- "name": "Office Software",
- "description": "Office productivity software",
- "status": "active",
- "parent": {
- "key": "8",
- "id": "SW",
- "name": "Software"
}, - "audit": {
- "createdDateTime": "2022-06-28T23:41:44Z",
- "modifiedDateTime": "2022-06-29T15:52:18Z",
- "createdBy": "68",
- "modifiedBy": "68"
}, - "href": "/objects/company-config/class/9"
}, - "ia::meta": {
- "totalCount": 1
}
}
Updates an existing class by setting field values. Any fields not provided remain unchanged.
Subscription | Company |
---|---|
User type | Business user with admin privileges |
Permissions | Edit Classes |
key required | string System-assigned key for the class. Example: 43 |
name | string Name of this class. Example: "Goods" | ||||
description | string Description of the class. Example: "Goods available for donations" | ||||
status | string Status of the dimension object:
Example: "active" | ||||
object Parent class, for class hierarchies. | |||||
|
OK
Bad Request
{- "name": "Root one"
}
{- "ia::result": {
- "key": "1",
- "id": "Class1",
- "href": "/objects/company-config/class/1"
}, - "ia::meta": {
- "totalCount": 1,
- "totalSuccess": 1,
- "totalError": 0
}
}
Deletes a class. You can delete a class if it is not being used or referenced. Deleted classes cannot be recovered.
Subscription | Company |
---|---|
User type | Business user with admin privileges |
Permissions | Delete Classes |
key required | string System-assigned key for the class. Example: 43 |
No Content
Bad Request
{- "ia::result": {
- "ia::error": {
- "code": "invalidRequest",
- "message": "A POST request requires a payload",
- "errorId": "REST-1028",
- "additionalInfo": {
- "messageId": "IA.REQUEST_REQUIRES_A_PAYLOAD",
- "placeholders": {
- "OPERATION": "POST"
}, - "propertySet": { }
}, - "supportId": "Kxi78%7EZuyXBDEGVHD2UmO1phYXDQAAAAo"
}
}, - "ia::meta": {
- "totalCount": 1,
- "totalSuccess": 0,
- "totalError": 1
}
}
Queries an object for filtered data.
object | string Object type to query, in the form Example: "company-config/class" | ||||||||
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": "company-config/class",
- "filters": [
- {
- "$ne": {
- "parent.key": null
}
}
], - "fields": [
- "key",
- "id",
- "name",
- "status",
- "href",
- "parent.key",
- "parent.name"
], - "orderBy": [
- {
- "id": "asc"
}
]
}
{- "ia::result": [
- {
- "key": "9",
- "id": "SW Office",
- "name": "Office Software",
- "status": "active",
- "href": "/objects/company-config/class/9",
- "parent.key": "8",
- "parent.name": "Software"
}
], - "ia::meta": {
- "totalCount": 1,
- "start": 1,
- "pageSize": 100,
- "next": null,
- "previous": null
}
}