Pipeline Stages
The stages of a pipeline, with the number and the value of the opportunities currently in each one. Both endpoints require pipelines:read.
Stages are also embedded in List pipelines and Get pipeline; use these two when you need the totals per stage, or to resolve a single stage_id.
List stages
GET/external/v1/pipelines/:id/stagesOrdered stages of the pipeline. opportunities_count and total_value are the same numbers as the columns of the CRM Kanban: the cards that are in the stage now, whatever their state. For the active funnel per stage (open cards only, with the lost count) use the Funnel report.
curl --request GET \
--url "https://app.getraze.com/external/v1/pipelines/pipe_01/stages" \
--header "X-API-Key: YOUR_API_KEY"{
"success": true,
"data": [
{
"id": "stg_new",
"pipeline_id": "pipe_01",
"name": "New",
"color": "gray",
"position": 0,
"is_win_stage": false,
"is_loss_stage": false,
"opportunities_count": 12,
"total_value": 48000
},
{
"id": "stg_won",
"pipeline_id": "pipe_01",
"name": "Won",
"color": "green",
"position": 5,
"is_win_stage": true,
"is_loss_stage": false,
"opportunities_count": 3,
"total_value": 27500
}
]
}| Field | Type | Description |
|---|---|---|
id | string | Stage identifier (the stage_id of opportunities) |
pipeline_id | string | Pipeline the stage belongs to |
name | string | Stage name |
color | string | UI presentation hint |
position | integer | Order within the pipeline; opportunities created without stage_id go to the first one |
is_win_stage | boolean | Moving a card here marks it as won (won_at) |
is_loss_stage | boolean | Moving a card here marks it as lost (lost_at) |
opportunities_count | integer | Opportunities currently in the stage |
total_value | number | Sum of value of those opportunities (mixed currencies are summed as-is) |
Get stage
GET/external/v1/pipelines/:id/stages/:stageIdOne stage of the pipeline, with pipeline_name and the same totals. Use it to resolve a stage_id returned by the opportunity history without downloading every pipeline. Like Get pipeline, it resolves stages of inactive or hidden pipelines.
curl --request GET \
--url "https://app.getraze.com/external/v1/pipelines/pipe_01/stages/stg_won" \
--header "X-API-Key: YOUR_API_KEY"{
"success": true,
"data": {
"id": "stg_won",
"pipeline_id": "pipe_01",
"pipeline_name": "Sales",
"name": "Won",
"color": "green",
"position": 5,
"is_win_stage": true,
"is_loss_stage": false,
"opportunities_count": 3,
"total_value": 27500
}
}Errors
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | id or stageId is not a UUID |
| 403 | INSUFFICIENT_PERMISSIONS | The API key lacks pipelines:read |
| 404 | NOT_FOUND | No pipeline with this id in your account, or the stage does not belong to this pipeline |