getonbrd / pipedrive-connect

Ruby library for the Pipedrive API.
MIT License
19 stars 30 forks source link

Malformed search request #28

Closed f-g-p closed 1 year ago

f-g-p commented 1 year ago

Hello,

It seems you have a malformed request issue on the organization search API:

https://developers.pipedrive.com/docs/api/v1/Organizations#searchOrganization

The doc states that fields should be a comma-separated string array &fields=name,address&, and your http clients builds the request the following way: &fields[]=name&fields[]address&

This leads to fields being ignored by Pipedrive (I double checked with their Postman client)

f-g-p commented 1 year ago

(as a side question, is this repo still active ?)

j4rs commented 1 year ago

(as a side question, is this repo still active ?)

Hey Félix,

First of all thanks for your comments.

This repo is active, is just that I am finding time this week to address all the pending issues.

f-g-p commented 1 year ago

yw

j4rs commented 1 year ago

Hello,

It seems you have a malformed request issue on the organization search API:

https://developers.pipedrive.com/docs/api/v1/Organizations#searchOrganization

The doc states that fields should be a comma-separated string array &fields=name,address&, and your http clients builds the request the following way: &fields[]=name&fields[]address&

This leads to fields being ignored by Pipedrive (I double checked with their Postman client)

Hey Félix,

You are totally right, this is an excellent catch 👏 . The good news is that it is functional if instead of passing fields as an array it is passed as the string of csv, so I will update the README.

Thanks for the insightful discovery.

j4rs commented 1 year ago

Ready, fixed 🙂