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