Hi!
Your API documentation states that querying persons from Pipedrive API v1 Reference endpoint returns a “picture_id” object for each person. I seem to get just an integer value as “picture_id” and therefore get a serialization error in my C# application.
Can You please explain how this can happen and what can I do to fix it?
Best regards,
Kardo
Hi @kardoaw
,
welcome to the community.
I quickly tried a basic call to https://{COMPANY_NAME}.pipedrive.com/api/v1/persons
via Pipedrive official postman collection.
The data returned seems to be an object as expected.
"picture_id": {
"item_type": "person",
"item_id": 3,
"active_flag": true,
"add_time": "2019-01-10 11:49:08",
"update_time": "0000-00-00 00:00:00",
"added_by_user_id": 2535662,
"pictures": {
"128": "https://www.gravatar.com/avatar/ce8b6960cd725c8926299ab69244d19d?s=128&d=404&r=g",
"512": "https://www.gravatar.com/avatar/ce8b6960cd725c8926299ab69244d19d?s=512&d=404&r=g"
},
"value": 1
},
Would you share the bad response along with the x-correlation-id
header value for further investigation, please?

Yes. The response is usually as described, but I have one person who somehow has picture_id
of 9. I can’t share the response publicly, but this person has id of 1163142 and x-correlation-id
of the response containing the person is a9c93ce5-5ed7-41eb-84b5-10727a4cff22
.
Hey @kardoaw,
the reason is that while calling the api/v1/persons
, an additional strict_mode
query parameter can be added.
The strict_mode=true
query param returns picture_id
as an integer ID. Otherwise, it is an object as described.
Thanks for the information.
I tried a few cases:
- When I did not provide
strict_mode
or set it to false
, I got a response where one person had picture_id
as an object and another had picture_id
as an integer.
- When I provided
strict_mode=true
, I got a response where both had picture_id
as an integer.
Is this correct? Can I somehow ensure that picture_id
is always an object?
In this case, can I ask you to reach out directly to support at this particular case?
It might need a further investigation.
Thank you.
1 Like