curl --request PUT \
--url https://api.decodahealth.com/user/patient/{id} \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"firstName": "<string>",
"lastName": "<string>",
"externalId": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"addressValid": true,
"meta": {},
"primaryLocationId": "<string>",
"dateOfBirth": "2023-12-25",
"allergies": [
"<string>"
],
"familyHistory": [
"<string>"
],
"medicalHistory": [
"<string>"
],
"prescriptions": [
"<string>"
],
"gender": "<string>",
"goalWeight": 123,
"surchargeDisabled": true,
"creditBalance": 123,
"preferredProviderId": "<string>"
}
'import requests
url = "https://api.decodahealth.com/user/patient/{id}"
payload = {
"firstName": "<string>",
"lastName": "<string>",
"externalId": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"addressValid": True,
"meta": {},
"primaryLocationId": "<string>",
"dateOfBirth": "2023-12-25",
"allergies": ["<string>"],
"familyHistory": ["<string>"],
"medicalHistory": ["<string>"],
"prescriptions": ["<string>"],
"gender": "<string>",
"goalWeight": 123,
"surchargeDisabled": True,
"creditBalance": 123,
"preferredProviderId": "<string>"
}
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
lastName: '<string>',
externalId: '<string>',
email: '<string>',
phoneNumber: '<string>',
address: '<string>',
addressLineTwo: '<string>',
city: '<string>',
state: '<string>',
zipCode: '<string>',
country: '<string>',
addressValid: true,
meta: {},
primaryLocationId: '<string>',
dateOfBirth: '2023-12-25',
allergies: ['<string>'],
familyHistory: ['<string>'],
medicalHistory: ['<string>'],
prescriptions: ['<string>'],
gender: '<string>',
goalWeight: 123,
surchargeDisabled: true,
creditBalance: 123,
preferredProviderId: '<string>'
})
};
fetch('https://api.decodahealth.com/user/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.decodahealth.com/user/patient/{id}",
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([
'firstName' => '<string>',
'lastName' => '<string>',
'externalId' => '<string>',
'email' => '<string>',
'phoneNumber' => '<string>',
'address' => '<string>',
'addressLineTwo' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zipCode' => '<string>',
'country' => '<string>',
'addressValid' => true,
'meta' => [
],
'primaryLocationId' => '<string>',
'dateOfBirth' => '2023-12-25',
'allergies' => [
'<string>'
],
'familyHistory' => [
'<string>'
],
'medicalHistory' => [
'<string>'
],
'prescriptions' => [
'<string>'
],
'gender' => '<string>',
'goalWeight' => 123,
'surchargeDisabled' => true,
'creditBalance' => 123,
'preferredProviderId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: application/json",
"TENANT: <tenant>"
],
]);
$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.decodahealth.com/user/patient/{id}"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"externalId\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"country\": \"<string>\",\n \"addressValid\": true,\n \"meta\": {},\n \"primaryLocationId\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"allergies\": [\n \"<string>\"\n ],\n \"familyHistory\": [\n \"<string>\"\n ],\n \"medicalHistory\": [\n \"<string>\"\n ],\n \"prescriptions\": [\n \"<string>\"\n ],\n \"gender\": \"<string>\",\n \"goalWeight\": 123,\n \"surchargeDisabled\": true,\n \"creditBalance\": 123,\n \"preferredProviderId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
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.decodahealth.com/user/patient/{id}")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"externalId\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"country\": \"<string>\",\n \"addressValid\": true,\n \"meta\": {},\n \"primaryLocationId\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"allergies\": [\n \"<string>\"\n ],\n \"familyHistory\": [\n \"<string>\"\n ],\n \"medicalHistory\": [\n \"<string>\"\n ],\n \"prescriptions\": [\n \"<string>\"\n ],\n \"gender\": \"<string>\",\n \"goalWeight\": 123,\n \"surchargeDisabled\": true,\n \"creditBalance\": 123,\n \"preferredProviderId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/user/patient/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"externalId\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"country\": \"<string>\",\n \"addressValid\": true,\n \"meta\": {},\n \"primaryLocationId\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"allergies\": [\n \"<string>\"\n ],\n \"familyHistory\": [\n \"<string>\"\n ],\n \"medicalHistory\": [\n \"<string>\"\n ],\n \"prescriptions\": [\n \"<string>\"\n ],\n \"gender\": \"<string>\",\n \"goalWeight\": 123,\n \"surchargeDisabled\": true,\n \"creditBalance\": 123,\n \"preferredProviderId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>",
"externalId": "<string>",
"address": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"addressValid": true,
"meta": {},
"isArchived": true,
"primaryLocationId": "<string>",
"gender": "<string>",
"dateOfBirth": "2023-12-25",
"patientMedications": [
"<string>"
],
"onSchedulingBlacklist": true,
"surchargeDisabled": true,
"tags": [
{
"id": "<string>",
"name": "<string>",
"isActive": true,
"createdDate": "2023-11-07T05:31:56Z",
"emoji": "<string>",
"color": "<string>",
"updatedDate": "2023-11-07T05:31:56Z"
}
],
"creditBalance": 123,
"preferredProviderId": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Update Patient
curl --request PUT \
--url https://api.decodahealth.com/user/patient/{id} \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"firstName": "<string>",
"lastName": "<string>",
"externalId": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"addressValid": true,
"meta": {},
"primaryLocationId": "<string>",
"dateOfBirth": "2023-12-25",
"allergies": [
"<string>"
],
"familyHistory": [
"<string>"
],
"medicalHistory": [
"<string>"
],
"prescriptions": [
"<string>"
],
"gender": "<string>",
"goalWeight": 123,
"surchargeDisabled": true,
"creditBalance": 123,
"preferredProviderId": "<string>"
}
'import requests
url = "https://api.decodahealth.com/user/patient/{id}"
payload = {
"firstName": "<string>",
"lastName": "<string>",
"externalId": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"addressValid": True,
"meta": {},
"primaryLocationId": "<string>",
"dateOfBirth": "2023-12-25",
"allergies": ["<string>"],
"familyHistory": ["<string>"],
"medicalHistory": ["<string>"],
"prescriptions": ["<string>"],
"gender": "<string>",
"goalWeight": 123,
"surchargeDisabled": True,
"creditBalance": 123,
"preferredProviderId": "<string>"
}
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
lastName: '<string>',
externalId: '<string>',
email: '<string>',
phoneNumber: '<string>',
address: '<string>',
addressLineTwo: '<string>',
city: '<string>',
state: '<string>',
zipCode: '<string>',
country: '<string>',
addressValid: true,
meta: {},
primaryLocationId: '<string>',
dateOfBirth: '2023-12-25',
allergies: ['<string>'],
familyHistory: ['<string>'],
medicalHistory: ['<string>'],
prescriptions: ['<string>'],
gender: '<string>',
goalWeight: 123,
surchargeDisabled: true,
creditBalance: 123,
preferredProviderId: '<string>'
})
};
fetch('https://api.decodahealth.com/user/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.decodahealth.com/user/patient/{id}",
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([
'firstName' => '<string>',
'lastName' => '<string>',
'externalId' => '<string>',
'email' => '<string>',
'phoneNumber' => '<string>',
'address' => '<string>',
'addressLineTwo' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zipCode' => '<string>',
'country' => '<string>',
'addressValid' => true,
'meta' => [
],
'primaryLocationId' => '<string>',
'dateOfBirth' => '2023-12-25',
'allergies' => [
'<string>'
],
'familyHistory' => [
'<string>'
],
'medicalHistory' => [
'<string>'
],
'prescriptions' => [
'<string>'
],
'gender' => '<string>',
'goalWeight' => 123,
'surchargeDisabled' => true,
'creditBalance' => 123,
'preferredProviderId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: application/json",
"TENANT: <tenant>"
],
]);
$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.decodahealth.com/user/patient/{id}"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"externalId\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"country\": \"<string>\",\n \"addressValid\": true,\n \"meta\": {},\n \"primaryLocationId\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"allergies\": [\n \"<string>\"\n ],\n \"familyHistory\": [\n \"<string>\"\n ],\n \"medicalHistory\": [\n \"<string>\"\n ],\n \"prescriptions\": [\n \"<string>\"\n ],\n \"gender\": \"<string>\",\n \"goalWeight\": 123,\n \"surchargeDisabled\": true,\n \"creditBalance\": 123,\n \"preferredProviderId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
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.decodahealth.com/user/patient/{id}")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"externalId\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"country\": \"<string>\",\n \"addressValid\": true,\n \"meta\": {},\n \"primaryLocationId\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"allergies\": [\n \"<string>\"\n ],\n \"familyHistory\": [\n \"<string>\"\n ],\n \"medicalHistory\": [\n \"<string>\"\n ],\n \"prescriptions\": [\n \"<string>\"\n ],\n \"gender\": \"<string>\",\n \"goalWeight\": 123,\n \"surchargeDisabled\": true,\n \"creditBalance\": 123,\n \"preferredProviderId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/user/patient/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"externalId\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"country\": \"<string>\",\n \"addressValid\": true,\n \"meta\": {},\n \"primaryLocationId\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"allergies\": [\n \"<string>\"\n ],\n \"familyHistory\": [\n \"<string>\"\n ],\n \"medicalHistory\": [\n \"<string>\"\n ],\n \"prescriptions\": [\n \"<string>\"\n ],\n \"gender\": \"<string>\",\n \"goalWeight\": 123,\n \"surchargeDisabled\": true,\n \"creditBalance\": 123,\n \"preferredProviderId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>",
"externalId": "<string>",
"address": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"addressValid": true,
"meta": {},
"isArchived": true,
"primaryLocationId": "<string>",
"gender": "<string>",
"dateOfBirth": "2023-12-25",
"patientMedications": [
"<string>"
],
"onSchedulingBlacklist": true,
"surchargeDisabled": true,
"tags": [
{
"id": "<string>",
"name": "<string>",
"isActive": true,
"createdDate": "2023-11-07T05:31:56Z",
"emoji": "<string>",
"color": "<string>",
"updatedDate": "2023-11-07T05:31:56Z"
}
],
"creditBalance": 123,
"preferredProviderId": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Headers
The tenant you are making this request on behalf of
Your api key
Path Parameters
Body
SELF_SCHEDULING, CALL, TEXT, MANUALLY_CREATED, UPLOADED_FROM_FILE, FORM, SEED_DATA, DEMO, EXTERNAL_INTEGRATION, OTHER Response
Successful Response
The unique identifier for the user.
The type of user.
PROVIDER, PATIENT, ASSISTANT The date and time when the user was created.
The user's first name.
The user's last name.
The user's phone number.
The user's email address.
The location of the user.
The user's external identifier if available.
The user's primary address.
Additional address information.
The city of the user's address.
The state of the user's address.
The postal code of the user's address.
The country of the user's address.
Whether the user's address is valid.
Any additional metadata about the user relevant to your system.
Whether the user is archived.
The primary location of the user.
The gender of the patient.
The date of birth of the patient.
List of patient's self-reported medications.
Whether the patient is on the scheduling blacklist.
Whether surcharges are disabled for this patient.
List of patient tags
Show child attributes
Show child attributes
Patient's credit balance in cents.
The preferred provider ID for this patient.
