Basker Docs

Filtering

Filter standard fields and configured attributes on collection endpoints

List endpoints accept filters using nested query-string brackets. Use where for standard fields and attributeWhere for configured custom attributes.

Filter a standard field

Pass the field name, operator, and value under where:

curl -s -G \
  -H "Authorization: users API-Key YOUR_API_KEY" \
  --data-urlencode 'where[title][equals]=Moonlit Echoes' \
  "https://api.basker.app/partners/2026-02/remarkable-theatre/events"

Common operators include:

OperatorExample
equalswhere[title][equals]=Winter Light
not_equalswhere[status][not_equals]=cancelled
inwhere[status][in]=published,draft
containswhere[title][contains]=opera
likewhere[title][like]=opera
existswhere[image][exists]=true
greater_thanwhere[startDate][greater_than]=2026-10-01T00:00:00.000Z
greater_than_equalwhere[startDate][greater_than_equal]=2026-10-01T00:00:00.000Z
less_thanwhere[endDate][less_than]=2026-11-01T00:00:00.000Z
less_than_equalwhere[endDate][less_than_equal]=2026-10-31T23:59:59.999Z

The useful operators depend on the field type. Use field discovery to inspect a collection before constructing dynamic filters.

Combine conditions

Use and when every condition must match:

curl -s -G \
  -H "Authorization: users API-Key YOUR_API_KEY" \
  --data-urlencode 'where[and][0][startDate][greater_than_equal]=2026-10-01T00:00:00.000Z' \
  --data-urlencode 'where[and][1][venue][equals]=000000000000000000000003' \
  "https://api.basker.app/partners/2026-02/remarkable-theatre/events"

Use or when any condition may match:

curl -s -G \
  -H "Authorization: users API-Key YOUR_API_KEY" \
  --data-urlencode 'where[or][0][title][contains]=Moonlit' \
  --data-urlencode 'where[or][1][title][contains]=Winter Light' \
  "https://api.basker.app/partners/2026-02/remarkable-theatre/events"

Relationship fields can be filtered by the related record ID:

?where[season][equals]=000000000000000000000004

Filter configured attributes

For a collection that supports configured custom attributes, prefix the public field key with custom.:

curl -s -G \
  -H "Authorization: users API-Key YOUR_API_KEY" \
  --data-urlencode 'attributeWhere[custom.import_id][equals]=EVT-1042' \
  "https://api.basker.app/partners/2026-02/remarkable-theatre/events"

Configured attributes support equals, not_equals, in, contains, like, exists, gt, gte, lt, and lte. You can send both where and attributeWhere; the record must satisfy both.

Tenant scoping

Do not add a tenant condition to ordinary requests. Every query is automatically constrained to the resolved tenant. For a tenant group, shared-collection reads are constrained to the group and can be narrowed to one member with where[tenant][equals]=TENANT_ID.

Encoding and troubleshooting

Use your HTTP client's query-parameter support instead of assembling encoded URLs by hand. In curl, --data-urlencode safely handles spaces and punctuation.

A JSON string assigned directly to where is not parsed as a filter object. If a request returns no records or rejects the filter, check the field name, bracket structure, operator, and encoded value, then remove conditions one at a time.

On this page