Filtering lists

The filter syntax, the date-time format and the time zone a date-time without one is read in, and the error a bad filter returns

List endpoints in the Manufacturer REST API take an optional filter query parameter. It uses RSQL, a query language for REST filters.

curl -G https://m-api.eu.phas.io/api/manufacturer/v1/order \
  -H "Authorization: Bearer phasio_secret_token_here" \
  --data-urlencode "filter=updateDt=ge=2026-10-16T00:00:00"

Filter syntax

A condition is a field name, an operator and a value: status==ACTIVE. Field names are the property names in the endpoint's response.

OperatorMeaningExample
==equalsstatus==ACTIVE
!=does not equalstatus!=ACTIVE
=gt=greater thanprice=gt=10
=ge=greater than or equal toupdateDt=ge=2026-10-16T00:00:00
=lt=less thanprice=lt=100
=le=less than or equal toupdateDt=le=2026-10-31T23:59:59
=in=equals any value in the liststatus=in=(PAID,UNPAID)
=out=equals no value in the liststatus=out=(PAID,UNPAID)

Combine conditions with ; for AND and , for OR: status==ACTIVE;updateDt=ge=2026-10-16T00:00:00. Put a value that contains spaces or one of these characters in single or double quotes: name=='Sample Project'.

URL-encode the whole filter value. Most HTTP clients do this for you, as curl --data-urlencode does above.

Date-times

A date-time filter value is an ISO 8601 local date-time with no time zone: yyyy-MM-ddTHH:mm:ss, with optional fractional seconds. For example, 2026-10-16T00:00:00 or 2026-10-16T09:30:15.250.

A date-time without a zone is read as a time in the server's system time zone, which is UTC. Phasio does not convert it, so updateDt=ge=2026-10-16T00:00:00 means midnight UTC.

A date-time that carries a zone, such as 2026-10-16T00:00:00Z or 2026-10-16T00:00:00+02:00, is not accepted. Convert it to UTC and drop the zone before you send it.

Invalid filters

A filter the API cannot read returns 400 Bad Request, not a server error:

{
  "error": "INVALID_FILTER",
  "message": "A filter value is not valid for its field"
}

The message is The filter is not valid RSQL when the filter text itself cannot be parsed, for example an unbalanced bracket or quote. Every Manufacturer API list endpoint that takes a filter answers this way.

Last updated on

On this page