---
title: "Get Deals"
method: GET
path: "/crm/deals"
tags: ["CRM Service Calls"]
---

# Get Deals

`GET /crm/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

- `match_filter_dict` string
- `sort_dict` string
- `page_size` integer
- `start_date` string, nullable — Start of date range in ISO 8601 format (e.g. 2026-03-22T00:00:00Z or 2026-03-22). UTC.
- `end_date` string, nullable — End of date range in ISO 8601 format (e.g. 2026-03-29T23:59:59Z or 2026-03-29). UTC.

## Response `200`

Successful Response

- DealResponse[]
  - `id` string, required
  - `name` string, required
  - `stage` string, required
  - `marketing_source` string, nullable
  - `agent_name` string, nullable
  - `agent_email` string, nullable
  - `agent_phone` string, nullable
  - `contact_name` string, nullable
  - `contact_email` string, nullable
  - `contact_phone` string, nullable
  - `account_name` string, nullable
  - `account_email` string, nullable
  - `product_dict_list` unknown[], nullable
    - unknown
  - `value_of_sale` string, nullable
  - `estimated_value_of_sale` string, nullable
  - `created_date` string, nullable
  - `updated_date` string, nullable
  - `expected_close_date` string, nullable
  - `close_date` string, nullable
  - `renewal_date` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/ambivo/apis/ambivo-api.md) · [All operations](https://skmtc.net/ambivo/apis/ambivo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ambivo/ambivo-api/revisions/165a6d16a9a0/schema)
