GET /api/Gift/list with query-parameter filters, and a more powerful POST /api/Gift/query with a structured request body. This workflow page covers both and shows when to use each.
For the resource-level reference of the Gift record itself, see Gifts.
When to use this workflow
For the underlying mechanics of both endpoint patterns, see Pagination and Filtering.
Pattern 1: simple list with GET /api/Gift/list
The simplest read. Documented parameters:
Recent gifts for a dashboard
cURL
When IncludeDetails is worth the cost
IncludeDetails=true adds the Donor record, gateway details, segment context, and other related entities to each item in the response. Useful when:
- You’re displaying gifts with donor info in a single UI view (avoids a follow-up lookup per gift).
- You’re exporting gifts to an external system that needs the full context per record.
- You only need summary fields (amount, date, donor ID) for aggregation.
- You’re streaming large result sets — the extra payload per record adds up.
IncludeDetails=false and fetch related records only when needed.
Sort fields available
The Gift/list endpoint documents five sortable fields:
For pagination through large result sets, sort by
id — it’s the only field guaranteed to be stable across pages even if records are inserted or updated concurrently.
Pattern 2: structured filter with POST /api/Gift/query
For anything beyond free-text search, use the structured query body. The body fields:
Common filter scenarios
Gifts within a date range
cURL
The
operator integers (10, 11 used here as placeholders for “greater than or equal” and “less than or equal”) and the conjunct integer (0 for AND) need to be discovered via GET /api/Query/options/{queryType}. The spec doesn’t label the QueryOperator enum’s 30 integer values or the ConjunctOperator enum’s 2 values. See Pagination and Filtering: Discovering query options.Gifts above a certain amount
cURL
Gifts for a specific campaign
cURL
campaignId here) may vary — confirm via GET /api/Query/options/{queryType} for the Gift query type.
Gifts in a non-final status
cURL
Combining filters with AND / OR
A common combined query: recent gifts above a threshold from a specific Campaign:conjunct integer (0 or 1, mapping to AND or OR — confirm via discovery). For complex multi-criteria filters, prototype against the live API to confirm the resulting logic matches your intent.
Reducing payload size
For bulk reads where you don’t need every field,selectedColumns reduces the per-item payload:
cURL
id, amount, date, donorId, and status — much smaller per record than the default full payload. For workflows that aggregate millions of gifts, this can be the difference between a 10-minute query and a one-hour query.
The set of selectable columns is discovered via GET /api/Query/options/{queryType}.
Iteration patterns for bulk reads
Standard skip/take loop
For result sets in the hundreds or low thousands:JavaScript
ID-cursor iteration for very large sets
For result sets in the tens of thousands or larger, theskip-based loop becomes inefficient at high offsets and is vulnerable to inserts shifting the page boundaries. ID-cursor iteration handles both:
JavaScript
GT_OPERATOR constant comes from discovery via GET /api/Query/options/{queryType} at integration startup. See Pagination and Filtering: ID-cursor iteration.
A common pattern: incremental sync
For partner integrations that periodically pull new gifts since the last run:JavaScript
- Advance the checkpoint to the last successful record’s timestamp, not to the current time. If the sync run crashes mid-stream, the next run resumes from the last actually-processed record.
- Sort by
idascending within the cursor loop so each page’s last record is the highest ID seen so far. - Skip an explicit total check — the cursor loop naturally terminates when a page is empty.
Performance considerations
See Rate Limits for the broader rate-limit-aware design pattern.
Where to go next
Query Donors by Filters
The Donor-specific version of these patterns.
Pagination and Filtering
The reference-level documentation of both endpoint surfaces and the integer-enum discovery patterns.
Gifts
The Gift resource reference — the fields you’re querying and selecting.
Reconcile with CRM+
Apply these query patterns to the cross-product reconciliation workflow.