ื“ืœื’ ืœืชื•ื›ืŸ ื”ืจืืฉื™

Deal Endpoints

Manage sales deals within pipeline stages.

Base Pathโ€‹

/api/deals

Endpointsโ€‹

List Dealsโ€‹

GET /api/deals
Authorization: Bearer {token}

Query Parameters:

ParameterTypeDescription
stageIdUUIDFilter by stage
pagenumberPage number
limitnumberItems per page
relationsstringInclude relations

Get Deal by IDโ€‹

GET /api/deals/:id
Authorization: Bearer {token}

Create Dealโ€‹

POST /api/deals
Authorization: Bearer {token}

Request Body:

{
"title": "Enterprise License โ€” Acme Corp",
"probability": 75,
"stageId": "stage-uuid",
"clientId": "contact-uuid"
}

Update Dealโ€‹

PUT /api/deals/:id
Authorization: Bearer {token}

Delete Dealโ€‹

DELETE /api/deals/:id
Authorization: Bearer {token}

Data Modelโ€‹

interface IDeal {
id: string;
title: string;
probability?: number;
stageId: string;
stage?: IPipelineStage;
clientId?: string;
client?: IOrganizationContact;
createdByUserId?: string;
organizationId: string;
tenantId: string;
}