User views

User views are stored queries on objects that can be used to get a filtered list of objects based on current data at any given time. User views can be created and modified through the UI or the API, and can be restricted to the user who creates one or made available to all users.

Use the view service to execute a view and get the data that matches the view's filter and sort options.

Note that user views are not the same as custom views, although they are similar. This API object and operations only apply to user views.

List user views

get/objects/core/user-view

Returns a collection with a key, ID, and link for each user view. This operation is mostly for use in testing; use the query service to find user views that meet specific 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": "9",
      • "id": "9",
      • "href": "/objects/core/user-view/9"
      },
    • {
      • "key": "6",
      • "id": "6",
      • "href": "/objects/core/user-view/6"
      },
    • {
      • "key": "5",
      • "id": "5",
      • "href": "/objects/core/user-view/5"
      }
    ],
  • "ia::meta": {
    • "totalCount": 3,
    • "start": 1,
    • "pageSize": 100,
    • "next": null,
    • "previous": null
    }
}

Create a user view

post/objects/core/user-view

Creates a new user view.

SecurityOAuth2
Request
Request Body schema: application/json
required

User view to create

name
required
string

Unique name for the user view.

Example: "Vendors with overdue balances"
required
object

Query parameters that define the object being queried, the filters that select the records to return based on field values, the fields (columns) returned in the view, and the ordering of the returned records.

Example: {"object":"accounts-receivable/customer","fields":["name","contacts.default.mailingAddress.city","customerType.id","totalDue"],"filters":[{"$gte":{"totalDue":"200"}}],"orderBy":[{"totalDue":"asc"}],"filterExpression":"and","filterParameters":{"includePrivate":true}}
object
string

Object type to query, in the form <application-name>/<object name>. For custom objects use platform-apps/nsp::<object-name>.

