2020-07-22 18:06:30 error: Got Http response code 400 when accessing https://XXXXXXX.pipedrive.com/v1/leads?api_token=YYYYYYYYYYY. {“success”:false,“data”:null,“additional_data”:null,“error”:“provided dataset is not valid”,“error_info”:“child “title” fails because [“title” is required]”}
but i submitted a title…
with nearly the same code i can create a person and an organisation. changing the endpoint to lead and the data fields is enough to make it stop working
Regarding the first issue ([\"person_id\" must be a number]), this should be fixed now, just a hard refresh is required in your browser in order to fetch the new version of the API documentation without cache.
i tried again today and the error code changed to:
2020-07-28 13:22:46 error: Got Http response code 400 when accessing https://XXXXX.pipedrive.com/v1/leads?api_token=YYYYYYYYY. {“success”:false,“data”:null,“additional_data”:null,“error”:“expected request body to be sent with application/json content-type”,“error_info”:“Please check developers.pipedrive.com for more information about Pipedrive API.”}
however all other requests work and they do work WITHOUT setting a content-type (multipart/form-data is used in all other requests). this seems to be fairly inconsistent especially since your docs also use form-data encoding:
Still running into the same issue! Webform for testing works, but curl request (as in documentation for deals) runs into this ERROR as result.
My data block contains - title, person_id, note
A fascinating marginal note - since your July-changes in the API for Leads, my other API calls that were running for months without issues stop working properly. There i used the Deal Endpoint and Activities.
I had luck on refining my php request - i assume, that the leads endpoint has a different code base thus the person type and header needs to be set/changed: