v1

latestOpenAPI 3.1.02026-08-069158174.8 KB
CRM Service Calls

Get 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).

get/crm/deals

Query parameters

match_filter_dictstring
sort_dictstring
page_sizeinteger
start_datestring nullable

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_datestring nullable

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

idstring required
namestring required
stagestring required
marketing_sourcestring nullable
agent_namestring nullable
agent_emailstring nullable
agent_phonestring nullable
contact_namestring nullable
contact_emailstring nullable
contact_phonestring nullable
account_namestring nullable
account_emailstring nullable
value_of_salestring nullable
estimated_value_of_salestring nullable
created_datestring nullable
updated_datestring nullable
expected_close_datestring nullable
close_datestring nullable
renewal_datestring nullable