Get deals timeline

GET {{baseUrl}}/deals/timeline?start_date=<date>&interval=<string>&amount=<integer>&field_key=<string>&user_id=<integer>&pipeline_id=<integer>&filter_id=<integer>&exclude_deals=<number>&totals_convert_currency=<string>

Returns open and won deals, grouped by a defined interval of time set in a date-type dealField (field_key) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given field_key.

Request Params

KeyDatatypeRequiredDescription
start_datestring(Required) The date when the first interval starts. Format: YYYY-MM-DD.
intervalstring(Required) The type of the interval<table><tr><th>Value</th><th>Description</th></tr><tr><td>day</td><td>Day</td></tr><tr><td>week</td><td>A full week (7 days) starting from start_date</td></tr><tr><td>month</td><td>A full month (depending on the number of days in given month) starting from start_date</td></tr><tr><td>quarter</td><td>A full quarter (3 months) starting from start_date</td></tr></table>
amountstring(Required) The number of given intervals, starting from start_date, to fetch. E.g. 3 (months).
field_keystring(Required) The date field key which deals will be retrieved from
user_idstringIf supplied, only deals matching the given user will be returned
pipeline_idstringIf supplied, only deals matching the given pipeline will be returned
filter_idstringIf supplied, only deals matching the given filter will be returned
exclude_dealsstringWhether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned.
totals_convert_currencystringThe 3-letter currency code of any of the supported currencies. When supplied, totals_converted is returned per each interval which contains the currency-converted total amounts in the given currency. You may also set this parameter to default_currency in which case the user's default currency is used.

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;success&quot;:true,&quot;data&quot;:{&quot;period_start&quot;:&quot;2019-12-01 00:00:00&quot;,&quot;period_end&quot;:&quot;2019-12-31 23:59:59&quot;,&quot;deals&quot;:[{&quot;id&quot;:1,&quot;creator_user_id&quot;:8877,&quot;user_id&quot;:8877,&quot;person_id&quot;:1101,&quot;org_id&quot;:5,&quot;stage_id&quot;:2,&quot;title&quot;:&quot;Deal One&quot;,&quot;value&quot;:5000,&quot;currency&quot;:&quot;EUR&quot;,&quot;add_time&quot;:&quot;2019-05-29 04:21:51&quot;,&quot;update_time&quot;:&quot;2019-11-28 16:19:50&quot;,&quot;stage_change_time&quot;:&quot;2019-11-28 15:41:22&quot;,&quot;active&quot;:true,&quot;deleted&quot;:false,&quot;status&quot;:&quot;open&quot;,&quot;probability&quot;:null,&quot;next_activity_date&quot;:&quot;2019-11-29&quot;,&quot;next_activity_time&quot;:&quot;11:30:00&quot;,&quot;next_activity_id&quot;:128,&quot;last_activity_id&quot;:null,&quot;last_activity_date&quot;:null,&quot;lost_reason&quot;:null,&quot;visible_to&quot;:&quot;1&quot;,&quot;close_time&quot;:null,&quot;pipeline_id&quot;:1,&quot;won_time&quot;:&quot;2019-11-27 11:40:36&quot;,&quot;first_won_time&quot;:&quot;2019-11-27 11:40:36&quot;,&quot;lost_time&quot;:&quot;&quot;,&quot;products_count&quot;:0,&quot;files_count&quot;:0,&quot;notes_count&quot;:2,&quot;followers_count&quot;:0,&quot;email_messages_count&quot;:4,&quot;activities_count&quot;:1,&quot;done_activities_count&quot;:0,&quot;undone_activities_count&quot;:1,&quot;participants_count&quot;:1,&quot;expected_close_date&quot;:&quot;2019-06-29&quot;,&quot;last_incoming_mail_time&quot;:&quot;2019-05-29 18:21:42&quot;,&quot;last_outgoing_mail_time&quot;:&quot;2019-05-30 03:45:35&quot;,&quot;label&quot;:&quot;11&quot;,&quot;stage_order_nr&quot;:2,&quot;person_name&quot;:&quot;Person&quot;,&quot;org_name&quot;:&quot;Organization&quot;,&quot;next_activity_subject&quot;:&quot;Call&quot;,&quot;next_activity_type&quot;:&quot;call&quot;,&quot;next_activity_duration&quot;:&quot;00:30:00&quot;,&quot;next_activity_note&quot;:&quot;Note content&quot;,&quot;formatted_value&quot;:&quot;€5,000&quot;,&quot;weighted_value&quot;:5000,&quot;formatted_weighted_value&quot;:&quot;€5,000&quot;,&quot;weighted_value_currency&quot;:&quot;EUR&quot;,&quot;rotten_time&quot;:null,&quot;owner_name&quot;:&quot;Creator&quot;,&quot;cc_email&quot;:&quot;company+deal1@pipedrivemail.com&quot;,&quot;org_hidden&quot;:false,&quot;person_hidden&quot;:false,&quot;acv&quot;:null,&quot;arr&quot;:null,&quot;mrr&quot;:null,&quot;acv_currency&quot;:null,&quot;arr_currency&quot;:null,&quot;mrr_currency&quot;:null}],&quot;totals&quot;:{&quot;count&quot;:2,&quot;values&quot;:{&quot;EUR&quot;:100,&quot;USD&quot;:220},&quot;weighted_values&quot;:{&quot;EUR&quot;:100,&quot;USD&quot;:2200},&quot;open_count&quot;:1,&quot;open_values&quot;:{&quot;EUR&quot;:100},&quot;weighted_open_values&quot;:{&quot;EUR&quot;:100},&quot;won_count&quot;:1,&quot;won_values&quot;:{&quot;USD&quot;:2200}}}}