Update Appointment
curl --request PATCH \
--url https://api.usecobalt.com/v1/appointments/{id} \
--header 'Content-Type: application/json' \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>' \
--data '
{
"mrn": "<string>",
"location": "<string>",
"datetime": "<string>",
"provider": "<string>",
"type": "<string>",
"note": "<string>",
"reason": "<string>"
}
'import requests
url = "https://api.usecobalt.com/v1/appointments/{id}"
payload = {
"mrn": "<string>",
"location": "<string>",
"datetime": "<string>",
"provider": "<string>",
"type": "<string>",
"note": "<string>",
"reason": "<string>"
}
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
client_id: '<api-key>',
client_secret: '<api-key>',
access_token: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
mrn: '<string>',
location: '<string>',
datetime: '<string>',
provider: '<string>',
type: '<string>',
note: '<string>',
reason: '<string>'
})
};
fetch('https://api.usecobalt.com/v1/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://api.usecobalt.com/v1/appointments/{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([
'mrn' => '<string>',
'location' => '<string>',
'datetime' => '<string>',
'provider' => '<string>',
'type' => '<string>',
'note' => '<string>',
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access_token: <api-key>",
"client_id: <api-key>",
"client_secret: <api-key>"
],
]);
$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.usecobalt.com/v1/appointments/{id}"
payload := strings.NewReader("{\n \"mrn\": \"<string>\",\n \"location\": \"<string>\",\n \"datetime\": \"<string>\",\n \"provider\": \"<string>\",\n \"type\": \"<string>\",\n \"note\": \"<string>\",\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("client_id", "<api-key>")
req.Header.Add("client_secret", "<api-key>")
req.Header.Add("access_token", "<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.patch("https://api.usecobalt.com/v1/appointments/{id}")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"mrn\": \"<string>\",\n \"location\": \"<string>\",\n \"datetime\": \"<string>\",\n \"provider\": \"<string>\",\n \"type\": \"<string>\",\n \"note\": \"<string>\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/appointments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["client_id"] = '<api-key>'
request["client_secret"] = '<api-key>'
request["access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mrn\": \"<string>\",\n \"location\": \"<string>\",\n \"datetime\": \"<string>\",\n \"provider\": \"<string>\",\n \"type\": \"<string>\",\n \"note\": \"<string>\",\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>"
}Appointments
Update Appointment
Updates an existing appointment. The update process differs based on the current status of the appointment.
PATCH
/
appointments
/
{id}
Update Appointment
curl --request PATCH \
--url https://api.usecobalt.com/v1/appointments/{id} \
--header 'Content-Type: application/json' \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>' \
--data '
{
"mrn": "<string>",
"location": "<string>",
"datetime": "<string>",
"provider": "<string>",
"type": "<string>",
"note": "<string>",
"reason": "<string>"
}
'import requests
url = "https://api.usecobalt.com/v1/appointments/{id}"
payload = {
"mrn": "<string>",
"location": "<string>",
"datetime": "<string>",
"provider": "<string>",
"type": "<string>",
"note": "<string>",
"reason": "<string>"
}
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
client_id: '<api-key>',
client_secret: '<api-key>',
access_token: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
mrn: '<string>',
location: '<string>',
datetime: '<string>',
provider: '<string>',
type: '<string>',
note: '<string>',
reason: '<string>'
})
};
fetch('https://api.usecobalt.com/v1/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://api.usecobalt.com/v1/appointments/{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([
'mrn' => '<string>',
'location' => '<string>',
'datetime' => '<string>',
'provider' => '<string>',
'type' => '<string>',
'note' => '<string>',
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access_token: <api-key>",
"client_id: <api-key>",
"client_secret: <api-key>"
],
]);
$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.usecobalt.com/v1/appointments/{id}"
payload := strings.NewReader("{\n \"mrn\": \"<string>\",\n \"location\": \"<string>\",\n \"datetime\": \"<string>\",\n \"provider\": \"<string>\",\n \"type\": \"<string>\",\n \"note\": \"<string>\",\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("client_id", "<api-key>")
req.Header.Add("client_secret", "<api-key>")
req.Header.Add("access_token", "<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.patch("https://api.usecobalt.com/v1/appointments/{id}")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"mrn\": \"<string>\",\n \"location\": \"<string>\",\n \"datetime\": \"<string>\",\n \"provider\": \"<string>\",\n \"type\": \"<string>\",\n \"note\": \"<string>\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/appointments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["client_id"] = '<api-key>'
request["client_secret"] = '<api-key>'
request["access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mrn\": \"<string>\",\n \"location\": \"<string>\",\n \"datetime\": \"<string>\",\n \"provider\": \"<string>\",\n \"type\": \"<string>\",\n \"note\": \"<string>\",\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>"
}Use the Cobalt
id in the URL path. The {id} parameter should be the Cobalt appointment ID returned from API responses or GET endpoints, not the EHR ID.1. Updating Pending or Failed Appointments
For appointments with a status of ‘pending’ or ‘failed’, you can update any attribute of the appointment.| Parameter | Type | Required | Description |
|---|---|---|---|
| Any appointment attribute | varies | No | Any attribute of the appointment can be updated. All fields are optional. |
2. Updating Scheduled Appointments
For appointments with a status of ‘scheduled’, you can update the status, note, or visit type.| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | No | Must be one of the available statuses associated with the linked account. You can find the available statuses by using our GET /visit-statuses endpoint |
| note | string | No | A note associated with the appointment. This is not a progress note or addition to the patient chart. This is primarily used for admin (eg. “patient might be 5 minutes late”). |
| type | string | No | eClinicalWorks only. The new visit type for the appointment. Must be one of the visit types from GET /v1/visit-types, and must be available for the appointment’s provider/resource in the EHR (skippable via skip_visit_type_validation). The appointment’s duration is updated to the new visit type’s configured duration unless duration is provided. |
| duration | string | No | Only valid together with type. The new appointment duration in minutes, as a positive integer string. Overrides the new visit type’s configured duration. Required when skip_visit_type_validation is "true". |
| skip_visit_type_validation | string | No | Only valid together with type. When "true", skips the check that the visit type is configured for the appointment’s provider/resource in the EHR. Use this for visit types that are bookable in the EHR (for example via availability slots) but not part of the resource’s configured visit type list. Requires duration. |
Example Request for Updating a Pending/Failed Appointment
curl -X PATCH https://api.usecobalt.com/v1/appointments/23456789 \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
"appointment_datetime": "2024-01-15T14:00:00-07:00",
"location": "New Clinic",
"type": "f/u"
}'
Example Response
{
"success": true,
"message": "Appointment updated successfully"
}
Authorizations
Path Parameters
The appointment ID
Body
application/json
⌘I