Values of deal custom fields missing when using getAllDeals from client-php

I’m using official PHP API client and it’s getAllDeals() method. It works as expected, but I don’t get any of my deal custom fields.

When I test it on official API reference docs, I get custom fields, e.g.:

"f00a99b096ee8dca2656856814bcdf543540a0f1": "Value of my custom field",

However, those fields are simply not there when using PHP client, I’m getting only basic deal fields…

Does anyone have a clue what is wrong here?

Regards,
Petar

It seems the problem is in a way how does getAllDeals() method transforms the API response. If I change the highlighted line to
return CamelCaseHelper::keysToCamelCase($response->body);
(borrowed that from getAllOrganizations() :wink:) I’m getting unfiltered response…

However, very strange to have such inconsistencies in similar controllers :thinking:

1 Like

Hi @petar

Thanks for bringing this to our attention. I’ll give this info to our team and see if we can get this inconsistency cleared up.

1 Like

@David Is this fix on the roadmap?

I’m running into the same issue with DealsController::getDealsTimeline where $mapper->map removes custom fields. The proposed solution from petar above would work great for getDealsTimeline and other endpoints.

For now, I’ve had to write my own Guzzle HTTP requests to return the raw response. If you could fix this in the PHP package, it would be ver helpful!

Hi @David (or whoever else),

unbelieveble, but this problem with PHP client is not solved after 3 years and many new versions of PHP client :frowning:

But the difference with the actual client version is that I cannot borrow the solution from OrganizationsApi::getOrganization because it’s messed up there as well.

Please, give us the way to get values of deal custom fields using PHP client!