List rotten deals
Deals that are past the staling age of their pipeline.
GET https://cotlet.dev/api/v1/freshsales/rotten-deals
read
Returns the deals Freshsales shows under Show only rotten Deals, with their age in days and how many days they are past the staling age. That age is set per pipeline by an admin under Deals go stale after, and it counts from the day the deal was created, not from its last activity. The call fails on the Free plan, where Freshsales has no rotten deals.
Parameters
| Name | Type | Description |
|---|---|---|
| pipeline string | string | Pipeline name from list_pipelines. Default: every pipeline you can see. |
| cursor string | string | next_cursor of the previous page. |
Request
curl https://cotlet.dev/api/v1/freshsales/rotten-deals \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("freshsales", "list_rotten_deals") const result = await cotlet.call('freshsales', 'list_rotten_deals'); cotlet call freshsales list_rotten_deals Example response
{
"deals": [
{
"deal_id": 7000388,
"name": "Annual support plan",
"amount": 12500,
"stage": "Follow-up",
"pipeline": "Sales pipeline",
"owner": "Dana Reyes",
"age_days": 41,
"days_past_staling_age": 11
},
{
"deal_id": 7000377,
"name": "Onboarding package",
"amount": 2200,
"stage": "New",
"pipeline": "Sales pipeline",
"owner": "Dana Reyes",
"age_days": 33,
"days_past_staling_age": 3
}
],
"next_cursor": null
}