Pipelines and stages
Returns the agency’s pipelines and the stages inside each one. Use the stage uid when you filter or move a deal.
A pipeline is a funnel (Sales, Rentals, Prospects). A stage is a column inside that funnel. List pipelines first, then list stages with the pipeline uid. The list of pipelines does not embed its stages.
List pipelines
https://secure.alterestate.com/api/v1/deals/pipeline/Authentication
Send Authorization: Token your_api_key_here. Account token. Keep it on your server.
Query parameters
pipe_typestring- deals, prospects, won, accounting or properties. Omit it to return every type.Example:
deals is_activeboolean- true returns only active pipelines.Example:
true
Example request
curl --request GET \
--url 'https://secure.alterestate.com/api/v1/deals/pipeline/?pipe_type=deals' \
--header 'Authorization: Token your_api_key_here' \
--header 'Accept: application/json'Example response
[
{
"id": 12,
"uid": "PIPE01SALE",
"name": "Sales",
"pipe_type": "deals",
"default": true,
"is_active": true,
"totalDeals": 42
}
]List stages
https://secure.alterestate.com/api/v1/deals/stages/Authentication
Send Authorization: Token your_api_key_here. Account token. Keep it on your server.
Query parameters
pipelinestring- Pipeline uid from List pipelines. Returns that funnel’s stages, active ones only, in column order.Example:
PIPE01SALE pipe_typestring- deals, prospects, won, accounting or properties. Use it instead of pipeline to list stages across funnels of that type.Example:
deals
Example request
curl --request GET \
--url 'https://secure.alterestate.com/api/v1/deals/stages/?pipeline=PIPE01SALE' \
--header 'Authorization: Token your_api_key_here' \
--header 'Accept: application/json'Example response
[
{
"uid": "STGNEW001",
"name": "New",
"order": 0,
"pipeline": "PIPE01SALE",
"pipeline_string": "Sales",
"is_active": true,
"closing_probability": 10,
"conversion_rate": "0.00",
"max_days_on_stage": null,
"deals_count": 18
},
{
"uid": "STGVISIT01",
"name": "Showing",
"order": 2,
"pipeline": "PIPE01SALE",
"pipeline_string": "Sales",
"is_active": true,
"closing_probability": 40,
"conversion_rate": "0.00",
"max_days_on_stage": 14,
"deals_count": 7
}
]Retrieve a pipeline with its stages
https://secure.alterestate.com/api/v1/deals/funnels/{uid}/Authentication
Send Authorization: Token your_api_key_here. Account token. Keep it on your server.
Path parameters
uidstringrequired- Pipeline uid.Example:
PIPE01SALE
Example request
curl --request GET \
--url 'https://secure.alterestate.com/api/v1/deals/funnels/PIPE01SALE/' \
--header 'Authorization: Token your_api_key_here' \
--header 'Accept: application/json'Example response
{
"id": 12,
"uid": "PIPE01SALE",
"name": "Sales",
"pipe_type": "deals",
"default": true,
"pipeline": [
{
"uid": "STGNEW001",
"name": "New",
"order": 0,
"is_active": true,
"closing_probability": 10,
"deals": []
},
{
"uid": "STGVISIT01",
"name": "Showing",
"order": 2,
"is_active": true,
"closing_probability": 40,
"deals": []
}
]
}{
"detail": "Not found."
}How the three calls fit together
- List pipelines returns one object per funnel. totalDeals is the number of non-prospect deals on that pipeline.
- List stages is the call to use before you filter or move a deal. Pass pipeline={uid}. order is the column order, starting at 0.
- Retrieve a pipeline with its stages returns the same funnel in one response. The stages array is named pipeline. deals on each stage is always empty; load deals with List deals and stage={uid}.
pipe_type
| Value | Funnel |
|---|---|
| deals | Sales pipeline. This is the one List deals uses. |
| prospects | Prospect statuses. |
| won | Stages after a deal is won. |
| accounting | Accounting statuses on a closing sheet. |
| properties | Property pipeline. |
Status codes
| Status | Meaning |
|---|---|
| 200 | The request succeeded. |
| 400 | A parameter or the body is invalid. The response names the field. |
| 401 | The token is missing, invalid, or the user cannot open this deal. |
| 404 | The resource or route does not exist. |
| 429 | Too many requests. Wait and retry. |
| 500 | Server error while processing the request. |
Frequently asked questions
Does the pipeline list include stages?
No. GET /api/v1/deals/pipeline/ returns funnels only. GET /api/v1/deals/stages/?pipeline={uid} returns their stages, or GET /api/v1/deals/funnels/{uid}/ returns one funnel with stages nested under pipeline.
Which uid do I send when I edit a deal’s stage?
The stage uid from List stages or from the nested pipeline array. The stage has to belong to the deal’s current pipeline.
Last updated . Questions? Emailengineering@alterestate.com.