> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.robaws.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# API filtering, paging & sorting

## Filtering on standard fields

Each root entity collection resource contains some specific filter parameters. If you have extra filtering needs that could improve the performance
of your API usage, please let us know on support@robaws.com and we will evaluate your request.

## Filtering on extra fields

Filtering on extra fields is possible by using the following URL syntax.
**Be aware** that the [ and the ] characters must be URL encoded!

**Text, Link, Multiple choice fields**
GET /api/v2/articles?extraFields[YourFieldName]=TextValue
**Boolean field**
GET /api/v2/articles?extraFields[YourFieldName]=true
GET /api/v2/articles?extraFields[YourFieldName]=false
**Integer and decimal fields**
GET /api/v2/articles?extraFields[YourFieldName]=90
GET /api/v2/articles?extraFields[YourFieldName]=3.67
**Date fields**
GET /api/v2/articles?extraFields[YourFieldName]=2021-07-08

## Including related resources

The GET endpoints in our API provide you with an optional 'include' query parameter. This allows you to include the needed nested associations into the response without having to perform multiple GET requests. Example; GET /api/v2/employees?include=employer,employer.contacts,certificates. If you do not specify the include parameter, we always return the id value for many/one-to-one associations.

## Paging

Each root entity collection resource is pageable. Two equivalent syntaxes are supported: `offset` and `limit`, or `page` and `size` (if both are supplied, offset/limit takes precedence). Be aware that the max page size is 100. The default page size is 10.
To get predictable sorting results we add a default sorting (`id:asc`) if none is provided. The paging response contains information on how many pages there are given the provided page & size. Example usage:

GET /api/v2/employees?page=0&size=10 //first page
GET /api/v2/employees?page=1&size=10 //second page

## Sorting

Each root entity collection resource is sortable using query parameter sort 'sort'. Example usage:

GET /api/v2/employees?sort=surname:asc,name:desc