filter_parties
Filter parties by date ranges, tags, and custom fields using structured conditions. Identify recent clients, newly added parties, or tagged contacts without ad-hoc sort.
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 |
|---|---|---|---|
| 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). | |
| embed | No | Comma-separated embeds, e.g. 'tags,fields' | |
| page | No | ||
| perPage | No |