Update a patient
curl --request PUT \
--url https://api.vibrant-america.com/v1/patients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"patientPhoneNumber": "4155550199",
"address": {
"street": "456 Mission St",
"city": "San Francisco",
"state": "CA",
"zipCode": "94105",
"country": "US"
}
}
'import requests
url = "https://api.vibrant-america.com/v1/patients"
payload = {
"patientPhoneNumber": "4155550199",
"address": {
"street": "456 Mission St",
"city": "San Francisco",
"state": "CA",
"zipCode": "94105",
"country": "US"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
patientPhoneNumber: '4155550199',
address: {
street: '456 Mission St',
city: 'San Francisco',
state: 'CA',
zipCode: '94105',
country: 'US'
}
})
};
fetch('https://api.vibrant-america.com/v1/patients', 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.vibrant-america.com/v1/patients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'patientPhoneNumber' => '4155550199',
'address' => [
'street' => '456 Mission St',
'city' => 'San Francisco',
'state' => 'CA',
'zipCode' => '94105',
'country' => 'US'
]
]),
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.vibrant-america.com/v1/patients"
payload := strings.NewReader("{\n \"patientPhoneNumber\": \"4155550199\",\n \"address\": {\n \"street\": \"456 Mission St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zipCode\": \"94105\",\n \"country\": \"US\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.vibrant-america.com/v1/patients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"patientPhoneNumber\": \"4155550199\",\n \"address\": {\n \"street\": \"456 Mission St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zipCode\": \"94105\",\n \"country\": \"US\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vibrant-america.com/v1/patients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"patientPhoneNumber\": \"4155550199\",\n \"address\": {\n \"street\": \"456 Mission St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zipCode\": \"94105\",\n \"country\": \"US\"\n }\n}"
response = http.request(request)
puts response.read_body{
"patientId": 750123
}{
"error": {
"code": "invalid_request",
"message": "One or more testCodes were not recognized.",
"requestId": "req_01JQ8ZC5X9K2MN",
"details": [
{
"unknownCodes": [
"FOO_BAR"
]
}
]
}
}{
"error": {
"code": "unauthorized",
"message": "Not authenticated.",
"requestId": "req_01JQ8ZC5X9K2MN"
}
}{
"error": {
"code": "forbidden",
"message": "Not permitted for this resource.",
"requestId": "req_01JQ8ZC5X9K2MN"
}
}{
"error": {
"code": "internal_error",
"message": "Unexpected error.",
"requestId": "req_01JQ8ZC5X9K2MN"
}
}Patient
Update a patient
Updates an existing patient. Send only the fields you want to change; omitted fields keep their current value. patientId is a query parameter. The patient must belong to your clinic, otherwise 403.
PUT
/
patients
Update a patient
curl --request PUT \
--url https://api.vibrant-america.com/v1/patients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"patientPhoneNumber": "4155550199",
"address": {
"street": "456 Mission St",
"city": "San Francisco",
"state": "CA",
"zipCode": "94105",
"country": "US"
}
}
'import requests
url = "https://api.vibrant-america.com/v1/patients"
payload = {
"patientPhoneNumber": "4155550199",
"address": {
"street": "456 Mission St",
"city": "San Francisco",
"state": "CA",
"zipCode": "94105",
"country": "US"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
patientPhoneNumber: '4155550199',
address: {
street: '456 Mission St',
city: 'San Francisco',
state: 'CA',
zipCode: '94105',
country: 'US'
}
})
};
fetch('https://api.vibrant-america.com/v1/patients', 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.vibrant-america.com/v1/patients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'patientPhoneNumber' => '4155550199',
'address' => [
'street' => '456 Mission St',
'city' => 'San Francisco',
'state' => 'CA',
'zipCode' => '94105',
'country' => 'US'
]
]),
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.vibrant-america.com/v1/patients"
payload := strings.NewReader("{\n \"patientPhoneNumber\": \"4155550199\",\n \"address\": {\n \"street\": \"456 Mission St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zipCode\": \"94105\",\n \"country\": \"US\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.vibrant-america.com/v1/patients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"patientPhoneNumber\": \"4155550199\",\n \"address\": {\n \"street\": \"456 Mission St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zipCode\": \"94105\",\n \"country\": \"US\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vibrant-america.com/v1/patients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"patientPhoneNumber\": \"4155550199\",\n \"address\": {\n \"street\": \"456 Mission St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zipCode\": \"94105\",\n \"country\": \"US\"\n }\n}"
response = http.request(request)
puts response.read_body{
"patientId": 750123
}{
"error": {
"code": "invalid_request",
"message": "One or more testCodes were not recognized.",
"requestId": "req_01JQ8ZC5X9K2MN",
"details": [
{
"unknownCodes": [
"FOO_BAR"
]
}
]
}
}{
"error": {
"code": "unauthorized",
"message": "Not authenticated.",
"requestId": "req_01JQ8ZC5X9K2MN"
}
}{
"error": {
"code": "forbidden",
"message": "Not permitted for this resource.",
"requestId": "req_01JQ8ZC5X9K2MN"
}
}{
"error": {
"code": "internal_error",
"message": "Unexpected error.",
"requestId": "req_01JQ8ZC5X9K2MN"
}
}Updates an existing patient. Send only the fields you want to change; everything you omit keeps its
current value. The patient is identified by the
Rules worth knowing:
patientId query parameter, not by the body.
curl -X PUT "https://api-sandbox.vibrant-america.com/v1/patients?patientId=750123" \
-H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" \
-d '{ "patientEmail": "jane.doe@example.com" }'
address can be partial too — send just the parts you’re changing and the rest of the address
stays as it was:
-d '{ "address": { "city": "Oakland" } }'
- At least one field is required; an empty body returns
400. - An empty string returns
400rather than clearing the value. Clearing a field isn’t supported — send the corrected value instead. patientIdin the body is ignored; the query parameter is what identifies the patient.- The patient must belong to your clinic, otherwise
403.
Authorizations
Body
application/json
Send only the fields you want to change; omitted fields keep their current value. address may also be partial — send just the parts of it you are changing. At least one field is required; an empty body returns 400, and an empty string returns 400 rather than clearing the value.