Skip to main content

 

Kareo Help Center

Do you have examples of how to interface with the Kareo API using PHP, C++, etc.?

There are too many different programming languages available for us to provide an example of every single language. We expect that an integrator will choose the language that best fits their design and need. However, here’s a PHP example: 

<?php
    try{
        $user = '** YOUR KAREO USERNAME HERE **';
        $password = '** YOUR KAREO PASSWORD HERE **';
        $customerKey = '** YOUR KAREO CUSTOMERKEY HERE **';

        $wsdl = 'https://webservice.kareo.com/service...vices.svc?wsdl';
        $client = new SoapClient($wsdl);

        $request = array (
            'RequestHeader' => array('User' => $user, 'Password' => $password, 'CustomerKey' => $customerKey),
            'Filter' => array('FromLastModifiedDate' => '3/4/2012'),
            'Fields' => array('PatientFullName' => 'true')
        );

        $params = array('request' => $request);
        $response = $client->GetPatients($params)->GetPatientsResult;

        foreach($response->Patients->PatientData as &$value)
        {
            print($value->PatientFullName. '<br />');
        }
    } catch (Exception $err) {
        print "Error: ". $err->getMessage();
    }
?>