Pipeline
The pipeline defines the stages your deals move through.
List Stages
GET /crm/pipelinejson
[
{
"id": 1,
"name": "Prospect",
"position": 0,
"color": "#6366f1",
"is_won": false,
"is_lost": false,
"probability": 10,
"deals_count": 12
},
{
"id": 2,
"name": "Proposal",
"position": 1,
"color": "#f59e0b",
"is_won": false,
"is_lost": false,
"probability": 40,
"deals_count": 5
},
{
"id": 3,
"name": "Won",
"position": 4,
"color": "#22c55e",
"is_won": true,
"is_lost": false,
"probability": 100,
"deals_count": 28
}
]Create a Stage
POST /crm/pipelinejson
{
"name": "Negotiation",
"color": "#ef4444",
"position": 3,
"is_won": false,
"is_lost": false,
"probability": 70
}Reorder the Pipeline
POST /crm/pipeline/reorderjson
{
"stages": [1, 4, 2, 3, 5]
}Stages are repositioned in the order provided (index 0 = first position).
Delete a Stage
DELETE /crm/pipeline/{id}WARNING
Deletion fails with 422 if any deals are still in that stage. Move or delete the deals first.
Special Stages
Mark a stage as Won or Lost so that deals moved there are automatically flagged:
json
{
"name": "Deal Lost",
"is_lost": true,
"color": "#ef4444",
"probability": 0
}