# Query field reference

Every list endpoint returns list items of the type `ApiListItem`. This page shows which fields you can use in `$filter`, `$search` and `$orderby`. How to write the query: [Queries and paging](https://code.salaxy.com/reference/queries.md).

Each list type (for example `CalculationListItem` or `EmploymentListItem`) adds its own fields in `data` and its own values in `status`. See the type in the [REST API reference](https://code.salaxy.com/reference/rest-api.md).

## ApiListItem

| Field | Type | Filter | Search | Sort | Description |
|---|---|---|---|---|---|
| `backOfficeStatus` | string | ✓ | ✓ | ✓ | The back office status, depending on the type of the object |
| `businessObjects` | string[] | ✓ | | | Ids of related objects, for example the calculations and payrolls in a payment |
| `createdAt` | datetime | ✓ | | ✓ | When the object was created |
| `data` | dictionary | ✓ | ✓ | | Business data of the list type. Filterable and searchable, not sortable |
| `endAt` | date | ✓ | | ✓ | End date of the event. Usually the last user update; for a calculation, the payment date |
| `entityType` | string | ✓ | ✓ | ✓ | Sub-category of the object |
| `externalId` | string | ✓ | ✓ | ✓ | Your id for the object in your own system |
| `fee` | number | ✓ | | ✓ | Estimated fee of the transaction |
| `flags` | string[] | ✓ | ✓ | | Workflow flags |
| `grossSalary` | number | ✓ | | ✓ | Gross salary, where relevant |
| `id` | string | ✓ | ✓ | ✓ | Id of the object |
| `isReadOnly` | boolean | | | | The object is read-only for the signed-in account |
| `listType` | string | | | | The list item type |
| `logicalDate` | datetime | ✓ | | ✓ | The date of the period the object is for |
| `messages` | string[] | ✓ | ✓ | | Workflow messages, as `[MessageType]:[Message] ([User] at [UTC time])` |
| `otherId` | string | ✓ | | ✓ | Id of the other party, today always the person id |
| `otherPartyInfo` | AccountInIndex | see below | | | The other party, usually a person (for example the worker of a salary payment) |
| `owner` | string | ✓ | | ✓ | Owner of the data. Always your own: you cannot query across owners |
| `ownerId` | string | ✓ | | ✓ | Id of the owner. Nearly always the same as `owner` |
| `ownerInfo` | AccountInIndex | see below | | | The owner |
| `partner` | string | ✓ | ✓ | ✓ | The primary partner. Set automatically |
| `payment` | number | ✓ | | ✓ | The payment from the owner's view: total payment for an employer, net salary for a worker |
| `reference` | string | ✓ | ✓ | ✓ | A reference, for example a payment reference number |
| `salaryDate` | date | ✓ | | ✓ | Calculations only: the expected salary date |
| `shortText` | string | ✓ | ✓ | ✓ | A short description, for example "Paid salary" |
| `startAt` | date | ✓ | | ✓ | Start date of the event. Usually the creation date |
| `status` | string | ✓ | ✓ | ✓ | The main status. Values depend on the list type |
| `timestamp` | datetime | ✓ | | ✓ | Last change by a user or by the system |
| `type` | string | | | | The object type |
| `updatedAt` | datetime | ✓ | | ✓ | Last update by a user |
| `uri` | string | | | | Salaxy URI of the object |
| `versionNumber` | number | | | | Version number |

## AccountInIndex

`ownerInfo` and `otherPartyInfo` are of this type. Use a path in the query, for example `$filter=otherPartyInfo/officialId eq '190372-942M'` or `$orderby=otherPartyInfo/avatar/sortableName asc`.

| Field | Type | Filter | Search | Sort | Description |
|---|---|---|---|---|---|
| `avatar/displayName` | string | ✓ | ✓ | ✓ | For a person, "FirstName LastName" |
| `avatar/sortableName` | string | ✓ | ✓ | ✓ | For a person, "LastName, FirstName". Can be lower case |
| `avatar/firstName` | string | ✓ | ✓ | ✓ | First name, or the company name |
| `avatar/lastName` | string | ✓ | ✓ | ✓ | Last name. Empty for a company |
| `avatar/entityType` | string | ✓ | ✓ | ✓ | `person`, `company`, `personCreatedByEmployer` or `partner` |
| `avatar/description` | string | ✓ | ✓ | ✓ | Short description |
| `avatar/initials` | string | ✓ | ✓ | ✓ | Initials |
| `email` | string | ✓ | ✓ | ✓ | Email address |
| `ibanNumber` | string | ✓ | ✓ | ✓ | Bank account number (IBAN) |
| `officialId` | string | ✓ | ✓ | ✓ | Personal identity code or business ID |
| `telephone` | string | ✓ | ✓ | ✓ | Telephone number |

The other fields of `AccountInIndex` (`id`, `owner`, `partner`, `createdAt`, `updatedAt`, `isReadOnly` and the avatar picture fields) are returned, but you cannot query them.
