Pipeline & Deal Endpoints
Manage sales pipelines with multiple stages and deals that progress through the pipeline.
Base Pathsβ
| Resource | Path |
|---|---|
| Pipelines | /api/pipelines |
| Deals | /api/deals |
Pipeline Endpointsβ
List Pipelines (Paginated)β
GET /api/pipelines/pagination
Authorization: Bearer {token}
Find All Pipelinesβ
GET /api/pipelines
Authorization: Bearer {token}
Get Pipeline by IDβ
GET /api/pipelines/:id
Authorization: Bearer {token}
Get Pipeline Dealsβ
Retrieves all deals associated with a specific pipeline.
GET /api/pipelines/:pipelineId/deals
Authorization: Bearer {token}
Create Pipelineβ
POST /api/pipelines
Authorization: Bearer {token}
Content-Type: application/json
{
"name": "Enterprise Sales",
"description": "Pipeline for enterprise deals",
"organizationId": "uuid",
"stages": [
{ "name": "Prospecting", "index": 0 },
{ "name": "Qualification", "index": 1 },
{ "name": "Proposal", "index": 2 },
{ "name": "Negotiation", "index": 3 },
{ "name": "Closed Won", "index": 4 }
]
}
Update Pipelineβ
PUT /api/pipelines/:id
Authorization: Bearer {token}
Content-Type: application/json
{
"name": "Updated Pipeline Name"
}
Delete Pipelineβ
DELETE /api/pipelines/:id
Authorization: Bearer {token}
Deal Endpointsβ
List Dealsβ
GET /api/deals
Authorization: Bearer {token}
Get Deal by IDβ
GET /api/deals/:id
Authorization: Bearer {token}
Create Dealβ
POST /api/deals
Authorization: Bearer {token}
Content-Type: application/json
{
"title": "Acme Corp Enterprise License",
"stageId": "stage-uuid",
"clientId": "contact-uuid",
"probability": 75
}
Update Dealβ
PUT /api/deals/:id
Authorization: Bearer {token}
Content-Type: application/json
{
"stageId": "next-stage-uuid",
"probability": 90
}
Delete Dealβ
DELETE /api/deals/:id
Authorization: Bearer {token}
Data Modelβ
interface IPipeline {
id: string;
name: string;
description?: string;
isActive: boolean;
stages?: IPipelineStage[];
organizationId: string;
tenantId: string;
}
interface IPipelineStage {
id: string;
name: string;
index: number;
description?: string;
pipelineId: string;
deals?: IDeal[];
}
interface IDeal {
id: string;
title: string;
probability?: number;
stageId: string;
stage?: IPipelineStage;
clientId?: string;
client?: IOrganizationContact;
createdByUserId?: string;
tenantId: string;
}
Pipeline Flowβ
Permissionsβ
| Action | Required Permission |
|---|---|
| View pipelines | VIEW_SALES_PIPELINES |
| Create/edit/delete | EDIT_SALES_PIPELINES |
Related Pagesβ
- Sales Pipelines Feature β feature guide
- Contact Endpoints β CRM contacts
- CRM Overview β CRM module