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
Key | Datatype | Required | Description |
---|---|---|---|
start_date | string | (Required) The date when the first interval starts. Format: YYYY-MM-DD. | |
interval | string | (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> | |
amount | string | (Required) The number of given intervals, starting from start_date , to fetch. E.g. 3 (months). | |
field_key | string | (Required) The date field key which deals will be retrieved from | |
user_id | string | If supplied, only deals matching the given user will be returned | |
pipeline_id | string | If supplied, only deals matching the given pipeline will be returned | |
filter_id | string | If supplied, only deals matching the given filter will be returned | |
exclude_deals | string | Whether 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_currency | string | The 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
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"success":true,"data":{"period_start":"2019-12-01 00:00:00","period_end":"2019-12-31 23:59:59","deals":[{"id":1,"creator_user_id":8877,"user_id":8877,"person_id":1101,"org_id":5,"stage_id":2,"title":"Deal One","value":5000,"currency":"EUR","add_time":"2019-05-29 04:21:51","update_time":"2019-11-28 16:19:50","stage_change_time":"2019-11-28 15:41:22","active":true,"deleted":false,"status":"open","probability":null,"next_activity_date":"2019-11-29","next_activity_time":"11:30:00","next_activity_id":128,"last_activity_id":null,"last_activity_date":null,"lost_reason":null,"visible_to":"1","close_time":null,"pipeline_id":1,"won_time":"2019-11-27 11:40:36","first_won_time":"2019-11-27 11:40:36","lost_time":"","products_count":0,"files_count":0,"notes_count":2,"followers_count":0,"email_messages_count":4,"activities_count":1,"done_activities_count":0,"undone_activities_count":1,"participants_count":1,"expected_close_date":"2019-06-29","last_incoming_mail_time":"2019-05-29 18:21:42","last_outgoing_mail_time":"2019-05-30 03:45:35","label":"11","stage_order_nr":2,"person_name":"Person","org_name":"Organization","next_activity_subject":"Call","next_activity_type":"call","next_activity_duration":"00:30:00","next_activity_note":"Note content","formatted_value":"€5,000","weighted_value":5000,"formatted_weighted_value":"€5,000","weighted_value_currency":"EUR","rotten_time":null,"owner_name":"Creator","cc_email":"company+deal1@pipedrivemail.com","org_hidden":false,"person_hidden":false,"acv":null,"arr":null,"mrr":null,"acv_currency":null,"arr_currency":null,"mrr_currency":null}],"totals":{"count":2,"values":{"EUR":100,"USD":220},"weighted_values":{"EUR":100,"USD":2200},"open_count":1,"open_values":{"EUR":100},"weighted_open_values":{"EUR":100},"won_count":1,"won_values":{"USD":2200}}}}