Updating customized fields of organisation using the api

With this put request
https://api.pipedrive.com/v1/organizations/[ORG_ID]?api_token=[API_TOKEN] with [ORG_ID] and [API_token] exchanged for their actual values a limited number of properties can be updated of an organisation.

We have however a lot of customized fields in our organisation table. like for example “VAT Number” which has it’s own FIELD API key (which is a so called hash code). We would like to update these using the api. However the current organisation update functionality (as described here: [Pipedrive API v1 Reference] )
only allows for the following possibilities:

  • name
  • owner_ID
  • visible_to

Is it possible also for other fields (the ones with an api key) to update these using a Json string containing the organisation ID, the api field code, and the new value, and an ID of the changing person (from the api-key) to updates these fields by using the api. So that we can update for a specific organisation a customized field (defined by an api hash-key).

Please help because it would streamline our back office process a lot.

Thanks and regards,

Laurens
burger.pipedrive.com

Hi @Laurens!

When using the Pipedrive API doc, please keep in mind it is more of an example rather than a be-all-end-all option and it is best to use an API Development Environment like Postman. To GET all the organization fields, this endpoint can be used to pinpoint the API hash or the field API key: https://api.pipedrive.com/v1/organizationFields?api_token=

Knowing which custom field you want to update for a specific organization, feel free to use:
https://api.pipedrive.com/v1/organizations/[ORG ID]?api_token=

and in the body:
{
“API hash or field API key”:“intended value”,
“API hash or field API key”:“intended value”
}

Note: if looking to update one field only, remove the comma “,” at the end of the first line in the body.

Hope this helps!

3 Likes

Hi Tony,

Thanks for your reply. I could not get it working in my vba script with pipedrive, therefore I used the rest server of our own company in which we were able to receive the json body. Therefore I tested the body with Hurl.it There I get the same rejection message. Attached an anomised pdf of the get request and pipedrive response.

A screenshot of the put request and response can be found here (2 pdf screenshots of the website)

https://we.tl/NHCcwu74fA

Please help us how to proceed?

kind regards,

Laurens
burger.pipedrive.com

Hi @Laurens,

I reviewed the provided information and the error shown is related to the content of the body sending data to the same field twice:

{
“name”:“EURO EXIM LTD”
}

{
“name”:“EURO EXIM LTD”
}

Simply remove one of the “name” fields and it will send successfully.

dear Tony,

That is the response. In the request it is only stated once.

kind regards,

Laurens

Hi @Laurens

You are correct, my apologies. Looking it over again, I was able to replicate the error using Hurl.it; I noticed a header is missing causing the 400 error. Be sure to include the header ‘Content-Type’ and value ‘application/json’ and that organization ID in the URL is correct as it will send successfully afterwards.

2 Likes