How to retrieve the values of custom fields in Organization

Hello,

When querying organization endpoint, the custom fields are not returned, can someone kindly advise how to receive the custom fields shown in the GUI?


Hi @Azadeh

You can call GET /organizationFields (more details here), and filter out custom fields by checking edit_flag == true

Hi @ mykhailo

Thanks alot for a fast response. Yes, Im aware the GET /organizationFields provides the custom fields that the user has set in their pipedrive account.

The issue is, when making a GET to the actual organization, for example organization 200…the actual values of the custom fields are not returned?
This is the json body returned:

{
“success”: true,
“data”: {
“id”: 200,
“company_id”: 7833867,
“owner_id”: {
“id”: 12030324,
“name”: “”,
“email”: “”,
“has_pic”: 0,
“pic_hash”: null,
“active_flag”: true,
“value”: 12030324
},
“name”: “Company name”,
“open_deals_count”: 0,
“related_open_deals_count”: 0,
“closed_deals_count”: 0,
“related_closed_deals_count”: 0,
“email_messages_count”: 0,
“people_count”: 0,
“activities_count”: 0,
“done_activities_count”: 0,
“undone_activities_count”: 0,
“files_count”: 0,
“notes_count”: 0,
“followers_count”: 1,
“won_deals_count”: 0,
“related_won_deals_count”: 0,
“lost_deals_count”: 0,
“related_lost_deals_count”: 0,
“active_flag”: false,
“category_id”: null,
“picture_id”: null,
“country_code”: null,
“first_char”: “n”,
“update_time”: “2021-02-26 14:59:14”,
“add_time”: “2021-02-26 14:36:53”,
“visible_to”: “3”,
“next_activity_date”: null,
“next_activity_time”: null,
“next_activity_id”: null,
“last_activity_id”: null,
“last_activity_date”: null,
“label”: null,
“address”: “”,
“address_subpremise”: null,
“address_street_number”: “2”,
“address_route”: “”,
“address_sublocality”: “Odenslund-Odenskog”,
“address_locality”: null,
“address_admin_area_level_1”: “Jämtlands län”,
“address_admin_area_level_2”: null,
“address_country”: “Sverige”,
“address_postal_code”: “831 34”,
“address_formatted_address”: “XXX”,
“fa64b488b982d1c1eeef8d64283dec3498ef2c7e”: “982238218”,
“31c0266a2eeb543a0d7c4324cf53574b7b73fbde”: “”,
“6077d837b1a2251afde033debeb1de76c324caf8”: null,
“400fd46fc559b57f8a2f1830a181a55abaabb792”: null,
“7003d3addb21f229fe1151f21b99f801ce1069ce”: “10204”,
“1c24662a9d734ef67eb67c03521aa0a29c62efbc”: null,
“cf4ea0453ad02d46fbdf721a569a65b7184851ac”: “75407”,
“c011316f1f0ea8b01d32c22b75abd307d1acef5b”: null,
“e44c2371282cedf8a590d085a6b66af1f43903f1”: “SEK”,
“f118b97a2ae01c07bed9548f57afdb7b2fcdcb59”: “033-723 36 17”,
“5647c18a6a74604b56b34ec1d17d97d8b790baf2”: null,
“1fbcc4c132cdff8806fbbf653c043986a1b46592”: null,
“fb41493ecb9487b11106892281385401770ee17b”: null,
“51ab793d3394877fd795b02b267732d41003225c”: null,
“24177bd820ee847de94b183d68ff5ec384aaaeee”: null,
“cc_email”: “”,
“owner_name”: “”,
“edit_name”: true,
“last_activity”: null,
“next_activity”: null
},
“additional_data”: {
“followers”: {
“11279032”: {
“name”: “”,
“email”: “”,
“user_id”: 11279032,
“pic_hash”: “48a11d7778bcce079762b329fbee1274”,
“id”: 202
}
},
“dropbox_email”: “”
},
“related_objects”: {
“user”: {
“12030324”: {
“id”: ,
“name”: “”,
“email”: “”,
“has_pic”: 0,
“pic_hash”: null,
“active_flag”: true
}
}
}
}

It would be great if you could respond with a screenshot on how to retrieve the custom field values for each Organization.

GET /organizations/<id> returns details for organization, and these “hashed” keys are custom fields that have values.

For example, I have a custom field for an organization, “Pipedrive ID”

First, I make a request to GET /organizationFields to find field’s key

As I know the key, I make a request to GET /organizations/<id> to see if an organization has a value for “Pipedrive ID”.

As you can see, there is something there.

In other words, GET /organizations/<id> return key/value pairs, and you can find what keys mean by making GET /organizationFields request

Thanks so much, wonderful! :slightly_smiling_face:

1 Like