Filtering results
In this guide, we will look at how to filter results using one of the list endpoints.
Filter format
To filter results on an endpoint you can use the filter query string parameter. It consists of the word filter
with brackets containing the name of the field you want to filter on.
The value
of the parameter, all after the = sign, consists of the operator
you want a : sign and the value
you want this operator to have.
Multiple filters will always be interpreted as AND operators meaning all filters should evaluate to true for a record to match the filter. String will always be tested case sensitive meaning Eierbal
or eierbal
are not the same.
Filter results
curl
--location
--request 'https://partner.punt-uit.nl/api/fulfilment/v3/products?filter[sku]=startsWith:978'
--header 'Authorization: Bearer ey...'
--header 'Content-Type: application/json'
Filter operations
- Name
equals
- Type
- Description
Value equals
n
Match all resoures where field
orderRef
equals10712
./resource?filter[orderRef]=equals:10712
- Name
not
- Type
- Description
Value does not equal
n
Match all resources where field
ref
not equalsJQQLD5PG5L
./?filter[ref]=not:JQQLD5PG5L
- Name
in
- Type
- Description
Value
n
exists in listMatch all resource where field
status
has one of the valuesnew, on_hold
./?filter[status]=in:new,on_hold
- Name
notIn
- Type
- Description
Value
n
does not exist in listMatch all resources where field
status
does not match one of the valuescancelled,on_hold
./?filter[status]=notIn:cancelled,on_hold
- Name
lt
- Type
- Description
Value
n
is less thanx
Match all resources where field
deliveryDate
is less than2023-09-21
./?filter[deliveryDate]=lt:2023-09-21
- Name
lte
- Type
- Description
Value
n
is less than or equal tox
Match all resources where field
stock
is less than or equal to42
./?filter[stock]=lte:42
- Name
gt
- Type
- Description
Value
n
is greater thanx
Match all resources where field
quantity
is greater than42
./?filter[quantity]=gt:42
- Name
gte
- Type
- Description
Value
n
is greater than or equal tox
Match all resources where field
price
is greater than or equal to37.99
./?filter[price]=gte:37.99
- Name
contains
- Type
- Description
Value
n
containsx
Match all resources where field
name
contains the phraseeierbal
./?filter[name]=contains:eierbal
- Name
startsWith
- Type
- Description
Value
n
starts withx
Match all resources where field
shipToPostCode
starts with the phrase7822
./?filter[shipToPostCode]=startsWith:7822
- Name
endsWith
- Type
- Description
Value
n
ends withx
Match all resources where field
shippingContactEmail
ends with the phrasestatus418.nl
./?filter[shippingContactEmail]=endsWith:status418.nl