Apply filters

United States
Canada
Europe
Latin America

You can filter collections with the filter query parameter that supports standard comparison operators, such as =, >=, and !=. You can specify multiple filter parameters by joining filter statements with an ampersand (&).

$ curl -s "https://apisandbox.dev.clover.com/v3/merchants/{mId}/orders?filter=clientCreatedTime>=[unix-time]&filter=clientCreatedTime<=[unix-time]" --header "Authorization: Bearer {API_Token}" | python -mjson.tool

To determine the parameters that can be filtered for a given method, see the API Reference. The filterable fields are also returned with the request in the X-Clover-Allowed-Filter-Fields header.

$ curl -s "https://apisandbox.dev.clover.com/v3/merchants/{mId}/orders?filter=total>1000&filter=payType!=FULL" --header "Authorization: Bearer {API_Token}" | python -mjson.tool

{
    "elements": [
        {
            "clientCreatedTime": 1401286267000,
            "createdTime": 1401286268000,
            "currency": "USD",
            "employee": {
                "id": "QT0DES4CXR572"
            },
            "groupLineItems": true,
            "href": "https://sandbox.dev.clover.com/v3/merchants/{mId}/orders/8WAD6KV8D90KR",
            "id": "8WAD6KV8D90KR",
            "isVat": false,
            "manualTransaction": false,
            "modifiedTime": 1401286463000,
            "payType": "SPLIT_CUSTOM",
            "state": "locked",
            "taxRemoved": false,
            "testMode": false,
            "total": 5293
        },
        {
            "clientCreatedTime": 1400106245000,
            "createdTime": 1400106245000,
            "currency": "USD",
            "employee": {
                "id": "QT0DES4CXR572"
            },
            "groupLineItems": true,
            "href": "https://sandbox.dev.clover.com/v3/merchants/{mId}/orders/0S0JJYG231462",
            "id": "0S0JJYG231462",
            "isVat": false,
            "manualTransaction": false,
            "modifiedTime": 1400106366000,
            "payType": "SPLIT_CUSTOM",
            "state": "locked",
            "taxRemoved": false,
            "testMode": false,
            "total": 2829
        }
    ],
    "href": "https://apisandbox.dev.clover.com/v3/merchants/{mId}/orders?filter=total%3E1000&filter=payType!%3DFULL&limit=100"
}