Query Regarding Person Search API

BIH07
BIH07 Member Posts: 2 VERIFIED MEMBER
Name Dropper First Comment
edited March 3 in Sales CRM #1

Hi there,

I was wondering if there is a way to retrieve the first and last name directly from the Person Search API request ({{baseUrl}}/persons/search...). Additionally, since I can obtain the primary_email, is there a way to retrieve the primary_phone as well? Also, is the primary_phone always the first entry in the phone array?

Regarding the first question, I understand that one solution is to send an additional request to retrieve a specific person using the first_name and last_name fields. Another approach would be to parse the name field from the API response. However, parsing the name field can be problematic when a person has multiple first or last names, as there is no clear pattern for extracting them accurately.

Is there a way to achieve this in a single request, or do you have any recommendations for a better approach?

Tagged:

Answers

  • Tony Xavier
    Tony Xavier Pipedrive Team Posts: 237 PIPEDRIVE TEAM
    Third Anniversary 25 Answers 100 Comments 25 Likes

    Hello @BIH07,

    With the default search person API endpoint, we will not be able to parse first and last names. But we would recommend checking with the Developer Community as well.

    About Primary phone, you can look for the "Primary" parameter under Phone in the response to identify if the given phone number is registered as primary or not:

  • BIH07
    BIH07 Member Posts: 2 VERIFIED MEMBER
    Name Dropper First Comment

    Okay, thank you @Tony Xavier