curl --request PATCH \
--url https://api.byblend.com/api/v1/patients/{patient_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "Willard",
"middle_name": "Moises",
"last_name": "Donnelly",
"gender": "male",
"email": "Harmon43@gmail.com",
"phone": "6417383445",
"date_of_birth": "1990-01-01",
"driver_license_number": "B49188319",
"driver_license_state": "CA",
"ssn": "123456789",
"primary_language": "en",
"guardian_name": "John Guardian",
"guardian_phone": "6417383445",
"guardian_email": "parent@example.com",
"guardian_relationship": "parent",
"height_inches": 72,
"weight_pounds": 180,
"external_id": "1234567890",
"is_smoker": false,
"is_diabetic": false,
"is_pregnant": false,
"receive_sms": true,
"receive_email": true,
"risk_factors": {
"allergies": "peanuts, tree nuts, shellfish",
"conditions": "asthma, hypertension",
"medications": "albuterol, levothyroxine"
}
}
'import requests
url = "https://api.byblend.com/api/v1/patients/{patient_id}"
payload = {
"first_name": "Willard",
"middle_name": "Moises",
"last_name": "Donnelly",
"gender": "male",
"email": "Harmon43@gmail.com",
"phone": "6417383445",
"date_of_birth": "1990-01-01",
"driver_license_number": "B49188319",
"driver_license_state": "CA",
"ssn": "123456789",
"primary_language": "en",
"guardian_name": "John Guardian",
"guardian_phone": "6417383445",
"guardian_email": "parent@example.com",
"guardian_relationship": "parent",
"height_inches": 72,
"weight_pounds": 180,
"external_id": "1234567890",
"is_smoker": False,
"is_diabetic": False,
"is_pregnant": False,
"receive_sms": True,
"receive_email": True,
"risk_factors": {
"allergies": "peanuts, tree nuts, shellfish",
"conditions": "asthma, hypertension",
"medications": "albuterol, levothyroxine"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'Willard',
middle_name: 'Moises',
last_name: 'Donnelly',
gender: 'male',
email: 'Harmon43@gmail.com',
phone: '6417383445',
date_of_birth: '1990-01-01',
driver_license_number: 'B49188319',
driver_license_state: 'CA',
ssn: '123456789',
primary_language: 'en',
guardian_name: 'John Guardian',
guardian_phone: '6417383445',
guardian_email: 'parent@example.com',
guardian_relationship: 'parent',
height_inches: 72,
weight_pounds: 180,
external_id: '1234567890',
is_smoker: false,
is_diabetic: false,
is_pregnant: false,
receive_sms: true,
receive_email: true,
risk_factors: {
allergies: 'peanuts, tree nuts, shellfish',
conditions: 'asthma, hypertension',
medications: 'albuterol, levothyroxine'
}
})
};
fetch('https://api.byblend.com/api/v1/patients/{patient_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.byblend.com/api/v1/patients/{patient_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([
'first_name' => 'Willard',
'middle_name' => 'Moises',
'last_name' => 'Donnelly',
'gender' => 'male',
'email' => 'Harmon43@gmail.com',
'phone' => '6417383445',
'date_of_birth' => '1990-01-01',
'driver_license_number' => 'B49188319',
'driver_license_state' => 'CA',
'ssn' => '123456789',
'primary_language' => 'en',
'guardian_name' => 'John Guardian',
'guardian_phone' => '6417383445',
'guardian_email' => 'parent@example.com',
'guardian_relationship' => 'parent',
'height_inches' => 72,
'weight_pounds' => 180,
'external_id' => '1234567890',
'is_smoker' => false,
'is_diabetic' => false,
'is_pregnant' => false,
'receive_sms' => true,
'receive_email' => true,
'risk_factors' => [
'allergies' => 'peanuts, tree nuts, shellfish',
'conditions' => 'asthma, hypertension',
'medications' => 'albuterol, levothyroxine'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.byblend.com/api/v1/patients/{patient_id}"
payload := strings.NewReader("{\n \"first_name\": \"Willard\",\n \"middle_name\": \"Moises\",\n \"last_name\": \"Donnelly\",\n \"gender\": \"male\",\n \"email\": \"Harmon43@gmail.com\",\n \"phone\": \"6417383445\",\n \"date_of_birth\": \"1990-01-01\",\n \"driver_license_number\": \"B49188319\",\n \"driver_license_state\": \"CA\",\n \"ssn\": \"123456789\",\n \"primary_language\": \"en\",\n \"guardian_name\": \"John Guardian\",\n \"guardian_phone\": \"6417383445\",\n \"guardian_email\": \"parent@example.com\",\n \"guardian_relationship\": \"parent\",\n \"height_inches\": 72,\n \"weight_pounds\": 180,\n \"external_id\": \"1234567890\",\n \"is_smoker\": false,\n \"is_diabetic\": false,\n \"is_pregnant\": false,\n \"receive_sms\": true,\n \"receive_email\": true,\n \"risk_factors\": {\n \"allergies\": \"peanuts, tree nuts, shellfish\",\n \"conditions\": \"asthma, hypertension\",\n \"medications\": \"albuterol, levothyroxine\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.byblend.com/api/v1/patients/{patient_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Willard\",\n \"middle_name\": \"Moises\",\n \"last_name\": \"Donnelly\",\n \"gender\": \"male\",\n \"email\": \"Harmon43@gmail.com\",\n \"phone\": \"6417383445\",\n \"date_of_birth\": \"1990-01-01\",\n \"driver_license_number\": \"B49188319\",\n \"driver_license_state\": \"CA\",\n \"ssn\": \"123456789\",\n \"primary_language\": \"en\",\n \"guardian_name\": \"John Guardian\",\n \"guardian_phone\": \"6417383445\",\n \"guardian_email\": \"parent@example.com\",\n \"guardian_relationship\": \"parent\",\n \"height_inches\": 72,\n \"weight_pounds\": 180,\n \"external_id\": \"1234567890\",\n \"is_smoker\": false,\n \"is_diabetic\": false,\n \"is_pregnant\": false,\n \"receive_sms\": true,\n \"receive_email\": true,\n \"risk_factors\": {\n \"allergies\": \"peanuts, tree nuts, shellfish\",\n \"conditions\": \"asthma, hypertension\",\n \"medications\": \"albuterol, levothyroxine\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.byblend.com/api/v1/patients/{patient_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"Willard\",\n \"middle_name\": \"Moises\",\n \"last_name\": \"Donnelly\",\n \"gender\": \"male\",\n \"email\": \"Harmon43@gmail.com\",\n \"phone\": \"6417383445\",\n \"date_of_birth\": \"1990-01-01\",\n \"driver_license_number\": \"B49188319\",\n \"driver_license_state\": \"CA\",\n \"ssn\": \"123456789\",\n \"primary_language\": \"en\",\n \"guardian_name\": \"John Guardian\",\n \"guardian_phone\": \"6417383445\",\n \"guardian_email\": \"parent@example.com\",\n \"guardian_relationship\": \"parent\",\n \"height_inches\": 72,\n \"weight_pounds\": 180,\n \"external_id\": \"1234567890\",\n \"is_smoker\": false,\n \"is_diabetic\": false,\n \"is_pregnant\": false,\n \"receive_sms\": true,\n \"receive_email\": true,\n \"risk_factors\": {\n \"allergies\": \"peanuts, tree nuts, shellfish\",\n \"conditions\": \"asthma, hypertension\",\n \"medications\": \"albuterol, levothyroxine\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708",
"created_at": "2025-03-15T12:00:00Z",
"updated_at": "2025-03-15T12:00:00Z",
"first_name": "Willard",
"middle_name": "Moises",
"last_name": "Donnelly",
"gender": "male",
"email": "Harmon43@gmail.com",
"phone": "6417383445",
"date_of_birth": "1990-01-01",
"driver_license_number": "B49188319",
"driver_license_state": "CA",
"ssn": "123456789",
"primary_language": "en",
"guardian_name": "John Guardian",
"guardian_phone": "6417383445",
"guardian_email": "parent@example.com",
"guardian_relationship": "parent",
"height_inches": 72,
"weight_pounds": 180,
"external_id": "1234567890",
"is_smoker": false,
"is_diabetic": false,
"is_pregnant": false,
"receive_sms": true,
"receive_email": true,
"address": {
"address_1": "140 Lindgren Streets",
"city": "North Consueloburgh",
"state": "CA",
"zip_code": "02108",
"address_2": "Apt 227",
"country": "US"
},
"is_minor": false
}Update a patient's details
Partial update — send only the fields to change. PUT is also accepted with identical merge semantics for backward compatibility.
curl --request PATCH \
--url https://api.byblend.com/api/v1/patients/{patient_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "Willard",
"middle_name": "Moises",
"last_name": "Donnelly",
"gender": "male",
"email": "Harmon43@gmail.com",
"phone": "6417383445",
"date_of_birth": "1990-01-01",
"driver_license_number": "B49188319",
"driver_license_state": "CA",
"ssn": "123456789",
"primary_language": "en",
"guardian_name": "John Guardian",
"guardian_phone": "6417383445",
"guardian_email": "parent@example.com",
"guardian_relationship": "parent",
"height_inches": 72,
"weight_pounds": 180,
"external_id": "1234567890",
"is_smoker": false,
"is_diabetic": false,
"is_pregnant": false,
"receive_sms": true,
"receive_email": true,
"risk_factors": {
"allergies": "peanuts, tree nuts, shellfish",
"conditions": "asthma, hypertension",
"medications": "albuterol, levothyroxine"
}
}
'import requests
url = "https://api.byblend.com/api/v1/patients/{patient_id}"
payload = {
"first_name": "Willard",
"middle_name": "Moises",
"last_name": "Donnelly",
"gender": "male",
"email": "Harmon43@gmail.com",
"phone": "6417383445",
"date_of_birth": "1990-01-01",
"driver_license_number": "B49188319",
"driver_license_state": "CA",
"ssn": "123456789",
"primary_language": "en",
"guardian_name": "John Guardian",
"guardian_phone": "6417383445",
"guardian_email": "parent@example.com",
"guardian_relationship": "parent",
"height_inches": 72,
"weight_pounds": 180,
"external_id": "1234567890",
"is_smoker": False,
"is_diabetic": False,
"is_pregnant": False,
"receive_sms": True,
"receive_email": True,
"risk_factors": {
"allergies": "peanuts, tree nuts, shellfish",
"conditions": "asthma, hypertension",
"medications": "albuterol, levothyroxine"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'Willard',
middle_name: 'Moises',
last_name: 'Donnelly',
gender: 'male',
email: 'Harmon43@gmail.com',
phone: '6417383445',
date_of_birth: '1990-01-01',
driver_license_number: 'B49188319',
driver_license_state: 'CA',
ssn: '123456789',
primary_language: 'en',
guardian_name: 'John Guardian',
guardian_phone: '6417383445',
guardian_email: 'parent@example.com',
guardian_relationship: 'parent',
height_inches: 72,
weight_pounds: 180,
external_id: '1234567890',
is_smoker: false,
is_diabetic: false,
is_pregnant: false,
receive_sms: true,
receive_email: true,
risk_factors: {
allergies: 'peanuts, tree nuts, shellfish',
conditions: 'asthma, hypertension',
medications: 'albuterol, levothyroxine'
}
})
};
fetch('https://api.byblend.com/api/v1/patients/{patient_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.byblend.com/api/v1/patients/{patient_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([
'first_name' => 'Willard',
'middle_name' => 'Moises',
'last_name' => 'Donnelly',
'gender' => 'male',
'email' => 'Harmon43@gmail.com',
'phone' => '6417383445',
'date_of_birth' => '1990-01-01',
'driver_license_number' => 'B49188319',
'driver_license_state' => 'CA',
'ssn' => '123456789',
'primary_language' => 'en',
'guardian_name' => 'John Guardian',
'guardian_phone' => '6417383445',
'guardian_email' => 'parent@example.com',
'guardian_relationship' => 'parent',
'height_inches' => 72,
'weight_pounds' => 180,
'external_id' => '1234567890',
'is_smoker' => false,
'is_diabetic' => false,
'is_pregnant' => false,
'receive_sms' => true,
'receive_email' => true,
'risk_factors' => [
'allergies' => 'peanuts, tree nuts, shellfish',
'conditions' => 'asthma, hypertension',
'medications' => 'albuterol, levothyroxine'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.byblend.com/api/v1/patients/{patient_id}"
payload := strings.NewReader("{\n \"first_name\": \"Willard\",\n \"middle_name\": \"Moises\",\n \"last_name\": \"Donnelly\",\n \"gender\": \"male\",\n \"email\": \"Harmon43@gmail.com\",\n \"phone\": \"6417383445\",\n \"date_of_birth\": \"1990-01-01\",\n \"driver_license_number\": \"B49188319\",\n \"driver_license_state\": \"CA\",\n \"ssn\": \"123456789\",\n \"primary_language\": \"en\",\n \"guardian_name\": \"John Guardian\",\n \"guardian_phone\": \"6417383445\",\n \"guardian_email\": \"parent@example.com\",\n \"guardian_relationship\": \"parent\",\n \"height_inches\": 72,\n \"weight_pounds\": 180,\n \"external_id\": \"1234567890\",\n \"is_smoker\": false,\n \"is_diabetic\": false,\n \"is_pregnant\": false,\n \"receive_sms\": true,\n \"receive_email\": true,\n \"risk_factors\": {\n \"allergies\": \"peanuts, tree nuts, shellfish\",\n \"conditions\": \"asthma, hypertension\",\n \"medications\": \"albuterol, levothyroxine\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.byblend.com/api/v1/patients/{patient_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Willard\",\n \"middle_name\": \"Moises\",\n \"last_name\": \"Donnelly\",\n \"gender\": \"male\",\n \"email\": \"Harmon43@gmail.com\",\n \"phone\": \"6417383445\",\n \"date_of_birth\": \"1990-01-01\",\n \"driver_license_number\": \"B49188319\",\n \"driver_license_state\": \"CA\",\n \"ssn\": \"123456789\",\n \"primary_language\": \"en\",\n \"guardian_name\": \"John Guardian\",\n \"guardian_phone\": \"6417383445\",\n \"guardian_email\": \"parent@example.com\",\n \"guardian_relationship\": \"parent\",\n \"height_inches\": 72,\n \"weight_pounds\": 180,\n \"external_id\": \"1234567890\",\n \"is_smoker\": false,\n \"is_diabetic\": false,\n \"is_pregnant\": false,\n \"receive_sms\": true,\n \"receive_email\": true,\n \"risk_factors\": {\n \"allergies\": \"peanuts, tree nuts, shellfish\",\n \"conditions\": \"asthma, hypertension\",\n \"medications\": \"albuterol, levothyroxine\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.byblend.com/api/v1/patients/{patient_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"Willard\",\n \"middle_name\": \"Moises\",\n \"last_name\": \"Donnelly\",\n \"gender\": \"male\",\n \"email\": \"Harmon43@gmail.com\",\n \"phone\": \"6417383445\",\n \"date_of_birth\": \"1990-01-01\",\n \"driver_license_number\": \"B49188319\",\n \"driver_license_state\": \"CA\",\n \"ssn\": \"123456789\",\n \"primary_language\": \"en\",\n \"guardian_name\": \"John Guardian\",\n \"guardian_phone\": \"6417383445\",\n \"guardian_email\": \"parent@example.com\",\n \"guardian_relationship\": \"parent\",\n \"height_inches\": 72,\n \"weight_pounds\": 180,\n \"external_id\": \"1234567890\",\n \"is_smoker\": false,\n \"is_diabetic\": false,\n \"is_pregnant\": false,\n \"receive_sms\": true,\n \"receive_email\": true,\n \"risk_factors\": {\n \"allergies\": \"peanuts, tree nuts, shellfish\",\n \"conditions\": \"asthma, hypertension\",\n \"medications\": \"albuterol, levothyroxine\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708",
"created_at": "2025-03-15T12:00:00Z",
"updated_at": "2025-03-15T12:00:00Z",
"first_name": "Willard",
"middle_name": "Moises",
"last_name": "Donnelly",
"gender": "male",
"email": "Harmon43@gmail.com",
"phone": "6417383445",
"date_of_birth": "1990-01-01",
"driver_license_number": "B49188319",
"driver_license_state": "CA",
"ssn": "123456789",
"primary_language": "en",
"guardian_name": "John Guardian",
"guardian_phone": "6417383445",
"guardian_email": "parent@example.com",
"guardian_relationship": "parent",
"height_inches": 72,
"weight_pounds": 180,
"external_id": "1234567890",
"is_smoker": false,
"is_diabetic": false,
"is_pregnant": false,
"receive_sms": true,
"receive_email": true,
"address": {
"address_1": "140 Lindgren Streets",
"city": "North Consueloburgh",
"state": "CA",
"zip_code": "02108",
"address_2": "Apt 227",
"country": "US"
},
"is_minor": false
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier for the patient, either UUID or external ID (e.g. my-patients-128318AA2) if you have provided one during patient creation or a prior update.
"98cae3a3-996c-4bf5-9143-0ab6d98bc1d0"
Body
"Willard"
"Moises"
"Donnelly"
Gender of the patient
male, female "male"
"Harmon43@gmail.com"
10-digit phone number without formatting, e.g. 6417383445
"6417383445"
"1990-01-01"
"B49188319"
"CA"
Social Security number. Can be provided with or without hyphens.
"123456789"
ISO 639-1 language code
"en"
Name of the patient's guardian. Required if patient is a minor.
"John Guardian"
"6417383445"
"parent@example.com"
Relationship of the guardian to the patient. See relationship types lookup for available values; most common are parent and legal_guardian; and other can be used.
"parent"
Height of the patient in inches
72
Weight of the patient in pounds
180
External (your own) ID for the patient, to be used for prescription matching
"1234567890"
Whether the patient is a smoker
false
Whether the patient is diabetic
false
Whether the patient is pregnant
false
Whether the patient should receive SMS notifications for shipments. This is only applicable if you have authorized Blend to send patient communications on your behalf.
true
Whether the patient should receive email notifications for shipments. This is only applicable if you have authorized Blend to send patient communications on your behalf.
true
Show child attributes
Show child attributes
Raw text risk factors for the patient. These will be parsed and automatically matched to standardized risk factors. Please delimit with commas, semi-colons, or slashes. Discrete risk factors can be added using the dedicated endpoints.
Show child attributes
Show child attributes
Response
Patient updated successfully
Unique identifier
"0227d1e5-ba9a-42b5-8fe2-38882aa65708"
Date and time of creation
"2025-03-15T12:00:00Z"
Date and time of last update
"2025-03-15T12:00:00Z"
"Willard"
"Moises"
"Donnelly"
Gender of the patient
male, female "male"
"Harmon43@gmail.com"
10-digit phone number without formatting, e.g. 6417383445
"6417383445"
"1990-01-01"
"B49188319"
"CA"
Social Security number. Can be provided with or without hyphens.
"123456789"
ISO 639-1 language code
"en"
Name of the patient's guardian. Required if patient is a minor.
"John Guardian"
"6417383445"
"parent@example.com"
Relationship of the guardian to the patient. See relationship types lookup for available values; most common are parent and legal_guardian; and other can be used.
"parent"
Height of the patient in inches
72
Weight of the patient in pounds
180
External (your own) ID for the patient, to be used for prescription matching
"1234567890"
Whether the patient is a smoker
false
Whether the patient is diabetic
false
Whether the patient is pregnant
false
Whether the patient should receive SMS notifications for shipments. This is only applicable if you have authorized Blend to send patient communications on your behalf.
true
Whether the patient should receive email notifications for shipments. This is only applicable if you have authorized Blend to send patient communications on your behalf.
true
Show child attributes
Show child attributes
Whether the patient is a minor. Automatically calculated based on date of birth.
false