Filtering

You can filter the output of Oneflow API calls to many of our list endpoints based on a specific filter by providing filter[attribute-name]=attribute-value as a query parameter with your request.

📘

Notes:

The filter[attribute-name] parameter is optional. If not specified, the system will return the result without any filtering.

If more than one filter parameter is specified, the object is only returned if it matches all specified filters.

To find out if an endpoint supports filtering, read the API Reference to see if the endpoint accepts a filter query parameter.

🚧

Note:

You cannot specify the same filter option multiple times; however, some filter parameters accept a comma-separated list of values. Objects match the filter parameter if they match at least one of the values in the list.

Filter parameters that support multiple values are listed in the API reference for each endpoint.

Here is an example of a filter parameter with several values:

?filter[name]=hello%20world&filter[states]=signed,pending

The example above can be roughly translated as:

name == 'hello world' AND (state == 'signed' OR state == 'pending').

📘

Note:

Make sure to URL encode values that contain URL control characters or Unicode characters.

Filter by datetime

When specifying the datetime field as your filter parameter, you need to provide a lower or upper limit range of dates to filter or both of them in the following format: <from>|<to>, where both from and to are string(datetime) values separated by a pipe character.

To specify only a lower limit, use the following format: <from>|, only an upper limit: |<to>.

📘

Note:

If both from and to parameters are specified, the system will return only objects within this range.

Examples

Below are filtering examples for endpoints that support filtering:

Endpoint

Examples

contracts

?filter[states]=signed
?filter[published_time]=|2021-07-19T11:32:40%2B00:00

Note: The + sign is URL encoded as %2B.

?filter[query]=God%20kv%C3%A4ll

Note: The space and ä (Unicode character) are encoded.


Did this page help you?