List deals associated with an organization
GET {{baseUrl}}/organizations/:id/deals?start=0&limit=<integer>&status=all_not_deleted&sort=<string>&only_primary_association=<number>
Lists deals associated with an organization.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
start | number | Pagination start | |
limit | string | Items shown per page | |
status | string | Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. | |
sort | string | The field names and sorting mode separated by a comma (field_name_1 ASC , field_name_2 DESC ). Only first-level field keys are supported (no nested keys). | |
only_primary_association | string | If set, only deals that are directly associated to the organization are fetched. If not set (default), all deals are fetched that are either directly or indirectly related to the organization. Indirect relations include relations through custom, organization-type fields and through persons of the given organization. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"success":true,"data":[{"id":1,"creator_user_id":{"id":8877,"name":"Creator","email":"john.doe@pipedrive.com","has_pic":false,"pic_hash":null,"active_flag":true,"value":8877},"user_id":{"id":8877,"name":"Creator","email":"john.doe@pipedrive.com","has_pic":false,"pic_hash":null,"active_flag":true,"value":8877},"person_id":{"active_flag":true,"name":"Person","email":[{"label":"work","value":"person@pipedrive.com","primary":true}],"phone":[{"label":"work","value":"37244499911","primary":true}],"value":1101},"org_id":{"name":"Organization","people_count":2,"owner_id":8877,"address":"Mustamäe tee 3a, 10615 Tallinn","active_flag":true,"cc_email":"org@pipedrivemail.com","value":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":"2019-11-27 11:40:36","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}],"additional_data":{"pagination":{"start":0,"limit":100,"more_items_in_collection":true}},"related_objects":{"user":{"8877":{"id":8877,"name":"Creator","email":"john.doe@pipedrive.com","has_pic":false,"pic_hash":null,"active_flag":true}},"organization":{"5":{"id":5,"name":"Organization","people_count":2,"owner_id":8877,"address":"Mustamäe tee 3a, 10615 Tallinn","active_flag":true,"cc_email":"org@pipedrivemail.com"}},"person":{"1101":{"active_flag":true,"id":1101,"name":"Person","email":[{"label":"work","value":"person@pipedrive.com","primary":true}],"phone":[{"label":"work","value":"3421787767","primary":true}],"owner_id":8877}},"stage":{"2":{"id":2,"company_id":123,"order_nr":1,"name":"Stage Name","active_flag":true,"deal_probability":100,"pipeline_id":1,"rotten_flag":false,"rotten_days":null,"add_time":"2015-12-08 13:54:06","update_time":"2015-12-08 13:54:06","pipeline_name":"Pipeline","pipeline_deal_probability":true}},"pipeline":{"1":{"id":1,"name":"Pipeline","url_title":"Pipeline","order_nr":0,"active":true,"deal_probability":true,"add_time":"2015-12-08 10:00:24","update_time":"2015-12-08 10:00:24"}}}}