Filtering

When requesting an endpoint that returns a collection, there may be required and/or optional filter arguments. These arguments are provided as part of the query string, for example listing profiles within your application would use the URL https://api.opentransact.com/v1/profiles?filter[application-id]=APPLICATION_ID where APPLICATION_ID is the UUID of your application.

Filtering by Timestamps

Filtering by created_at Timestamps using the created-between filter

For endpoints that support filtering by timestamps, you can pass a start and finish query paramter in order to find records that were created between two timestamps.

To filter for records by their created_at value, use the following parameters: filter[created-between][start]=2021-08-11T04:38:14Z&filter[created-between][finish]=2021-08-11T04:48:30Z

Timestamps should be in UTC timezone and ISO-8601 format, ex: "2021-08-11T04:38:14Z"

Filtering by updated_at Timestamps using the updated-between filter

For endpoints that support filtering by timestamps, you can pass a start and finish query paramter in order to find records that were updated between two timestamps.

To filter for records by their updated_at value, use the following parameters: filter[updated-between][start]=2021-08-11T04:38:14Z&filter[updated-between][finish]=2021-08-11T04:48:30Z

Timestamps should be in UTC timezone and ISO-8601 format, ex: "2021-08-11T04:38:14Z"

Filtering by Metadata

For endpoints that support filtering metadata, you can currently find exact matches for top-level metadata values currently.

This means that if you set a metadata value like:

{"order-id": "1234"}

You can currently search for exact matching items with filter[metadata][order-id]=1234

It is not yet possible to search for items where you have sent nested JSON values like:

{
    "order": {
        "id: "1234"
    }
}

Please let us know if you have interest in support for searching nested and/or non-exact matches in metadata.