All endpoints give the opportunity to filter data returned to limit the network traffic (for example: to only receive id
and title
data of the endpoint GET/accommodations).
Some endpoints also give the opportunity to filter objects returned according to defined criteria (for example: only the accommodations of the Rhône department).
Data and objects filters can be accumulated.
To filter data (for example, to only receive id
and title
), use the scope
parameter in the following way: ?scope=id|title
.
To filter objects (for example, to only receive accommodations from the Rhône - 69), use the filtering
parameter eand the area_code
criteria in the form of key value in the following way: https://vacation.unicstay.com/api/v1/abcd/v2/accommodations?filtering[area_code]=69
(see API endpoints to see which endpoints propose filter criteria).
It is possible to accumulate many criteria (for example, treehouses from the Rhône department: https://vacation.unicstay.com/api/v1/abcd/v2/accommodations?filtering[area_code]=69&filtering[type_id]=73
).