We have created a custom field using “Data Fields” for Person which name is “Contact Address” and Now we are trying to create a person using php-client(GitHub - pipedrive/client-php: Pipedrive API client for PHP) api with custom fields. Custom fields are not updating values to the Contact Address(custom field) when trying to create person. only custom field value not updating to the person.
I have exactly the same problem which makes the whole PHP library pretty much useless to me unfortunately. Is there really no way to add custom field data?
The problem here lies in the fact that the intermediate step of creating a $new_person = new NewPerson($userData) will lose the custom fields. The model can only handle the fields that are listed in our API reference.
Currently, the solution here is to skip this step and add the person data straight to the addPerson function: addPerson($userData).
There is also an open issue in github about it and you can find more examples there. We’ll investigate this further from our side and let’s see whether we can:
make the model work with all the fields or
update the code examples in the docs to reflect the working solution