filter_parties
Retrieve parties by structured conditions—date ranges, tags, and fields—to answer questions like 'most recent client', 'added this week', or 'tagged VIP'.
Instructions
Filter parties by structured conditions (date ranges, tags, fields). Use this — not search_parties — for questions like 'most recent client', 'parties added this week', 'parties tagged VIP'. Capsule's API does not support ad-hoc sort, but for 'most recent X' you can filter by a date field (e.g. {field: 'addedOn', operator: 'is within last', value: 30}) and pick the highest-id row from the result — Capsule IDs are monotonic, so newest id = newest record.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| embed | No | Comma-separated embeds. Valid tokens: tags, fields, organisation, missingImportantFields. | |
| perPage | No | ||
| conditions | Yes | Array of filter conditions. All conditions are ANDed together. To get newest records, use a date condition like {field: 'addedOn', operator: 'is within last', value: 7} and pick the highest-id row from the result (Capsule IDs are monotonic). |