Artikelen over: API

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 [email protected] 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



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 with query parameters offset and limit. 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 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

Bijgewerkt op: 21/11/2022

Was dit artikel nuttig?

Deel uw feedback

Annuleer

Dankuwel!