跳到主要内容

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;
}