Update Appointment
Replace an existing appointment.
curl --request PUT \
--url https://sandbox.elationemr.com/api/2.0/appointments/{id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"patient": 123,
"physician": 123,
"practice": 123,
"scheduled_date": "2023-11-07T05:31:56Z",
"appointment_type_id": 123,
"billing_details": {
"billing_note": "<string>",
"prior_authorization": "<string>",
"referring_provider": "<string>",
"referring_provider_state": "<string>"
},
"description": "<string>",
"duration": -1,
"instructions": "<string>",
"metadata": {
"data": {},
"object_id": "<string>",
"object_web_link": "<string>"
},
"payment": {
"amount": "<string>",
"when_collected": "2023-11-07T05:31:56Z",
"appointment": 123,
"bill": 123
},
"reason": "<string>",
"recurring_event_schedule": 123,
"service_location": {
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"id": 123,
"is_primary": true,
"name": "<string>",
"phone": "<string>",
"state": "<string>",
"zip": "<string>"
},
"status": {
"room": "<string>",
"status_detail": "<string>"
},
"telehealth_details": "<string>",
"time_slot_status": "not_avail_for_self_schedule",
"transportation_details": {
"is_required": true,
"notes": "<string>"
}
}
'import requests
url = "https://sandbox.elationemr.com/api/2.0/appointments/{id}/"
payload = {
"patient": 123,
"physician": 123,
"practice": 123,
"scheduled_date": "2023-11-07T05:31:56Z",
"appointment_type_id": 123,
"billing_details": {
"billing_note": "<string>",
"prior_authorization": "<string>",
"referring_provider": "<string>",
"referring_provider_state": "<string>"
},
"description": "<string>",
"duration": -1,
"instructions": "<string>",
"metadata": {
"data": {},
"object_id": "<string>",
"object_web_link": "<string>"
},
"payment": {
"amount": "<string>",
"when_collected": "2023-11-07T05:31:56Z",
"appointment": 123,
"bill": 123
},
"reason": "<string>",
"recurring_event_schedule": 123,
"service_location": {
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"id": 123,
"is_primary": True,
"name": "<string>",
"phone": "<string>",
"state": "<string>",
"zip": "<string>"
},
"status": {
"room": "<string>",
"status_detail": "<string>"
},
"telehealth_details": "<string>",
"time_slot_status": "not_avail_for_self_schedule",
"transportation_details": {
"is_required": True,
"notes": "<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({
patient: 123,
physician: 123,
practice: 123,
scheduled_date: '2023-11-07T05:31:56Z',
appointment_type_id: 123,
billing_details: {
billing_note: '<string>',
prior_authorization: '<string>',
referring_provider: '<string>',
referring_provider_state: '<string>'
},
description: '<string>',
duration: -1,
instructions: '<string>',
metadata: {data: {}, object_id: '<string>', object_web_link: '<string>'},
payment: {
amount: '<string>',
when_collected: '2023-11-07T05:31:56Z',
appointment: 123,
bill: 123
},
reason: '<string>',
recurring_event_schedule: 123,
service_location: {
address_line1: '<string>',
address_line2: '<string>',
city: '<string>',
created_date: '2023-11-07T05:31:56Z',
deleted_date: '2023-11-07T05:31:56Z',
id: 123,
is_primary: true,
name: '<string>',
phone: '<string>',
state: '<string>',
zip: '<string>'
},
status: {room: '<string>', status_detail: '<string>'},
telehealth_details: '<string>',
time_slot_status: 'not_avail_for_self_schedule',
transportation_details: {is_required: true, notes: '<string>'}
})
};
fetch('https://sandbox.elationemr.com/api/2.0/appointments/{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://sandbox.elationemr.com/api/2.0/appointments/{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([
'patient' => 123,
'physician' => 123,
'practice' => 123,
'scheduled_date' => '2023-11-07T05:31:56Z',
'appointment_type_id' => 123,
'billing_details' => [
'billing_note' => '<string>',
'prior_authorization' => '<string>',
'referring_provider' => '<string>',
'referring_provider_state' => '<string>'
],
'description' => '<string>',
'duration' => -1,
'instructions' => '<string>',
'metadata' => [
'data' => [
],
'object_id' => '<string>',
'object_web_link' => '<string>'
],
'payment' => [
'amount' => '<string>',
'when_collected' => '2023-11-07T05:31:56Z',
'appointment' => 123,
'bill' => 123
],
'reason' => '<string>',
'recurring_event_schedule' => 123,
'service_location' => [
'address_line1' => '<string>',
'address_line2' => '<string>',
'city' => '<string>',
'created_date' => '2023-11-07T05:31:56Z',
'deleted_date' => '2023-11-07T05:31:56Z',
'id' => 123,
'is_primary' => true,
'name' => '<string>',
'phone' => '<string>',
'state' => '<string>',
'zip' => '<string>'
],
'status' => [
'room' => '<string>',
'status_detail' => '<string>'
],
'telehealth_details' => '<string>',
'time_slot_status' => 'not_avail_for_self_schedule',
'transportation_details' => [
'is_required' => true,
'notes' => '<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://sandbox.elationemr.com/api/2.0/appointments/{id}/"
payload := strings.NewReader("{\n \"patient\": 123,\n \"physician\": 123,\n \"practice\": 123,\n \"scheduled_date\": \"2023-11-07T05:31:56Z\",\n \"appointment_type_id\": 123,\n \"billing_details\": {\n \"billing_note\": \"<string>\",\n \"prior_authorization\": \"<string>\",\n \"referring_provider\": \"<string>\",\n \"referring_provider_state\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"duration\": -1,\n \"instructions\": \"<string>\",\n \"metadata\": {\n \"data\": {},\n \"object_id\": \"<string>\",\n \"object_web_link\": \"<string>\"\n },\n \"payment\": {\n \"amount\": \"<string>\",\n \"when_collected\": \"2023-11-07T05:31:56Z\",\n \"appointment\": 123,\n \"bill\": 123\n },\n \"reason\": \"<string>\",\n \"recurring_event_schedule\": 123,\n \"service_location\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"created_date\": \"2023-11-07T05:31:56Z\",\n \"deleted_date\": \"2023-11-07T05:31:56Z\",\n \"id\": 123,\n \"is_primary\": true,\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\"\n },\n \"status\": {\n \"room\": \"<string>\",\n \"status_detail\": \"<string>\"\n },\n \"telehealth_details\": \"<string>\",\n \"time_slot_status\": \"not_avail_for_self_schedule\",\n \"transportation_details\": {\n \"is_required\": true,\n \"notes\": \"<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://sandbox.elationemr.com/api/2.0/appointments/{id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"patient\": 123,\n \"physician\": 123,\n \"practice\": 123,\n \"scheduled_date\": \"2023-11-07T05:31:56Z\",\n \"appointment_type_id\": 123,\n \"billing_details\": {\n \"billing_note\": \"<string>\",\n \"prior_authorization\": \"<string>\",\n \"referring_provider\": \"<string>\",\n \"referring_provider_state\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"duration\": -1,\n \"instructions\": \"<string>\",\n \"metadata\": {\n \"data\": {},\n \"object_id\": \"<string>\",\n \"object_web_link\": \"<string>\"\n },\n \"payment\": {\n \"amount\": \"<string>\",\n \"when_collected\": \"2023-11-07T05:31:56Z\",\n \"appointment\": 123,\n \"bill\": 123\n },\n \"reason\": \"<string>\",\n \"recurring_event_schedule\": 123,\n \"service_location\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"created_date\": \"2023-11-07T05:31:56Z\",\n \"deleted_date\": \"2023-11-07T05:31:56Z\",\n \"id\": 123,\n \"is_primary\": true,\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\"\n },\n \"status\": {\n \"room\": \"<string>\",\n \"status_detail\": \"<string>\"\n },\n \"telehealth_details\": \"<string>\",\n \"time_slot_status\": \"not_avail_for_self_schedule\",\n \"transportation_details\": {\n \"is_required\": true,\n \"notes\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.elationemr.com/api/2.0/appointments/{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 \"patient\": 123,\n \"physician\": 123,\n \"practice\": 123,\n \"scheduled_date\": \"2023-11-07T05:31:56Z\",\n \"appointment_type_id\": 123,\n \"billing_details\": {\n \"billing_note\": \"<string>\",\n \"prior_authorization\": \"<string>\",\n \"referring_provider\": \"<string>\",\n \"referring_provider_state\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"duration\": -1,\n \"instructions\": \"<string>\",\n \"metadata\": {\n \"data\": {},\n \"object_id\": \"<string>\",\n \"object_web_link\": \"<string>\"\n },\n \"payment\": {\n \"amount\": \"<string>\",\n \"when_collected\": \"2023-11-07T05:31:56Z\",\n \"appointment\": 123,\n \"bill\": 123\n },\n \"reason\": \"<string>\",\n \"recurring_event_schedule\": 123,\n \"service_location\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"created_date\": \"2023-11-07T05:31:56Z\",\n \"deleted_date\": \"2023-11-07T05:31:56Z\",\n \"id\": 123,\n \"is_primary\": true,\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\"\n },\n \"status\": {\n \"room\": \"<string>\",\n \"status_detail\": \"<string>\"\n },\n \"telehealth_details\": \"<string>\",\n \"time_slot_status\": \"not_avail_for_self_schedule\",\n \"transportation_details\": {\n \"is_required\": true,\n \"notes\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"patient": 123,
"physician": 123,
"practice": 123,
"scheduled_date": "2023-11-07T05:31:56Z",
"appointment_type_id": 123,
"billing_details": {
"billing_note": "<string>",
"prior_authorization": "<string>",
"referring_provider": "<string>",
"referring_provider_state": "<string>"
},
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"description": "<string>",
"duration": -1,
"id": 123,
"instructions": "<string>",
"is_blocking": true,
"last_modified_date": "2023-11-07T05:31:56Z",
"metadata": {
"data": {},
"object_id": "<string>",
"object_web_link": "<string>"
},
"payment": {
"amount": "<string>",
"when_collected": "2023-11-07T05:31:56Z",
"appointment": 123,
"bill": 123,
"create_date": "2023-11-07T05:31:56Z",
"delete_date": "2023-11-07T05:31:56Z",
"id": 123
},
"reason": "<string>",
"recurring_event_schedule": 123,
"service_location": {
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"id": 123,
"is_primary": true,
"name": "<string>",
"phone": "<string>",
"state": "<string>",
"zip": "<string>"
},
"status": {
"room": "<string>",
"status_date": "2023-11-07T05:31:56Z",
"status_detail": "<string>"
},
"telehealth_details": "<string>",
"time_slot_status": "not_avail_for_self_schedule",
"transportation_details": {
"is_required": true,
"notes": "<string>"
}
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Body
The ID of an existing appointment type to assign to the appointment. Provide this instead of 'reason' to reference a specific appointment type rather than matching or creating one by name. If both 'reason' and 'appointment_type_id' are supplied, 'reason' takes precedence.
The billing details for the appointment.
Show child attributes
Show child attributes
The duration of the appointment in minutes. If duration is not provided, the default duration will be used given a reason.
-2147483648 <= x <= 2147483647Show child attributes
Show child attributes
IN_PERSON, VIDEO Show child attributes
Show child attributes
50The ID of the service location where the appointment will occur.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
not_avail_for_self_schedule appointment, appointment_slot, event The transportation details for the appointment.
Show child attributes
Show child attributes
Response
The ID of an existing appointment type to assign to the appointment. Provide this instead of 'reason' to reference a specific appointment type rather than matching or creating one by name. If both 'reason' and 'appointment_type_id' are supplied, 'reason' takes precedence.
The billing details for the appointment.
Show child attributes
Show child attributes
The duration of the appointment in minutes. If duration is not provided, the default duration will be used given a reason.
-2147483648 <= x <= 2147483647Show child attributes
Show child attributes
IN_PERSON, VIDEO Show child attributes
Show child attributes
50The ID of the service location where the appointment will occur.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
not_avail_for_self_schedule appointment, appointment_slot, event The transportation details for the appointment.
Show child attributes
Show child attributes
Was this page helpful?
curl --request PUT \
--url https://sandbox.elationemr.com/api/2.0/appointments/{id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"patient": 123,
"physician": 123,
"practice": 123,
"scheduled_date": "2023-11-07T05:31:56Z",
"appointment_type_id": 123,
"billing_details": {
"billing_note": "<string>",
"prior_authorization": "<string>",
"referring_provider": "<string>",
"referring_provider_state": "<string>"
},
"description": "<string>",
"duration": -1,
"instructions": "<string>",
"metadata": {
"data": {},
"object_id": "<string>",
"object_web_link": "<string>"
},
"payment": {
"amount": "<string>",
"when_collected": "2023-11-07T05:31:56Z",
"appointment": 123,
"bill": 123
},
"reason": "<string>",
"recurring_event_schedule": 123,
"service_location": {
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"id": 123,
"is_primary": true,
"name": "<string>",
"phone": "<string>",
"state": "<string>",
"zip": "<string>"
},
"status": {
"room": "<string>",
"status_detail": "<string>"
},
"telehealth_details": "<string>",
"time_slot_status": "not_avail_for_self_schedule",
"transportation_details": {
"is_required": true,
"notes": "<string>"
}
}
'import requests
url = "https://sandbox.elationemr.com/api/2.0/appointments/{id}/"
payload = {
"patient": 123,
"physician": 123,
"practice": 123,
"scheduled_date": "2023-11-07T05:31:56Z",
"appointment_type_id": 123,
"billing_details": {
"billing_note": "<string>",
"prior_authorization": "<string>",
"referring_provider": "<string>",
"referring_provider_state": "<string>"
},
"description": "<string>",
"duration": -1,
"instructions": "<string>",
"metadata": {
"data": {},
"object_id": "<string>",
"object_web_link": "<string>"
},
"payment": {
"amount": "<string>",
"when_collected": "2023-11-07T05:31:56Z",
"appointment": 123,
"bill": 123
},
"reason": "<string>",
"recurring_event_schedule": 123,
"service_location": {
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"id": 123,
"is_primary": True,
"name": "<string>",
"phone": "<string>",
"state": "<string>",
"zip": "<string>"
},
"status": {
"room": "<string>",
"status_detail": "<string>"
},
"telehealth_details": "<string>",
"time_slot_status": "not_avail_for_self_schedule",
"transportation_details": {
"is_required": True,
"notes": "<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({
patient: 123,
physician: 123,
practice: 123,
scheduled_date: '2023-11-07T05:31:56Z',
appointment_type_id: 123,
billing_details: {
billing_note: '<string>',
prior_authorization: '<string>',
referring_provider: '<string>',
referring_provider_state: '<string>'
},
description: '<string>',
duration: -1,
instructions: '<string>',
metadata: {data: {}, object_id: '<string>', object_web_link: '<string>'},
payment: {
amount: '<string>',
when_collected: '2023-11-07T05:31:56Z',
appointment: 123,
bill: 123
},
reason: '<string>',
recurring_event_schedule: 123,
service_location: {
address_line1: '<string>',
address_line2: '<string>',
city: '<string>',
created_date: '2023-11-07T05:31:56Z',
deleted_date: '2023-11-07T05:31:56Z',
id: 123,
is_primary: true,
name: '<string>',
phone: '<string>',
state: '<string>',
zip: '<string>'
},
status: {room: '<string>', status_detail: '<string>'},
telehealth_details: '<string>',
time_slot_status: 'not_avail_for_self_schedule',
transportation_details: {is_required: true, notes: '<string>'}
})
};
fetch('https://sandbox.elationemr.com/api/2.0/appointments/{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://sandbox.elationemr.com/api/2.0/appointments/{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([
'patient' => 123,
'physician' => 123,
'practice' => 123,
'scheduled_date' => '2023-11-07T05:31:56Z',
'appointment_type_id' => 123,
'billing_details' => [
'billing_note' => '<string>',
'prior_authorization' => '<string>',
'referring_provider' => '<string>',
'referring_provider_state' => '<string>'
],
'description' => '<string>',
'duration' => -1,
'instructions' => '<string>',
'metadata' => [
'data' => [
],
'object_id' => '<string>',
'object_web_link' => '<string>'
],
'payment' => [
'amount' => '<string>',
'when_collected' => '2023-11-07T05:31:56Z',
'appointment' => 123,
'bill' => 123
],
'reason' => '<string>',
'recurring_event_schedule' => 123,
'service_location' => [
'address_line1' => '<string>',
'address_line2' => '<string>',
'city' => '<string>',
'created_date' => '2023-11-07T05:31:56Z',
'deleted_date' => '2023-11-07T05:31:56Z',
'id' => 123,
'is_primary' => true,
'name' => '<string>',
'phone' => '<string>',
'state' => '<string>',
'zip' => '<string>'
],
'status' => [
'room' => '<string>',
'status_detail' => '<string>'
],
'telehealth_details' => '<string>',
'time_slot_status' => 'not_avail_for_self_schedule',
'transportation_details' => [
'is_required' => true,
'notes' => '<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://sandbox.elationemr.com/api/2.0/appointments/{id}/"
payload := strings.NewReader("{\n \"patient\": 123,\n \"physician\": 123,\n \"practice\": 123,\n \"scheduled_date\": \"2023-11-07T05:31:56Z\",\n \"appointment_type_id\": 123,\n \"billing_details\": {\n \"billing_note\": \"<string>\",\n \"prior_authorization\": \"<string>\",\n \"referring_provider\": \"<string>\",\n \"referring_provider_state\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"duration\": -1,\n \"instructions\": \"<string>\",\n \"metadata\": {\n \"data\": {},\n \"object_id\": \"<string>\",\n \"object_web_link\": \"<string>\"\n },\n \"payment\": {\n \"amount\": \"<string>\",\n \"when_collected\": \"2023-11-07T05:31:56Z\",\n \"appointment\": 123,\n \"bill\": 123\n },\n \"reason\": \"<string>\",\n \"recurring_event_schedule\": 123,\n \"service_location\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"created_date\": \"2023-11-07T05:31:56Z\",\n \"deleted_date\": \"2023-11-07T05:31:56Z\",\n \"id\": 123,\n \"is_primary\": true,\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\"\n },\n \"status\": {\n \"room\": \"<string>\",\n \"status_detail\": \"<string>\"\n },\n \"telehealth_details\": \"<string>\",\n \"time_slot_status\": \"not_avail_for_self_schedule\",\n \"transportation_details\": {\n \"is_required\": true,\n \"notes\": \"<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://sandbox.elationemr.com/api/2.0/appointments/{id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"patient\": 123,\n \"physician\": 123,\n \"practice\": 123,\n \"scheduled_date\": \"2023-11-07T05:31:56Z\",\n \"appointment_type_id\": 123,\n \"billing_details\": {\n \"billing_note\": \"<string>\",\n \"prior_authorization\": \"<string>\",\n \"referring_provider\": \"<string>\",\n \"referring_provider_state\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"duration\": -1,\n \"instructions\": \"<string>\",\n \"metadata\": {\n \"data\": {},\n \"object_id\": \"<string>\",\n \"object_web_link\": \"<string>\"\n },\n \"payment\": {\n \"amount\": \"<string>\",\n \"when_collected\": \"2023-11-07T05:31:56Z\",\n \"appointment\": 123,\n \"bill\": 123\n },\n \"reason\": \"<string>\",\n \"recurring_event_schedule\": 123,\n \"service_location\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"created_date\": \"2023-11-07T05:31:56Z\",\n \"deleted_date\": \"2023-11-07T05:31:56Z\",\n \"id\": 123,\n \"is_primary\": true,\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\"\n },\n \"status\": {\n \"room\": \"<string>\",\n \"status_detail\": \"<string>\"\n },\n \"telehealth_details\": \"<string>\",\n \"time_slot_status\": \"not_avail_for_self_schedule\",\n \"transportation_details\": {\n \"is_required\": true,\n \"notes\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.elationemr.com/api/2.0/appointments/{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 \"patient\": 123,\n \"physician\": 123,\n \"practice\": 123,\n \"scheduled_date\": \"2023-11-07T05:31:56Z\",\n \"appointment_type_id\": 123,\n \"billing_details\": {\n \"billing_note\": \"<string>\",\n \"prior_authorization\": \"<string>\",\n \"referring_provider\": \"<string>\",\n \"referring_provider_state\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"duration\": -1,\n \"instructions\": \"<string>\",\n \"metadata\": {\n \"data\": {},\n \"object_id\": \"<string>\",\n \"object_web_link\": \"<string>\"\n },\n \"payment\": {\n \"amount\": \"<string>\",\n \"when_collected\": \"2023-11-07T05:31:56Z\",\n \"appointment\": 123,\n \"bill\": 123\n },\n \"reason\": \"<string>\",\n \"recurring_event_schedule\": 123,\n \"service_location\": {\n \"address_line1\": \"<string>\",\n \"address_line2\": \"<string>\",\n \"city\": \"<string>\",\n \"created_date\": \"2023-11-07T05:31:56Z\",\n \"deleted_date\": \"2023-11-07T05:31:56Z\",\n \"id\": 123,\n \"is_primary\": true,\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\"\n },\n \"status\": {\n \"room\": \"<string>\",\n \"status_detail\": \"<string>\"\n },\n \"telehealth_details\": \"<string>\",\n \"time_slot_status\": \"not_avail_for_self_schedule\",\n \"transportation_details\": {\n \"is_required\": true,\n \"notes\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"patient": 123,
"physician": 123,
"practice": 123,
"scheduled_date": "2023-11-07T05:31:56Z",
"appointment_type_id": 123,
"billing_details": {
"billing_note": "<string>",
"prior_authorization": "<string>",
"referring_provider": "<string>",
"referring_provider_state": "<string>"
},
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"description": "<string>",
"duration": -1,
"id": 123,
"instructions": "<string>",
"is_blocking": true,
"last_modified_date": "2023-11-07T05:31:56Z",
"metadata": {
"data": {},
"object_id": "<string>",
"object_web_link": "<string>"
},
"payment": {
"amount": "<string>",
"when_collected": "2023-11-07T05:31:56Z",
"appointment": 123,
"bill": 123,
"create_date": "2023-11-07T05:31:56Z",
"delete_date": "2023-11-07T05:31:56Z",
"id": 123
},
"reason": "<string>",
"recurring_event_schedule": 123,
"service_location": {
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"id": 123,
"is_primary": true,
"name": "<string>",
"phone": "<string>",
"state": "<string>",
"zip": "<string>"
},
"status": {
"room": "<string>",
"status_date": "2023-11-07T05:31:56Z",
"status_detail": "<string>"
},
"telehealth_details": "<string>",
"time_slot_status": "not_avail_for_self_schedule",
"transportation_details": {
"is_required": true,
"notes": "<string>"
}
}