Skip to Content
Guides

Custom Tables

Retrieve the configuration of organization custom tables and search for rows within them.

Custom tables are user-defined data tables configured in the Skailer interface. Examples: "Accrued Bonuses", "Paid Bonuses", "Payment Details", etc. The API lets you read the table configuration and retrieve rows with filtering.

Get all custom tables

GET /api/v1/custom-fields/tables

Returns all custom tables of the organization configured for employees.

Response fields (per table):

FieldTypeDescription
idintegerTable ID
slugstringUnique table slug
titlestringTable name
table_typestringTable type (see below)
is_historicalbooleanWhether the table is historical (date-effective rows)
table_fieldsarrayList of table fields

Table types (table_type):

ValueDescription
customUser-defined custom table
employee_positionsSystem position history table
employee_employmentsSystem employment history table
employee_compensationsSystem compensation history table
employee_additional_compensationsSystem additional compensations table

Fields per table field (table_fields):

FieldTypeDescription
idintegerField ID
slugstringField slug (used as key in cells when writing rows)
titlestringField name
field_typestringValue type: text, number, date, datetime, select, switch, employee_reference, etc.
optionsarrayOptions for select fields; for entity_reference fields - the active records of the reference_entity directory (for example, legal entities)
is_mandatorybooleanWhether the field is mandatory
is_archivedbooleanWhether the field is archived

Response example:

[
  {
    "id": 15,
    "slug": "accrued_bonuses",
    "title": "Accrued Bonuses",
    "table_type": "custom",
    "is_historical": true,
    "table_fields": [
      {
        "id": 101,
        "slug": "bonus_amount",
        "title": "Amount",
        "field_type": "number",
        "options": []
      },
      {
        "id": 102,
        "slug": "bonus_currency",
        "title": "Currency",
        "field_type": "select",
        "options": [
          { "id": 1, "title": "USD" },
          { "id": 2, "title": "EUR" }
        ]
      }
    ]
  }
]

Search rows in a custom table

POST /api/v1/custom-fields/tables/{table_id}/rows/search

Search and export rows from a specific table. Supports filtering, pagination, and sorting.

Request parameters:

FieldTypeDescription
page_numberintegerPage number (default: 1)
employee_idsarray[integer]Filter by employees
position_idsarray[integer]Filter by positions
department_idsarray[integer]Filter by departments
division_idsarray[integer]Filter by divisions
location_idsarray[integer]Filter by locations
employee_lifecycle_statusesarray[string]Statuses: hired, employed, terminated, on_leave, on_parental_leave
date_effective_fromstring (date)Rows effective on or after this date
date_effective_tostring (date)Rows effective on or before this date
field_filtersarrayCustom filters on field values
sortingobjectSort configuration
textstringText search
with_historybooleanHistorical tables only: return every row, not just the current one (default: false)

A historical table (is_historical: true) returns only the current row of each employee by default. Pass with_history: true to get the full history. For employees whose table history the token is not allowed to view, only the current row is returned even with with_history: true.

Response fields (per row):

FieldTypeDescription
idintegerRow ID
employee_idintegerEmployee ID
date_effective_fromstringRow effective date
is_currentbooleanWhether this is the current row
cellsarrayFilled cells with values and field configuration

Cell value fields that depend on the field type:

FieldDescription
value_labelLabel of a url address; null when not set
value_referencesRecords of an entity_reference cell: id, title, is_archived, in the order of value_int_array. Archived records stay in the value with is_archived: true
{
  "field": { "slug": "legal_entity", "field_type": "entity_reference" },
  "value": {
    "value_int_array": [3],
    "value_references": [{ "id": 3, "title": "Acme Ltd", "is_archived": false }]
  }
}

Request example - export bonuses for a quarter:

{
  "page_number": 1,
  "date_effective_from": "2024-01-01",
  "date_effective_to": "2024-03-31",
  "employee_lifecycle_statuses": ["employed"],
  "with_history": true
}

Get all employee custom fields

GET /api/v1/custom-fields/fields

Returns the employee fields the token owner can view, with their options. A field is returned if it is visible for at least one employee.

FieldDescription
id, section_idField and its section
slugField key, used as the key in custom_fields of employee writes
title, description, hintField texts
type, field_typeField kind and value type
is_mandatory, is_archivedField flags
config, reference_entityField settings; reference_entity is set for fields that reference another entity
optionsOptions of select fields; for entity_reference fields - the active records of the reference_entity directory

The values of employee custom fields carry the same value_label and value_references as table cells.


Typical integration scenario

Goal: export employee bonuses for a period to a payroll system.

  1. Get table list:

    GET /api/v1/custom-fields/tables

    Find the table with the target slug, save its id and field ids.

  2. Fetch rows for the period:

    POST /api/v1/custom-fields/tables/{table_id}/rows/search

    Use date_effective_from / date_effective_to filters. For a historical table also pass with_history: true, otherwise only the current row of each employee is returned.

  3. Use the field slug from the table configuration to interpret cell values.

Tip: cache the table configuration (step 1) - it changes infrequently. Fetch rows (step 2) on every sync run.


Writing rows to tables

To add, update, or delete rows for a specific employee, use the methods described in Employees → Custom table rows.

On this page