curl --request PATCH \
--url https://api.maxcare.ai/v1/patients/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"firstName": "Jane",
"middleName": "Marie",
"lastName": "Doe",
"dateOfBirth": "1984-02-11",
"sex": "FEMALE",
"email": "jane@example.com",
"phones": [
{
"type": "CELL_PHONE",
"value": "+13135550123",
"preferred": true
}
],
"conflictPolicy": "reject"
}
'import requests
url = "https://api.maxcare.ai/v1/patients/{id}"
payload = {
"firstName": "Jane",
"middleName": "Marie",
"lastName": "Doe",
"dateOfBirth": "1984-02-11",
"sex": "FEMALE",
"email": "jane@example.com",
"phones": [
{
"type": "CELL_PHONE",
"value": "+13135550123",
"preferred": True
}
],
"conflictPolicy": "reject"
}
headers = {
"X-Organization-Id": "<x-organization-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Organization-Id': '<x-organization-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
firstName: 'Jane',
middleName: 'Marie',
lastName: 'Doe',
dateOfBirth: '1984-02-11',
sex: 'FEMALE',
email: 'jane@example.com',
phones: [{type: 'CELL_PHONE', value: '+13135550123', preferred: true}],
conflictPolicy: 'reject'
})
};
fetch('https://api.maxcare.ai/v1/patients/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.maxcare.ai/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([
'firstName' => 'Jane',
'middleName' => 'Marie',
'lastName' => 'Doe',
'dateOfBirth' => '1984-02-11',
'sex' => 'FEMALE',
'email' => 'jane@example.com',
'phones' => [
[
'type' => 'CELL_PHONE',
'value' => '+13135550123',
'preferred' => true
]
],
'conflictPolicy' => 'reject'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Organization-Id: <x-organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxcare.ai/v1/patients/{id}"
payload := strings.NewReader("{\n \"firstName\": \"Jane\",\n \"middleName\": \"Marie\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1984-02-11\",\n \"sex\": \"FEMALE\",\n \"email\": \"jane@example.com\",\n \"phones\": [\n {\n \"type\": \"CELL_PHONE\",\n \"value\": \"+13135550123\",\n \"preferred\": true\n }\n ],\n \"conflictPolicy\": \"reject\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Organization-Id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.maxcare.ai/v1/patients/{id}")
.header("X-Organization-Id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"Jane\",\n \"middleName\": \"Marie\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1984-02-11\",\n \"sex\": \"FEMALE\",\n \"email\": \"jane@example.com\",\n \"phones\": [\n {\n \"type\": \"CELL_PHONE\",\n \"value\": \"+13135550123\",\n \"preferred\": true\n }\n ],\n \"conflictPolicy\": \"reject\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maxcare.ai/v1/patients/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"Jane\",\n \"middleName\": \"Marie\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1984-02-11\",\n \"sex\": \"FEMALE\",\n \"email\": \"jane@example.com\",\n \"phones\": [\n {\n \"type\": \"CELL_PHONE\",\n \"value\": \"+13135550123\",\n \"preferred\": true\n }\n ],\n \"conflictPolicy\": \"reject\"\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"data": {
"id": "pat_c56103bcd39c46d39f3138dd2b5e05f6",
"updatedFields": [
"contactPoints",
"address"
],
"skippedFields": []
}
}{
"code": "bad_request",
"message": "'id' must be a valid UUID",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unauthorized",
"message": "Invalid or missing API key",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "forbidden",
"message": "Insufficient scope",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "not_found",
"message": "Resource not found",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Maximum 1000 requests per 60 seconds.",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unexpected_integration_error",
"message": "EHR sync failed",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "server_unresponsive",
"message": "EHR integration is not available for this note",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}Update a patient
Updates demographics. A blank submitted value NEVER clears a populated EHR value. When a non-blank value conflicts with the stored chart, conflictPolicy decides: reject (default, 400 listing the conflicting fields), overwrite, or skip. The default is deliberate — this is a public booking form writing to a clinical record, so silent overwrite is the wrong behaviour.
curl --request PATCH \
--url https://api.maxcare.ai/v1/patients/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"firstName": "Jane",
"middleName": "Marie",
"lastName": "Doe",
"dateOfBirth": "1984-02-11",
"sex": "FEMALE",
"email": "jane@example.com",
"phones": [
{
"type": "CELL_PHONE",
"value": "+13135550123",
"preferred": true
}
],
"conflictPolicy": "reject"
}
'import requests
url = "https://api.maxcare.ai/v1/patients/{id}"
payload = {
"firstName": "Jane",
"middleName": "Marie",
"lastName": "Doe",
"dateOfBirth": "1984-02-11",
"sex": "FEMALE",
"email": "jane@example.com",
"phones": [
{
"type": "CELL_PHONE",
"value": "+13135550123",
"preferred": True
}
],
"conflictPolicy": "reject"
}
headers = {
"X-Organization-Id": "<x-organization-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Organization-Id': '<x-organization-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
firstName: 'Jane',
middleName: 'Marie',
lastName: 'Doe',
dateOfBirth: '1984-02-11',
sex: 'FEMALE',
email: 'jane@example.com',
phones: [{type: 'CELL_PHONE', value: '+13135550123', preferred: true}],
conflictPolicy: 'reject'
})
};
fetch('https://api.maxcare.ai/v1/patients/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.maxcare.ai/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([
'firstName' => 'Jane',
'middleName' => 'Marie',
'lastName' => 'Doe',
'dateOfBirth' => '1984-02-11',
'sex' => 'FEMALE',
'email' => 'jane@example.com',
'phones' => [
[
'type' => 'CELL_PHONE',
'value' => '+13135550123',
'preferred' => true
]
],
'conflictPolicy' => 'reject'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Organization-Id: <x-organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxcare.ai/v1/patients/{id}"
payload := strings.NewReader("{\n \"firstName\": \"Jane\",\n \"middleName\": \"Marie\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1984-02-11\",\n \"sex\": \"FEMALE\",\n \"email\": \"jane@example.com\",\n \"phones\": [\n {\n \"type\": \"CELL_PHONE\",\n \"value\": \"+13135550123\",\n \"preferred\": true\n }\n ],\n \"conflictPolicy\": \"reject\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Organization-Id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.maxcare.ai/v1/patients/{id}")
.header("X-Organization-Id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"Jane\",\n \"middleName\": \"Marie\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1984-02-11\",\n \"sex\": \"FEMALE\",\n \"email\": \"jane@example.com\",\n \"phones\": [\n {\n \"type\": \"CELL_PHONE\",\n \"value\": \"+13135550123\",\n \"preferred\": true\n }\n ],\n \"conflictPolicy\": \"reject\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maxcare.ai/v1/patients/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"Jane\",\n \"middleName\": \"Marie\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1984-02-11\",\n \"sex\": \"FEMALE\",\n \"email\": \"jane@example.com\",\n \"phones\": [\n {\n \"type\": \"CELL_PHONE\",\n \"value\": \"+13135550123\",\n \"preferred\": true\n }\n ],\n \"conflictPolicy\": \"reject\"\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"data": {
"id": "pat_c56103bcd39c46d39f3138dd2b5e05f6",
"updatedFields": [
"contactPoints",
"address"
],
"skippedFields": []
}
}{
"code": "bad_request",
"message": "'id' must be a valid UUID",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unauthorized",
"message": "Invalid or missing API key",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "forbidden",
"message": "Insufficient scope",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "not_found",
"message": "Resource not found",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Maximum 1000 requests per 60 seconds.",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unexpected_integration_error",
"message": "EHR sync failed",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "server_unresponsive",
"message": "EHR integration is not available for this note",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}Authorizations
Marketplace API key
Headers
Target clinic organization ID
Path Parameters
Patient ID
Body
"Jane"
"Marie"
"Doe"
YYYY-MM-DD
"1984-02-11"
"FEMALE"
"jane@example.com"
Contact points to write. Each is merged into the chart BY TYPE, so a submitted cell number never touches a stored home or work number. A phone-typed value must contain at least 7 digits or the request is rejected. NOTE: phone values are NOT covered by conflictPolicy — a submitted number replaces the stored number OF THE SAME TYPE. We hold one untyped 'preferred' number per chart, so a typed submission cannot be compared against it without rejecting the ordinary case of a patient confirming their mobile. An EMAIL_ADDRESS entry here writes the chart's single email field and IS covered by conflictPolicy.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
What to do when a submitted value differs from the stored one. reject (default) fails the whole update and reports the conflicting fields; overwrite replaces them; skip keeps the stored value and applies the rest. Blank submitted values NEVER clear a populated EHR value under any policy — this is a public booking form writing to a clinical record, so silent overwrite is not the default. Applies to the named demographic fields and to an email sent via phones[]; see phones for why phone VALUES are exempt.
reject, overwrite, skip "reject"