Example: "accounts-receivable/customer"
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: ["name","contacts.default.mailingAddress.city","customerType.id","totalDue"]
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 has (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: [{"$gte":{"totalDue":"200"}}]
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: "and"
object

Pre-defined filter options.

Example: {"includePrivate":true}
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: true
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"}]
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 result set, 4000 maximum.

Example: 100
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"
description
string

A brief description of the user view.

object
string

Object that is queried to create the user view. Must match the object property in the query object.

Example: "accounts-payable/bill"
category
string or null

View category. Can be used to group user view.

Example: "Vendor views"
viewVersion
string

The API version at which the user-view object was created or last updated. The system will try to adjust the output as needed if a view created in an older version of the API is executed in a newer version.

Example: "1"
isPublic
boolean
Default: false

Indicates whether this user view is only usable by the user who created it (false) or is usable by others (true).

Example: true
context
string

UI context where the user view is available. A value of __default means that the user view is available in all contexts. This field can be used to group views that are stored queries that aren't intended for use in the UI.

Example: "__default"
object

Settings for displaying the view in the UI.

frozenColumnCount
number

Number of frozen columns in the view.

Example: 2
frozenColumnsCount
number
Deprecated

This property is deprecated and replaced by frozenColumnCount.

Array of objects

Ordered list of columns in the view.

Array
id
string

Field displayed in the column.

Example: "customerType.id"
textFormat
string

Column format, either clip or wrap.

Example: "clip"
format
string
Deprecated

This property is deprecated and replaced by textFormat.

object

The user who created and owns the user view.

key
string

Unique key for the user.

Example: "512"
id
string

User ID.

Example: "rmccamy"
Responses
201

Created

400

Bad Request

Request samples
application/json
{
  • "name": "Inactive vendors",
  • "query": {
    • "object": "accounts-payable/vendor",
    • "fields": [
      • "id",
      • "name",
      • "status",
      • "href"
      ],
    • "filters": [
      • {
        },
      • {
        }
      ],
    • "filterExpression": "1 and 2",
    • "orderBy": [
      • {
        }
      ]
    }
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "9",
    • "id": "9",
    • "href": "/objects/core/user-view/9"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Get a user view

get/objects/core/user-view/{key}

Returns detailed information for a specified user view.

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for a user view.

Example: 262
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "key": "262",
    • "id": "262",
    • "name": "Active vendors",
    • "description": "Active vendors with open billing items",
    • "category": null,
    • "owner": {
      • "key": "1",
      • "id": "Admin",
      • "href": "/objects/company-config/user/1"
      },
    • "object": "accounts-payable/vendor",
    • "query": {
      • "object": "accounts-payable/vendor",
      • "fields": [
        ],
      • "filters": [
        ],
      • "filterExpression": "1 and 2",
      • "orderBy": [
        ]
      },
    • "status": "active",
    • "viewVersion": "0",
    • "audit": {
      • "createdDateTime": "2025-05-16T17:41:55Z",
      • "modifiedDateTime": "2025-05-17T17:41:55Z",
      • "createdBy": "1",
      • "modifiedBy": "1"
      },
    • "href": "/objects/core/user-view/262"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Update a user view

patch/objects/core/user-view/{key}

Updates an existing user view by setting field values.

To change one or more metadata values and preserve the rest, you must provide the entire metadata object, not just the fields you want to change. Any metadata fields that you do not include in the request will be reset to their default values.

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for a user view.

Example: 262
Request Body schema: application/json
name
string

Unique name for the user view.

Example: "Vendors with overdue balances"
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"
description
string

A brief description of the user view.

object
string

Object that is queried to create the user view. Must match the object property in the query object.

Example: "accounts-payable/bill"
category
string or null

View category. Can be used to group user view.

Example: "Vendor views"
viewVersion
string

The API version at which the user-view object was created or last updated. The system will try to adjust the output as needed if a view created in an older version of the API is executed in a newer version.

Example: "1"
isPublic
boolean
Default: false

Indicates whether this user view is only usable by the user who created it (false) or is usable by others (true).

Example: true
context
string

UI context where the user view is available. A value of __default means that the user view is available in all contexts. This field can be used to group views that are stored queries that aren't intended for use in the UI.

Example: "__default"
object

Query parameters that define the object being queried, the filters that select the records to return based on field values, the fields (columns) returned in the view, and the ordering of the returned records.

Example: {"object":"accounts-receivable/customer","fields":["name","contacts.default.mailingAddress.city","customerType.id","totalDue"],"filters":[{"$gte":{"totalDue":"200"}}],"orderBy":[{"totalDue":"asc"}],"filterExpression":"and","filterParameters":{"includePrivate":true}}
object
string

Object type to query, in the form <application-name>/<object name>. For custom objects use platform-apps/nsp::<object-name>.

Example: "accounts-receivable/customer"
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: ["name","contacts.default.mailingAddress.city","customerType.id","totalDue"]
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 has (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: [{"$gte":{"totalDue":"200"}}]
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: "and"
object

Pre-defined filter options.

Example: {"includePrivate":true}
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: true
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"}]
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 result set, 4000 maximum.

Example: 100
object

Settings for displaying the view in the UI.

frozenColumnCount
number

Number of frozen columns in the view.

Example: 2
frozenColumnsCount
number
Deprecated

This property is deprecated and replaced by frozenColumnCount.

Array of objects

Ordered list of columns in the view.

Array
id
string

Field displayed in the column.

Example: "customerType.id"
textFormat
string

Column format, either clip or wrap.

Example: "clip"
format
string
Deprecated

This property is deprecated and replaced by textFormat.

object

The user who created and owns the user view.

key
string

Unique key for the user.

Example: "512"
id
string

User ID.

Example: "rmccamy"
Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "query": {
    • "object": "company-config/employee",
    • "fields": [
      • "key",
      • "primaryContact.lastName",
      • "primaryContact.prefix",
      • "primaryContact.firstName",
      • "primaryContact.id",
      • "startDate"
      ],
    • "filters": [
      • {
        },
      • {
        }
      ],
    • "filterExpression": "and",
    • "orderBy": [
      • {
        }
      ],
    • "filterParameters": {
      • "includeHierarchyFields": false
      }
    },
  • "metadata": {
    • "columns": [
      • {
        },
      • {
        },
      • {
        },
      • {
        },
      • {
        }
      ],
    • "frozenColumnCount": 1
    }
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "8",
    • "id": "8",
    • "href": "/objects/core/user-view/8"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Delete a user view

delete/objects/core/user-view/{key}

Deletes a user view.

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for a user view.

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