PUT /accounts/{account_id}
curl --request PUT \
--url https://api.example.test/accounts/{account_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account": {
"account_setup_completed": true,
"configuration": {
"locale": "<string>",
"schedule": {
"fri": [
"<string>"
],
"mon": [
"<string>"
],
"thu": [
"<string>"
],
"tue": [
"<string>"
],
"wed": [
"<string>"
],
"weeks_limit": {
"id": 123,
"time": 123,
"interval": "<string>"
},
"consultation_duration": 123
},
"timezone": "<string>",
"consultation": {
"odontogram": true,
"physical_exam": true,
"treatment_plan": true
},
"custom_forms": {
"consultation": {
"vital_signs_elements": {
"height": true,
"weight": true,
"systole": true,
"diastole": true,
"body_mass": true,
"heart_rate": true,
"temperature": true,
"respiratory_rate": true,
"oxygen_saturation": true,
"abdominal_perimeter": true
},
"lab_test_results_elements": {
"glucose": true,
"measurement_type": true,
"result_obtained_through": true,
"pregnant_without_diabetes": true
}
},
"medical_history": {
"diet": true,
"perinatal": true,
"postnatal": true,
"psychiatric": true,
"vaccines_mx": true,
"pathological": true,
"heredo_familial": true,
"non_pathological": true,
"gineco_obstetrics": true
}
},
"custom_roles": {
"all_agendas": true,
"administrator": true,
"restricted_medic": true
},
"weekly_email": true,
"prescription_copy": true,
"interface_language": "<string>",
"prescription_template": "<string>",
"assistant_has_charges_access": true,
"assistant_has_clinical_access": true,
"print_vital_signs": true,
"print_diagnostics": true
},
"email": "jsmith@example.com",
"eprescription_enabled": true,
"name": "<string>",
"pending_confirmation_email": "jsmith@example.com",
"physician_institution": "<string>",
"physician_license": "<string>",
"username": "<string>",
"cellphone": "<string>",
"organization_id": 123,
"active": true,
"bio": "<string>",
"office_state_id": "<string>",
"physician_specialty_id": "<string>",
"cellphone_country_id": "<string>"
}
}
'import requests
url = "https://api.example.test/accounts/{account_id}"
payload = { "account": {
"account_setup_completed": True,
"configuration": {
"locale": "<string>",
"schedule": {
"fri": ["<string>"],
"mon": ["<string>"],
"thu": ["<string>"],
"tue": ["<string>"],
"wed": ["<string>"],
"weeks_limit": {
"id": 123,
"time": 123,
"interval": "<string>"
},
"consultation_duration": 123
},
"timezone": "<string>",
"consultation": {
"odontogram": True,
"physical_exam": True,
"treatment_plan": True
},
"custom_forms": {
"consultation": {
"vital_signs_elements": {
"height": True,
"weight": True,
"systole": True,
"diastole": True,
"body_mass": True,
"heart_rate": True,
"temperature": True,
"respiratory_rate": True,
"oxygen_saturation": True,
"abdominal_perimeter": True
},
"lab_test_results_elements": {
"glucose": True,
"measurement_type": True,
"result_obtained_through": True,
"pregnant_without_diabetes": True
}
},
"medical_history": {
"diet": True,
"perinatal": True,
"postnatal": True,
"psychiatric": True,
"vaccines_mx": True,
"pathological": True,
"heredo_familial": True,
"non_pathological": True,
"gineco_obstetrics": True
}
},
"custom_roles": {
"all_agendas": True,
"administrator": True,
"restricted_medic": True
},
"weekly_email": True,
"prescription_copy": True,
"interface_language": "<string>",
"prescription_template": "<string>",
"assistant_has_charges_access": True,
"assistant_has_clinical_access": True,
"print_vital_signs": True,
"print_diagnostics": True
},
"email": "jsmith@example.com",
"eprescription_enabled": True,
"name": "<string>",
"pending_confirmation_email": "jsmith@example.com",
"physician_institution": "<string>",
"physician_license": "<string>",
"username": "<string>",
"cellphone": "<string>",
"organization_id": 123,
"active": True,
"bio": "<string>",
"office_state_id": "<string>",
"physician_specialty_id": "<string>",
"cellphone_country_id": "<string>"
} }
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({
account: {
account_setup_completed: true,
configuration: {
locale: '<string>',
schedule: {
fri: ['<string>'],
mon: ['<string>'],
thu: ['<string>'],
tue: ['<string>'],
wed: ['<string>'],
weeks_limit: {id: 123, time: 123, interval: '<string>'},
consultation_duration: 123
},
timezone: '<string>',
consultation: {odontogram: true, physical_exam: true, treatment_plan: true},
custom_forms: {
consultation: {
vital_signs_elements: {
height: true,
weight: true,
systole: true,
diastole: true,
body_mass: true,
heart_rate: true,
temperature: true,
respiratory_rate: true,
oxygen_saturation: true,
abdominal_perimeter: true
},
lab_test_results_elements: {
glucose: true,
measurement_type: true,
result_obtained_through: true,
pregnant_without_diabetes: true
}
},
medical_history: {
diet: true,
perinatal: true,
postnatal: true,
psychiatric: true,
vaccines_mx: true,
pathological: true,
heredo_familial: true,
non_pathological: true,
gineco_obstetrics: true
}
},
custom_roles: {all_agendas: true, administrator: true, restricted_medic: true},
weekly_email: true,
prescription_copy: true,
interface_language: '<string>',
prescription_template: '<string>',
assistant_has_charges_access: true,
assistant_has_clinical_access: true,
print_vital_signs: true,
print_diagnostics: true
},
email: 'jsmith@example.com',
eprescription_enabled: true,
name: '<string>',
pending_confirmation_email: 'jsmith@example.com',
physician_institution: '<string>',
physician_license: '<string>',
username: '<string>',
cellphone: '<string>',
organization_id: 123,
active: true,
bio: '<string>',
office_state_id: '<string>',
physician_specialty_id: '<string>',
cellphone_country_id: '<string>'
}
})
};
fetch('https://api.example.test/accounts/{account_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.example.test/accounts/{account_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([
'account' => [
'account_setup_completed' => true,
'configuration' => [
'locale' => '<string>',
'schedule' => [
'fri' => [
'<string>'
],
'mon' => [
'<string>'
],
'thu' => [
'<string>'
],
'tue' => [
'<string>'
],
'wed' => [
'<string>'
],
'weeks_limit' => [
'id' => 123,
'time' => 123,
'interval' => '<string>'
],
'consultation_duration' => 123
],
'timezone' => '<string>',
'consultation' => [
'odontogram' => true,
'physical_exam' => true,
'treatment_plan' => true
],
'custom_forms' => [
'consultation' => [
'vital_signs_elements' => [
'height' => true,
'weight' => true,
'systole' => true,
'diastole' => true,
'body_mass' => true,
'heart_rate' => true,
'temperature' => true,
'respiratory_rate' => true,
'oxygen_saturation' => true,
'abdominal_perimeter' => true
],
'lab_test_results_elements' => [
'glucose' => true,
'measurement_type' => true,
'result_obtained_through' => true,
'pregnant_without_diabetes' => true
]
],
'medical_history' => [
'diet' => true,
'perinatal' => true,
'postnatal' => true,
'psychiatric' => true,
'vaccines_mx' => true,
'pathological' => true,
'heredo_familial' => true,
'non_pathological' => true,
'gineco_obstetrics' => true
]
],
'custom_roles' => [
'all_agendas' => true,
'administrator' => true,
'restricted_medic' => true
],
'weekly_email' => true,
'prescription_copy' => true,
'interface_language' => '<string>',
'prescription_template' => '<string>',
'assistant_has_charges_access' => true,
'assistant_has_clinical_access' => true,
'print_vital_signs' => true,
'print_diagnostics' => true
],
'email' => 'jsmith@example.com',
'eprescription_enabled' => true,
'name' => '<string>',
'pending_confirmation_email' => 'jsmith@example.com',
'physician_institution' => '<string>',
'physician_license' => '<string>',
'username' => '<string>',
'cellphone' => '<string>',
'organization_id' => 123,
'active' => true,
'bio' => '<string>',
'office_state_id' => '<string>',
'physician_specialty_id' => '<string>',
'cellphone_country_id' => '<string>'
]
]),
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.example.test/accounts/{account_id}"
payload := strings.NewReader("{\n \"account\": {\n \"account_setup_completed\": true,\n \"configuration\": {\n \"locale\": \"<string>\",\n \"schedule\": {\n \"fri\": [\n \"<string>\"\n ],\n \"mon\": [\n \"<string>\"\n ],\n \"thu\": [\n \"<string>\"\n ],\n \"tue\": [\n \"<string>\"\n ],\n \"wed\": [\n \"<string>\"\n ],\n \"weeks_limit\": {\n \"id\": 123,\n \"time\": 123,\n \"interval\": \"<string>\"\n },\n \"consultation_duration\": 123\n },\n \"timezone\": \"<string>\",\n \"consultation\": {\n \"odontogram\": true,\n \"physical_exam\": true,\n \"treatment_plan\": true\n },\n \"custom_forms\": {\n \"consultation\": {\n \"vital_signs_elements\": {\n \"height\": true,\n \"weight\": true,\n \"systole\": true,\n \"diastole\": true,\n \"body_mass\": true,\n \"heart_rate\": true,\n \"temperature\": true,\n \"respiratory_rate\": true,\n \"oxygen_saturation\": true,\n \"abdominal_perimeter\": true\n },\n \"lab_test_results_elements\": {\n \"glucose\": true,\n \"measurement_type\": true,\n \"result_obtained_through\": true,\n \"pregnant_without_diabetes\": true\n }\n },\n \"medical_history\": {\n \"diet\": true,\n \"perinatal\": true,\n \"postnatal\": true,\n \"psychiatric\": true,\n \"vaccines_mx\": true,\n \"pathological\": true,\n \"heredo_familial\": true,\n \"non_pathological\": true,\n \"gineco_obstetrics\": true\n }\n },\n \"custom_roles\": {\n \"all_agendas\": true,\n \"administrator\": true,\n \"restricted_medic\": true\n },\n \"weekly_email\": true,\n \"prescription_copy\": true,\n \"interface_language\": \"<string>\",\n \"prescription_template\": \"<string>\",\n \"assistant_has_charges_access\": true,\n \"assistant_has_clinical_access\": true,\n \"print_vital_signs\": true,\n \"print_diagnostics\": true\n },\n \"email\": \"jsmith@example.com\",\n \"eprescription_enabled\": true,\n \"name\": \"<string>\",\n \"pending_confirmation_email\": \"jsmith@example.com\",\n \"physician_institution\": \"<string>\",\n \"physician_license\": \"<string>\",\n \"username\": \"<string>\",\n \"cellphone\": \"<string>\",\n \"organization_id\": 123,\n \"active\": true,\n \"bio\": \"<string>\",\n \"office_state_id\": \"<string>\",\n \"physician_specialty_id\": \"<string>\",\n \"cellphone_country_id\": \"<string>\"\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.example.test/accounts/{account_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account\": {\n \"account_setup_completed\": true,\n \"configuration\": {\n \"locale\": \"<string>\",\n \"schedule\": {\n \"fri\": [\n \"<string>\"\n ],\n \"mon\": [\n \"<string>\"\n ],\n \"thu\": [\n \"<string>\"\n ],\n \"tue\": [\n \"<string>\"\n ],\n \"wed\": [\n \"<string>\"\n ],\n \"weeks_limit\": {\n \"id\": 123,\n \"time\": 123,\n \"interval\": \"<string>\"\n },\n \"consultation_duration\": 123\n },\n \"timezone\": \"<string>\",\n \"consultation\": {\n \"odontogram\": true,\n \"physical_exam\": true,\n \"treatment_plan\": true\n },\n \"custom_forms\": {\n \"consultation\": {\n \"vital_signs_elements\": {\n \"height\": true,\n \"weight\": true,\n \"systole\": true,\n \"diastole\": true,\n \"body_mass\": true,\n \"heart_rate\": true,\n \"temperature\": true,\n \"respiratory_rate\": true,\n \"oxygen_saturation\": true,\n \"abdominal_perimeter\": true\n },\n \"lab_test_results_elements\": {\n \"glucose\": true,\n \"measurement_type\": true,\n \"result_obtained_through\": true,\n \"pregnant_without_diabetes\": true\n }\n },\n \"medical_history\": {\n \"diet\": true,\n \"perinatal\": true,\n \"postnatal\": true,\n \"psychiatric\": true,\n \"vaccines_mx\": true,\n \"pathological\": true,\n \"heredo_familial\": true,\n \"non_pathological\": true,\n \"gineco_obstetrics\": true\n }\n },\n \"custom_roles\": {\n \"all_agendas\": true,\n \"administrator\": true,\n \"restricted_medic\": true\n },\n \"weekly_email\": true,\n \"prescription_copy\": true,\n \"interface_language\": \"<string>\",\n \"prescription_template\": \"<string>\",\n \"assistant_has_charges_access\": true,\n \"assistant_has_clinical_access\": true,\n \"print_vital_signs\": true,\n \"print_diagnostics\": true\n },\n \"email\": \"jsmith@example.com\",\n \"eprescription_enabled\": true,\n \"name\": \"<string>\",\n \"pending_confirmation_email\": \"jsmith@example.com\",\n \"physician_institution\": \"<string>\",\n \"physician_license\": \"<string>\",\n \"username\": \"<string>\",\n \"cellphone\": \"<string>\",\n \"organization_id\": 123,\n \"active\": true,\n \"bio\": \"<string>\",\n \"office_state_id\": \"<string>\",\n \"physician_specialty_id\": \"<string>\",\n \"cellphone_country_id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.test/accounts/{account_id}")
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 \"account\": {\n \"account_setup_completed\": true,\n \"configuration\": {\n \"locale\": \"<string>\",\n \"schedule\": {\n \"fri\": [\n \"<string>\"\n ],\n \"mon\": [\n \"<string>\"\n ],\n \"thu\": [\n \"<string>\"\n ],\n \"tue\": [\n \"<string>\"\n ],\n \"wed\": [\n \"<string>\"\n ],\n \"weeks_limit\": {\n \"id\": 123,\n \"time\": 123,\n \"interval\": \"<string>\"\n },\n \"consultation_duration\": 123\n },\n \"timezone\": \"<string>\",\n \"consultation\": {\n \"odontogram\": true,\n \"physical_exam\": true,\n \"treatment_plan\": true\n },\n \"custom_forms\": {\n \"consultation\": {\n \"vital_signs_elements\": {\n \"height\": true,\n \"weight\": true,\n \"systole\": true,\n \"diastole\": true,\n \"body_mass\": true,\n \"heart_rate\": true,\n \"temperature\": true,\n \"respiratory_rate\": true,\n \"oxygen_saturation\": true,\n \"abdominal_perimeter\": true\n },\n \"lab_test_results_elements\": {\n \"glucose\": true,\n \"measurement_type\": true,\n \"result_obtained_through\": true,\n \"pregnant_without_diabetes\": true\n }\n },\n \"medical_history\": {\n \"diet\": true,\n \"perinatal\": true,\n \"postnatal\": true,\n \"psychiatric\": true,\n \"vaccines_mx\": true,\n \"pathological\": true,\n \"heredo_familial\": true,\n \"non_pathological\": true,\n \"gineco_obstetrics\": true\n }\n },\n \"custom_roles\": {\n \"all_agendas\": true,\n \"administrator\": true,\n \"restricted_medic\": true\n },\n \"weekly_email\": true,\n \"prescription_copy\": true,\n \"interface_language\": \"<string>\",\n \"prescription_template\": \"<string>\",\n \"assistant_has_charges_access\": true,\n \"assistant_has_clinical_access\": true,\n \"print_vital_signs\": true,\n \"print_diagnostics\": true\n },\n \"email\": \"jsmith@example.com\",\n \"eprescription_enabled\": true,\n \"name\": \"<string>\",\n \"pending_confirmation_email\": \"jsmith@example.com\",\n \"physician_institution\": \"<string>\",\n \"physician_license\": \"<string>\",\n \"username\": \"<string>\",\n \"cellphone\": \"<string>\",\n \"organization_id\": 123,\n \"active\": true,\n \"bio\": \"<string>\",\n \"office_state_id\": \"<string>\",\n \"physician_specialty_id\": \"<string>\",\n \"cellphone_country_id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyAuthentication and accounts
PUT /accounts/{account_id}
PUT
/
accounts
/
{account_id}
PUT /accounts/{account_id}
curl --request PUT \
--url https://api.example.test/accounts/{account_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account": {
"account_setup_completed": true,
"configuration": {
"locale": "<string>",
"schedule": {
"fri": [
"<string>"
],
"mon": [
"<string>"
],
"thu": [
"<string>"
],
"tue": [
"<string>"
],
"wed": [
"<string>"
],
"weeks_limit": {
"id": 123,
"time": 123,
"interval": "<string>"
},
"consultation_duration": 123
},
"timezone": "<string>",
"consultation": {
"odontogram": true,
"physical_exam": true,
"treatment_plan": true
},
"custom_forms": {
"consultation": {
"vital_signs_elements": {
"height": true,
"weight": true,
"systole": true,
"diastole": true,
"body_mass": true,
"heart_rate": true,
"temperature": true,
"respiratory_rate": true,
"oxygen_saturation": true,
"abdominal_perimeter": true
},
"lab_test_results_elements": {
"glucose": true,
"measurement_type": true,
"result_obtained_through": true,
"pregnant_without_diabetes": true
}
},
"medical_history": {
"diet": true,
"perinatal": true,
"postnatal": true,
"psychiatric": true,
"vaccines_mx": true,
"pathological": true,
"heredo_familial": true,
"non_pathological": true,
"gineco_obstetrics": true
}
},
"custom_roles": {
"all_agendas": true,
"administrator": true,
"restricted_medic": true
},
"weekly_email": true,
"prescription_copy": true,
"interface_language": "<string>",
"prescription_template": "<string>",
"assistant_has_charges_access": true,
"assistant_has_clinical_access": true,
"print_vital_signs": true,
"print_diagnostics": true
},
"email": "jsmith@example.com",
"eprescription_enabled": true,
"name": "<string>",
"pending_confirmation_email": "jsmith@example.com",
"physician_institution": "<string>",
"physician_license": "<string>",
"username": "<string>",
"cellphone": "<string>",
"organization_id": 123,
"active": true,
"bio": "<string>",
"office_state_id": "<string>",
"physician_specialty_id": "<string>",
"cellphone_country_id": "<string>"
}
}
'import requests
url = "https://api.example.test/accounts/{account_id}"
payload = { "account": {
"account_setup_completed": True,
"configuration": {
"locale": "<string>",
"schedule": {
"fri": ["<string>"],
"mon": ["<string>"],
"thu": ["<string>"],
"tue": ["<string>"],
"wed": ["<string>"],
"weeks_limit": {
"id": 123,
"time": 123,
"interval": "<string>"
},
"consultation_duration": 123
},
"timezone": "<string>",
"consultation": {
"odontogram": True,
"physical_exam": True,
"treatment_plan": True
},
"custom_forms": {
"consultation": {
"vital_signs_elements": {
"height": True,
"weight": True,
"systole": True,
"diastole": True,
"body_mass": True,
"heart_rate": True,
"temperature": True,
"respiratory_rate": True,
"oxygen_saturation": True,
"abdominal_perimeter": True
},
"lab_test_results_elements": {
"glucose": True,
"measurement_type": True,
"result_obtained_through": True,
"pregnant_without_diabetes": True
}
},
"medical_history": {
"diet": True,
"perinatal": True,
"postnatal": True,
"psychiatric": True,
"vaccines_mx": True,
"pathological": True,
"heredo_familial": True,
"non_pathological": True,
"gineco_obstetrics": True
}
},
"custom_roles": {
"all_agendas": True,
"administrator": True,
"restricted_medic": True
},
"weekly_email": True,
"prescription_copy": True,
"interface_language": "<string>",
"prescription_template": "<string>",
"assistant_has_charges_access": True,
"assistant_has_clinical_access": True,
"print_vital_signs": True,
"print_diagnostics": True
},
"email": "jsmith@example.com",
"eprescription_enabled": True,
"name": "<string>",
"pending_confirmation_email": "jsmith@example.com",
"physician_institution": "<string>",
"physician_license": "<string>",
"username": "<string>",
"cellphone": "<string>",
"organization_id": 123,
"active": True,
"bio": "<string>",
"office_state_id": "<string>",
"physician_specialty_id": "<string>",
"cellphone_country_id": "<string>"
} }
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({
account: {
account_setup_completed: true,
configuration: {
locale: '<string>',
schedule: {
fri: ['<string>'],
mon: ['<string>'],
thu: ['<string>'],
tue: ['<string>'],
wed: ['<string>'],
weeks_limit: {id: 123, time: 123, interval: '<string>'},
consultation_duration: 123
},
timezone: '<string>',
consultation: {odontogram: true, physical_exam: true, treatment_plan: true},
custom_forms: {
consultation: {
vital_signs_elements: {
height: true,
weight: true,
systole: true,
diastole: true,
body_mass: true,
heart_rate: true,
temperature: true,
respiratory_rate: true,
oxygen_saturation: true,
abdominal_perimeter: true
},
lab_test_results_elements: {
glucose: true,
measurement_type: true,
result_obtained_through: true,
pregnant_without_diabetes: true
}
},
medical_history: {
diet: true,
perinatal: true,
postnatal: true,
psychiatric: true,
vaccines_mx: true,
pathological: true,
heredo_familial: true,
non_pathological: true,
gineco_obstetrics: true
}
},
custom_roles: {all_agendas: true, administrator: true, restricted_medic: true},
weekly_email: true,
prescription_copy: true,
interface_language: '<string>',
prescription_template: '<string>',
assistant_has_charges_access: true,
assistant_has_clinical_access: true,
print_vital_signs: true,
print_diagnostics: true
},
email: 'jsmith@example.com',
eprescription_enabled: true,
name: '<string>',
pending_confirmation_email: 'jsmith@example.com',
physician_institution: '<string>',
physician_license: '<string>',
username: '<string>',
cellphone: '<string>',
organization_id: 123,
active: true,
bio: '<string>',
office_state_id: '<string>',
physician_specialty_id: '<string>',
cellphone_country_id: '<string>'
}
})
};
fetch('https://api.example.test/accounts/{account_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.example.test/accounts/{account_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([
'account' => [
'account_setup_completed' => true,
'configuration' => [
'locale' => '<string>',
'schedule' => [
'fri' => [
'<string>'
],
'mon' => [
'<string>'
],
'thu' => [
'<string>'
],
'tue' => [
'<string>'
],
'wed' => [
'<string>'
],
'weeks_limit' => [
'id' => 123,
'time' => 123,
'interval' => '<string>'
],
'consultation_duration' => 123
],
'timezone' => '<string>',
'consultation' => [
'odontogram' => true,
'physical_exam' => true,
'treatment_plan' => true
],
'custom_forms' => [
'consultation' => [
'vital_signs_elements' => [
'height' => true,
'weight' => true,
'systole' => true,
'diastole' => true,
'body_mass' => true,
'heart_rate' => true,
'temperature' => true,
'respiratory_rate' => true,
'oxygen_saturation' => true,
'abdominal_perimeter' => true
],
'lab_test_results_elements' => [
'glucose' => true,
'measurement_type' => true,
'result_obtained_through' => true,
'pregnant_without_diabetes' => true
]
],
'medical_history' => [
'diet' => true,
'perinatal' => true,
'postnatal' => true,
'psychiatric' => true,
'vaccines_mx' => true,
'pathological' => true,
'heredo_familial' => true,
'non_pathological' => true,
'gineco_obstetrics' => true
]
],
'custom_roles' => [
'all_agendas' => true,
'administrator' => true,
'restricted_medic' => true
],
'weekly_email' => true,
'prescription_copy' => true,
'interface_language' => '<string>',
'prescription_template' => '<string>',
'assistant_has_charges_access' => true,
'assistant_has_clinical_access' => true,
'print_vital_signs' => true,
'print_diagnostics' => true
],
'email' => 'jsmith@example.com',
'eprescription_enabled' => true,
'name' => '<string>',
'pending_confirmation_email' => 'jsmith@example.com',
'physician_institution' => '<string>',
'physician_license' => '<string>',
'username' => '<string>',
'cellphone' => '<string>',
'organization_id' => 123,
'active' => true,
'bio' => '<string>',
'office_state_id' => '<string>',
'physician_specialty_id' => '<string>',
'cellphone_country_id' => '<string>'
]
]),
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.example.test/accounts/{account_id}"
payload := strings.NewReader("{\n \"account\": {\n \"account_setup_completed\": true,\n \"configuration\": {\n \"locale\": \"<string>\",\n \"schedule\": {\n \"fri\": [\n \"<string>\"\n ],\n \"mon\": [\n \"<string>\"\n ],\n \"thu\": [\n \"<string>\"\n ],\n \"tue\": [\n \"<string>\"\n ],\n \"wed\": [\n \"<string>\"\n ],\n \"weeks_limit\": {\n \"id\": 123,\n \"time\": 123,\n \"interval\": \"<string>\"\n },\n \"consultation_duration\": 123\n },\n \"timezone\": \"<string>\",\n \"consultation\": {\n \"odontogram\": true,\n \"physical_exam\": true,\n \"treatment_plan\": true\n },\n \"custom_forms\": {\n \"consultation\": {\n \"vital_signs_elements\": {\n \"height\": true,\n \"weight\": true,\n \"systole\": true,\n \"diastole\": true,\n \"body_mass\": true,\n \"heart_rate\": true,\n \"temperature\": true,\n \"respiratory_rate\": true,\n \"oxygen_saturation\": true,\n \"abdominal_perimeter\": true\n },\n \"lab_test_results_elements\": {\n \"glucose\": true,\n \"measurement_type\": true,\n \"result_obtained_through\": true,\n \"pregnant_without_diabetes\": true\n }\n },\n \"medical_history\": {\n \"diet\": true,\n \"perinatal\": true,\n \"postnatal\": true,\n \"psychiatric\": true,\n \"vaccines_mx\": true,\n \"pathological\": true,\n \"heredo_familial\": true,\n \"non_pathological\": true,\n \"gineco_obstetrics\": true\n }\n },\n \"custom_roles\": {\n \"all_agendas\": true,\n \"administrator\": true,\n \"restricted_medic\": true\n },\n \"weekly_email\": true,\n \"prescription_copy\": true,\n \"interface_language\": \"<string>\",\n \"prescription_template\": \"<string>\",\n \"assistant_has_charges_access\": true,\n \"assistant_has_clinical_access\": true,\n \"print_vital_signs\": true,\n \"print_diagnostics\": true\n },\n \"email\": \"jsmith@example.com\",\n \"eprescription_enabled\": true,\n \"name\": \"<string>\",\n \"pending_confirmation_email\": \"jsmith@example.com\",\n \"physician_institution\": \"<string>\",\n \"physician_license\": \"<string>\",\n \"username\": \"<string>\",\n \"cellphone\": \"<string>\",\n \"organization_id\": 123,\n \"active\": true,\n \"bio\": \"<string>\",\n \"office_state_id\": \"<string>\",\n \"physician_specialty_id\": \"<string>\",\n \"cellphone_country_id\": \"<string>\"\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.example.test/accounts/{account_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account\": {\n \"account_setup_completed\": true,\n \"configuration\": {\n \"locale\": \"<string>\",\n \"schedule\": {\n \"fri\": [\n \"<string>\"\n ],\n \"mon\": [\n \"<string>\"\n ],\n \"thu\": [\n \"<string>\"\n ],\n \"tue\": [\n \"<string>\"\n ],\n \"wed\": [\n \"<string>\"\n ],\n \"weeks_limit\": {\n \"id\": 123,\n \"time\": 123,\n \"interval\": \"<string>\"\n },\n \"consultation_duration\": 123\n },\n \"timezone\": \"<string>\",\n \"consultation\": {\n \"odontogram\": true,\n \"physical_exam\": true,\n \"treatment_plan\": true\n },\n \"custom_forms\": {\n \"consultation\": {\n \"vital_signs_elements\": {\n \"height\": true,\n \"weight\": true,\n \"systole\": true,\n \"diastole\": true,\n \"body_mass\": true,\n \"heart_rate\": true,\n \"temperature\": true,\n \"respiratory_rate\": true,\n \"oxygen_saturation\": true,\n \"abdominal_perimeter\": true\n },\n \"lab_test_results_elements\": {\n \"glucose\": true,\n \"measurement_type\": true,\n \"result_obtained_through\": true,\n \"pregnant_without_diabetes\": true\n }\n },\n \"medical_history\": {\n \"diet\": true,\n \"perinatal\": true,\n \"postnatal\": true,\n \"psychiatric\": true,\n \"vaccines_mx\": true,\n \"pathological\": true,\n \"heredo_familial\": true,\n \"non_pathological\": true,\n \"gineco_obstetrics\": true\n }\n },\n \"custom_roles\": {\n \"all_agendas\": true,\n \"administrator\": true,\n \"restricted_medic\": true\n },\n \"weekly_email\": true,\n \"prescription_copy\": true,\n \"interface_language\": \"<string>\",\n \"prescription_template\": \"<string>\",\n \"assistant_has_charges_access\": true,\n \"assistant_has_clinical_access\": true,\n \"print_vital_signs\": true,\n \"print_diagnostics\": true\n },\n \"email\": \"jsmith@example.com\",\n \"eprescription_enabled\": true,\n \"name\": \"<string>\",\n \"pending_confirmation_email\": \"jsmith@example.com\",\n \"physician_institution\": \"<string>\",\n \"physician_license\": \"<string>\",\n \"username\": \"<string>\",\n \"cellphone\": \"<string>\",\n \"organization_id\": 123,\n \"active\": true,\n \"bio\": \"<string>\",\n \"office_state_id\": \"<string>\",\n \"physician_specialty_id\": \"<string>\",\n \"cellphone_country_id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.test/accounts/{account_id}")
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 \"account\": {\n \"account_setup_completed\": true,\n \"configuration\": {\n \"locale\": \"<string>\",\n \"schedule\": {\n \"fri\": [\n \"<string>\"\n ],\n \"mon\": [\n \"<string>\"\n ],\n \"thu\": [\n \"<string>\"\n ],\n \"tue\": [\n \"<string>\"\n ],\n \"wed\": [\n \"<string>\"\n ],\n \"weeks_limit\": {\n \"id\": 123,\n \"time\": 123,\n \"interval\": \"<string>\"\n },\n \"consultation_duration\": 123\n },\n \"timezone\": \"<string>\",\n \"consultation\": {\n \"odontogram\": true,\n \"physical_exam\": true,\n \"treatment_plan\": true\n },\n \"custom_forms\": {\n \"consultation\": {\n \"vital_signs_elements\": {\n \"height\": true,\n \"weight\": true,\n \"systole\": true,\n \"diastole\": true,\n \"body_mass\": true,\n \"heart_rate\": true,\n \"temperature\": true,\n \"respiratory_rate\": true,\n \"oxygen_saturation\": true,\n \"abdominal_perimeter\": true\n },\n \"lab_test_results_elements\": {\n \"glucose\": true,\n \"measurement_type\": true,\n \"result_obtained_through\": true,\n \"pregnant_without_diabetes\": true\n }\n },\n \"medical_history\": {\n \"diet\": true,\n \"perinatal\": true,\n \"postnatal\": true,\n \"psychiatric\": true,\n \"vaccines_mx\": true,\n \"pathological\": true,\n \"heredo_familial\": true,\n \"non_pathological\": true,\n \"gineco_obstetrics\": true\n }\n },\n \"custom_roles\": {\n \"all_agendas\": true,\n \"administrator\": true,\n \"restricted_medic\": true\n },\n \"weekly_email\": true,\n \"prescription_copy\": true,\n \"interface_language\": \"<string>\",\n \"prescription_template\": \"<string>\",\n \"assistant_has_charges_access\": true,\n \"assistant_has_clinical_access\": true,\n \"print_vital_signs\": true,\n \"print_diagnostics\": true\n },\n \"email\": \"jsmith@example.com\",\n \"eprescription_enabled\": true,\n \"name\": \"<string>\",\n \"pending_confirmation_email\": \"jsmith@example.com\",\n \"physician_institution\": \"<string>\",\n \"physician_license\": \"<string>\",\n \"username\": \"<string>\",\n \"cellphone\": \"<string>\",\n \"organization_id\": 123,\n \"active\": true,\n \"bio\": \"<string>\",\n \"office_state_id\": \"<string>\",\n \"physician_specialty_id\": \"<string>\",\n \"cellphone_country_id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body⌘I