Skip to main content

Deals

Pipeline deals with forecast categories. Stages are stored lowercase (negotiation) and returned as display names (Negotiation).

All endpoints require a Bearer JWT in the Authorization header plus an X-Workspace-Id header selecting the workspace.

GET/api/dealsAuth required

List deals ordered by value. Stage accepts either the stored form (closed_won) or the display name.

Query Parameters

FieldTypeRequiredNote
stagestringNoStored or display stage name
ownerstringNo—
forecast_catstringNocommit | best | pipe | out | closed
limitnumberNoDefault 100, max 300

Response

[
  {
    "id": 7,
    "workspace_id": 1,
    "ref": "D-007",
    "title": "Enterprise plan",
    "company": "Acme Corp",
    "amount_cents": 12000000,
    "amount": "$120k",
    "stage": "Negotiation",
    "forecast_cat": "commit",
    "owner": "Jane",
    "close_label": "2026-04-30"
  }
]
GET/api/deals/forecastAuth required

Quarter forecast from live deals. Commit = proposal + negotiation at full value; best case adds discovery; pipeline = every open deal.

Query Parameters

FieldTypeRequiredNote
quota_centsnumberNoDefault 100000000 ($1M)
weightedbooleanNoCount deals at probability instead of full value

Response

{
  "quota_cents": 100000000,
  "weighted": false,
  "commit_cents": 12000000,
  "best_case_cents": 20000000,
  "pipeline_cents": 35000000,
  "coverage": 0.35,
  "deals": [ { "id": 7, "ref": "D-007", "category": "commit" } ]
}
GET/api/deals/pipelineAuth required

Pipeline board: one column per stage with its deals and column totals.

Response

[
  {
    "stage": "Negotiation",
    "count": 2,
    "total_cents": 17000000,
    "total": "$170k",
    "deals": [ { "id": 7, "ref": "D-007", "title": "Enterprise plan" } ]
  }
]
GET/api/deals/{deal_id}Auth required

Get a deal with its contact, pinned notes, and follow-up tasks.

Response

{
  "id": 7,
  "ref": "D-007",
  "title": "Enterprise plan",
  "company": "Acme Corp",
  "contact": { "id": 3, "name": "Jane Doe", "email": "jane@acme.com" },
  "amount_cents": 12000000,
  "stage": "Negotiation",
  "probability": 70,
  "forecast_cat": "commit",
  "notes": [ { "id": 1, "body": "Legal reviewing MSA" } ],
  "tasks": [ { "id": 2, "ref": "T-002", "title": "Send revised quote" } ]
}
POST/api/deals/{deal_id}/moveAuth required

Move a deal to a new stage. Accepts display (Closed Won) or stored (closed_won) form. Returns 422 for an unknown stage.

Request Body

FieldTypeRequiredNote
stagestringYeslead | qualified | discovery | proposal | negotiation | closed_won | closed_lost

Response

{
  "id": 7,
  "ref": "D-007",
  "stage": "Closed Won",
  "forecast_cat": "closed"
}
POST/api/deals/{deal_id}/categoryAuth required

Set an analyst forecast-category override for a deal. Returns 422 for an unknown category.

Request Body

FieldTypeRequiredNote
categorystringYescommit | best | pipe | out | closed

Response

{
  "id": 7,
  "ref": "D-007",
  "stage": "Discovery",
  "forecast_cat": "commit"
}