Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/opportunities/ | List opportunities |
POST | /api/opportunities/ | Create an opportunity |
GET | /api/opportunities/{id}/ | Get an opportunity |
PATCH | /api/opportunities/{id}/ | Update an opportunity |
DELETE | /api/opportunities/{id}/ | Delete an opportunity |
List Opportunities
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number |
limit | integer | Results per page (max: 100) |
stage | string | Filter by pipeline stage |
accountId | string | Filter by account |
assignedTo | string | Filter by assigned user ID |
closeDateAfter | ISO8601 | Filter by expected close date |
closeDateBefore | ISO8601 | Filter by expected close date |
valueMin | number | Filter by minimum deal value |
valueMax | number | Filter by maximum deal value |
search | string | Search by opportunity name |
Create an Opportunity
name, accountId
Response: 201 Created
Get an Opportunity
Update an Opportunity
200 OK with the updated opportunity object.
Delete an Opportunity
204 No Content
Pipeline Stage Values
| Value | Label |
|---|---|
prospecting | Prospecting |
qualification | Qualification |
needs_analysis | Needs Analysis |
proposal | Proposal |
negotiation | Negotiation |
closed_won | Closed Won |
closed_lost | Closed Lost |
