Deals

List Deals

List all deals org-wide with optional filters and pagination.

get/deals

Request

  • Base URL: https://be.graph8.com/api/v1
  • URL: https://be.graph8.com/api/v1/deals
  • Auth: HTTP bearer

Query parameters

pageinteger

Page number

limitinteger

Items per page

stage_idstring nullable

Filter by stage ID

pipeline_idstring nullable

Filter by pipeline ID

searchstring nullable

Search by deal name

owner_idstring nullable

Filter by owner ID

owner_emailstring nullable

Filter by owner email

outcome'won' | 'lost' | 'open' nullable

Filter by deal outcome. A deal is won, lost, or open - exactly one. Prefer this over is_closed_won: the boolean's false branch means 'not won', which returns open AND unclassified deals alongside lost ones, and is the wrong cohort for closed-lost re-engagement.

is_closed_wonboolean nullable

LEGACY - prefer outcome=. Retained for backwards compatibility with existing consumers. true means won; false means NOT won (open, lost and unclassified deals), which is rarely what a caller intends.

last_activity_beforestring date-time nullable

Only deals last touched before this timestamp

stale_beforestring date-time nullable

Deals last touched before this timestamp OR never touched at all. Union of last_activity_before and the no-activity cohort - use this for 'my stale deals' (last_activity_before alone excludes deals with no recorded activity, since NULL is never earlier-than).

has_activityboolean nullable

Filter by whether the deal has recorded activity

has_contactboolean nullable

Filter by whether the deal has a route to any contact. false returns the orphaned-deal cohort: no cb_deal_contacts row AND no live primary contact (a primary_contact_id pointing at a soft-deleted or merged-away contact counts as no route). Same definition the Data Quality panel counts, so the two can never disagree.

close_afterstring date-time nullable

Only deals whose close_date is on/after this timestamp (inclusive lower bound). Pair with close_before for a period window, and with outcome=won for 'deals we closed-won in this period'. A period count needs BOTH a lower bound and the outcome join: close_before alone sums the entire deal history into every period. Deals with a NULL close_date are excluded (a deal with no close date is not closing in any window). A naive timestamp is treated as UTC.

close_beforestring date-time nullable

Only deals whose close_date is strictly before this timestamp (exclusive upper bound). The window is half-open [close_after, close_before) so adjacent periods never double-count a deal that closes exactly on a boundary. A naive timestamp is treated as UTC (the close_date column is timestamp without time zone).

Headers

Authorizationstring nullable
X-Target-Org-Idstring nullable

Response

Successful Response

Changes

No recorded changes to this operation across all 2 revisions of this API.