I am trying to work out how to call both a phone number and a mobile number using the API. I am in civicrm/api and can get one or the other but not both. Can anyone suggest a solution!?
CiviCRM Stack Exchange is a question and answer site for administrators and users of the CiviCRM Constituent Relationship Management software. It only takes a minute to sign up.Sign up to join this community
you can get both Phone and Mobile in a single API call as below
$result = civicrm_api3('Phone', 'get', [ 'sequential' => 1, 'contact_id' => 203, 'phone_type_id' => ['IN' => ["Phone", "Mobile"]], ]);
I have created the test example against https://dmaster.demo.civicrm.org
I guess this helps !!!