Label ID does not equal defaults in GET/organizationFields


I could use some help. We are trying to get organzations from Pipedrive with the label customer. Using the endpoint GET /organizationFields ]. Here is the issue:

For one API token and Company Domain, we get the label id 5 for customer (green) as described in the default values here Working with labels

In another API token and Company Domain, we get the label id 1 for customer (green). The label ID’s are not like the defaults described.

Does anyone have a clue on what is going on here?

Hey @Hare2
Thanks for sharing the details and welcome to the community :raised_hands:
I see that you trying to get the labels from two different companies and the labels happen to have different IDs?

My recommendation would be to obtain the IDs assuming that the label field is the default value. If possible please feel free to share your use-case so that I can understand how it impacts you

Thanks for linking the documentation page. It seems that the documentation might be lacking specificity in what default means. I’ll get back on that :slight_smile:

Hey @Hem :grinning:
Thank you!

That is correct. We are using the same endpoint for both companies: [GET /organizationFields]. We are expecting to get the same outcome which is label id 5 for both.


In stead we are getting label id 1 for one of the companies. Which is what we would expect if we were using the [GET /personFields] (which we are not).


A litte bit more about the use case:
We have developed a standard integration which we were suppose to deploy for a customer using Pipedrive. However, it fails because of this not expected change in label id.

Thanks for having a look at the documentation page as well :slight_smile:

1 Like

Hey @Hare2
Thanks for your patience :slight_smile: We were able to replicate the scenario. The confusion seems to arise from the fact that the value for label is more of a default but not a constant.

  • The value Customer does not change unless the account has some other language than English while setting it up. For instance, Customer becomes Klient if the account has been provisioned with Eesti as the language. So it is a default which depends on the localization setting but not a constant value that you can rely on.

  • The IDs are dynamic. So you can’t rely on them either.

My recommendation is to provide a configuration page for users to choose the right value. Much better if you already have a config page and this could go as a section there. I understand that it would be an additional step however it works much more reliably. :sweat_smile:

I have taken note of the feedback and the documentation page is also updated

Hey @Hem
No worries. I’m just happy you are taking the time to help. I see I see. Thanks for updating the documentation page :smiley:

One question:

When we are getting all organizations (/v1/organizations), we will get id for the label field in response and we only need to process organization with Customer label.

As IDs are dynamic so it means we need to hit v1/organizationFields everytime before hitting organizations (v1/organizations) for getting latest id.

Is it possible for Pipedrive to send label name ( Customer ) in response instead of Id?

Many thanks,

That’s right. Unfortunately, you need to make 2 API calls to figure out the text value for the labels.

However, you can store these values in a dictionary to avoid making the call every time. The IDs once generated will not change. Nevertheless, this is feedback for the API design and I’ve taken note of it :slight_smile: