<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.spikecare.com/public/v1/patients/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'address' => '<string>',
'clinic_id' => 2,
'date_of_birth' => '2023-12-25',
'email' => 'jsmith@example.com',
'group_number' => '<string>',
'in_network_override' => true,
'insurance_provider_id' => 2,
'name' => '<string>',
'phone' => '<string>',
'policy_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}