Filter records

Last checked:

Each list operation takes one query parameter per filterable column, named after the column. The reference lists them for every screen, with their type. Filters combine: a record must match all of them.

How each kind of column matches

Column Parameter Matches
Text status=paid Records whose value contains the text, in any case
Number quantity=3 Records equal to the number
Yes / no is_active=true true or false
A link to another record (an id) customer_id=64b000000000000000000001 That id exactly
Date created_at=2026-01-15 Records on that day
Date range created_at__from=2026-01-01&created_at__to=2026-01-31 On or after / on or before those days (each end is optional)

For several values, send a JSON list or repeat the parameter: status=["paid","packed"] or status=paid&status=packed. A record equal to any of them matches.

Days are counted in the business’s time zone when it has one, else in the time zone named by an x-time-zone header you send, else in UTC.

Remember to URL-encode values, for example a JSON list.

curl

curl -G "$API_BASE/page/orders/records" \
  -H "Authorization: Bearer $API_TOKEN" \
  --data-urlencode 'status=["paid","packed"]' \
  --data-urlencode 'created_at__from=2026-01-01'

Node.js

const params = new URLSearchParams({ status: JSON.stringify(["paid", "packed"]), created_at__from: "2026-01-01" });
const response = await fetch(`${process.env.API_BASE}/page/orders/records?${params}`, {
  headers: { Authorization: `Bearer ${process.env.API_TOKEN}` },
});

Python

import json
import os
import requests

response = requests.get(
    f"{os.environ['API_BASE']}/page/orders/records",
    params={"status": json.dumps(["paid", "packed"]), "created_at__from": "2026-01-01"},
    headers={"Authorization": f"Bearer {os.environ['API_TOKEN']}"},
    timeout=30,
)

PHP

<?php
$query = http_build_query(['status' => json_encode(['paid', 'packed']), 'created_at__from' => '2026-01-01']);
$ch = curl_init(getenv('API_BASE') . '/page/orders/records?' . $query);
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('API_TOKEN')],
    CURLOPT_RETURNTRANSFER => true,
]);

Named filters

Some screens also take named filters, worked out by the server (for example “due this week”). The reference lists each one with its values. When one applies, the answer adds applied_filters: [{ "param", "value", "label" }].

What filters don’t do

  • There is no free-text search across columns. Filter a text column instead.
  • A filter or sort on a column the token’s owner may not see is ignored.