v1
latestOpenAPI 3.1.02026-08-069158174.8 KBGet Deals
Retrieve deals/opportunities with optional filtering, sorting, pagination, and date range.
Deals (also called opportunities) represent potential revenue. Without start_date/end_date, this endpoint does not apply a time filter — it returns all matching deals.
Time-based filtering (start_date / end_date):
Use start_date and end_date to filter deals by creation date (timestamp field). Both accept ISO 8601 UTC strings.
- Format: YYYY-MM-DDTHH:MM:SSZ (full) or YYYY-MM-DD (date only = midnight UTC)
- Both are optional — provide one or both to define the window.
- Do NOT pass date/timestamp fields inside match_filter_dict — use these parameters instead.
Example requests:
- All deals (no date filter): GET /deals
- Deals created in the last 7 days: GET /deals?start_date=2026-03-22T00:00:00Z&end_date=2026-03-29T23:59:59Z
- High-value deals created this month: GET /deals?start_date=2026-03-01&match_filter_dict={"value_of_sale": {"$gte": 10000}}
Other Query Parameters:
- match_filter_dict (optional): JSON-encoded MongoDB query for non-date fields. Filterable fields: stage, marketing_source, value_of_sale, estimated_value_of_sale, expected_close_date, close_date, account_id, contact_id.
- sort_dict (default: {"_id": -1}): JSON-encoded sort criteria.
- page_size (default: 50, max: 500): Number of records per page.
Response: Array of deal objects with id, name, stage, value_of_sale, marketing_source, agent info, contact/account info, product list, and key dates (created, updated, expected_close, close, renewal).
Query parameters
Start of date range in ISO 8601 format (e.g. 2026-03-22T00:00:00Z or 2026-03-22). UTC.
Start of date range in ISO 8601 format (e.g. 2026-03-22T00:00:00Z or 2026-03-22). UTC.
End of date range in ISO 8601 format (e.g. 2026-03-29T23:59:59Z or 2026-03-29). UTC.
End of date range in ISO 8601 format (e.g. 2026-03-29T23:59:59Z or 2026-03-29). UTC.
Response
Successful Response