Custom Tables
Public API

Create Custom Table Field

Changed on

Add a new column to an existing custom table; the new column is appended after the table's current columns. Requires the acting user to be an owner-admin. To create a table together with its initial columns, use Create Custom Table (create-public-custom-table) instead. To edit an existing column or replace the table's full column set, use Update Custom Table (update-public-custom-table) instead. For a single standalone field not backed by a table, use Custom Fields > Create Custom Field (create-public-custom-field) instead.

OAuth Scopes: employee:custom_fields.write

post/api/v1/hris/custom-tables/{customTableId}/fields

Request

Path parameters

customTableIdstring required
Example:123

The ID of the custom table to add a field to.

Request body

idinteger

The id of the Custom Table Field to be edited. Provide the existing column's id to update it in place; omit to add a new column.

tableIdinteger

The id of the Custom Table where the Custom Table Field will be added

namestring required

The name of the Custom Table Field to be edited / created

type'text' | 'textarea' | 'list' | 'multilist' | 'checkbox' | 'dollar' | 'date' | 'int' | 'percentage' | 'phone' | 'state' | 'employee' required

The type of the Custom Table Field to be edited / created

sortFieldboolean

Whether the Custom Table Field is a sort field or not

displayboolean

Whether the Custom Table Field is displayed or not

summarize'none' | 'total' | 'average'

The summarize of the Custom Table Field to be edited / created

valuesstring[]

The values of the Custom Table Field to be edited / created

Response

Custom table field added.

idinteger

The id of the Custom Field

namestring

The name of the Custom Field

typestring

The type of the Custom Field

isEncryptedboolean

Whether the Custom Field is encrypted or not

isCalculatedboolean

Whether the Custom Field is calculated or not

isRequiredboolean

Whether the Custom Field is required or not

orderinteger

The order of the Custom Field

summarize'none' | 'total' | 'average'

The aggregation applied when computing totals for this field. Only meaningful for custom table columns; always "none" for standalone custom fields and for the custom table object itself.

valuesstring[]

The values of the Custom Field

sortFieldboolean

Whether this field is used for sorting the table

Changes