Skip to main content

Endpoints

POST /deals/search takes the same structured filter body as people search: operators equals | not_equals | contains | gt | gte | lt | lte | is_null, combinators and | or, custom attributes via custom_attributes.<key>. Filterable fields: id, name, stage, value_cents, currency, primary_company_id, primary_person_id, created_at, updated_at, closed_at. Pass expand (e.g. "primary_company,primary_person") and sort in the body.

Fields

Create

value_cents is a string in JSON because Postgres bigint exceeds JavaScript’s Number.MAX_SAFE_INTEGER. Parse it client-side with BigInt(deal.value_cents) if you need to do arithmetic.

Expand both relations

The response inlines primary_company and primary_person using the same serializers as /companies/:id and /people/:id.