Counter-intuitive behavior of relation fields

Note: This is one of multiple posts about issues I’ve discovered while working depth with the Pipedrive API. A description of the use case and collection of all issues can be found at pipedrive-api-notes.md · GitHub.


I think for an API it’s vital that it not only behaves according to its spec (that is the mandatory part), but also that it behaves intuitively and has a certain flow to it. When it comes to relations, this is IMO not always the case for the Pipedrive API:

  • Several fields that are called *_id counterintuitively return full objects (including the ID) instead of only the ID (as the name would suggest)
  • Lack of naming conventions: user_id given as a parameter references entries of the users resource, but for organizations it’s org_id
  • Lack of naming conventions: a reference to the users resource has field type user (e.g. creator_user_id in activities ), but one to persons has type people (e.g. person_id in activities )

Hi,
Thanks for taking the time to capture the complete details :slight_smile: I have moved this to #feedback for broader attention.