Can we search contact with more than one phone number

Hi Team,

I see there is a way to Find a Record by Matching a Specific Field but wanted to check if i can search a record with more than phone number.

Working example:
API endpoint: xml-rpc - Keap Developer Portal
Request:

<?xml version='1.0' encoding='UTF-8'?>

<methodCall>

  <methodName>DataService.findByField</methodName>

  <params>

    <param>

      <value><string>KeapAK-e80ae2672875d17496346b9406fc47cd88430f0510a0952e7b</string></value>

    </param>

    <param>

      <value><string>Contact</string></value>

    </param>

    <param>

      <value><int>1000</int></value>

    </param>

    <param>

      <value><int>0</int></value>

    </param>

    <param>

      <value><string>Phone2</string></value>

    </param>

    <param>

      <value><string>(917) 346-8331</string></value>

    </param>

    <param>

      <value><array>

        <data>

          <value><string>Id</string></value>

        </data>

      </array></value>

    </param>

  </params>

</methodCall>```

*Request giving error:*

<?xml version='1.0' encoding='UTF-8'?>

DataService.findByField

<param>

  <value><string>KeapAK-e80ae2672875d17496346b9406fc47cd88430f0510a0952e7b</string></value>

</param>

<param>

  <value><string>Contact</string></value>

</param>

<param>

  <value><int>1000</int></value>

</param>

<param>

  <value><int>0</int></value>

</param>

<param>

  <value><string>Phone1</string></value>

</param>

<param>

  <value><string>(917) 346-8333</string></value>

</param>

<param>

  <value><string>Phone2</string></value>

</param>

<param>

  <value><string>(917) 346-8331</string></value>

</param>

<param>

  <value><array>

    <data>

      <value><string>Id</string></value>

    </data>

  </array></value>

</param>
``` Appreciate quick help here.

If you’re trying to search across multiple phone number fields, there is the ContactService.findByEmail method which will search all three and return the Id of the matching records:

<methodCall>
  <methodName>ContactService.findByEmail</methodName>
  <params>
    <param>
      <value><string>apiKey</string></value>
    </param>
    <param>
      <value><string>testaddress@keap.com</string></value>
    </param>
    <param>
      <value><array></array></value>
    </param>
  </params>
</methodCall>
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
    <params>
        <param>
            <value>
                <array>
                    <data>
                        <value>
                            <struct>
                                <member>
                                    <name>Id</name>
                                    <value>
                                        <i4>14261</i4>
                                    </value>
                                </member>
                            </struct>
                        </value>
                        <value>
                            <struct>
                                <member>
                                    <name>Id</name>
                                    <value>
                                        <i4>14263</i4>
                                    </value>
                                </member>
                            </struct>
                        </value>
                        <value>
                            <struct>
                                <member>
                                    <name>Id</name>
                                    <value>
                                        <i4>14265</i4>
                                    </value>
                                </member>
                            </struct>
                        </value>
                    </data>
                </array>
            </value>
        </param>
    </params>
</methodResponse>

Continuing the discussion from Can we search contact with more than one phone number:

Thanks Tom, but the need is to find a contact by phone where there are more than one phone number available(phone1, phone2, phone3) etc.

Please suggest.

Thanks,

We do not currently support those “or” queries through the XMLRPC API; if you are using all three phone number fields, you would need to search each individually.