Update appointments
curl --request PATCH \
--url https://{clinic}.{region}.practicehub.io/v3/api/appointments/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"location_id": 123,
"appointment_type_id": 123,
"practitioner_id": 123,
"resource_id": 123,
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"columns": 123,
"note": "<string>",
"cancel_note": "<string>",
"cancel_reason_id": 123,
"metadata": {}
}
'import requests
url = "https://{clinic}.{region}.practicehub.io/v3/api/appointments/{id}"
payload = {
"location_id": 123,
"appointment_type_id": 123,
"practitioner_id": 123,
"resource_id": 123,
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"columns": 123,
"note": "<string>",
"cancel_note": "<string>",
"cancel_reason_id": 123,
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
location_id: 123,
appointment_type_id: 123,
practitioner_id: 123,
resource_id: 123,
start: '2023-11-07T05:31:56Z',
end: '2023-11-07T05:31:56Z',
columns: 123,
note: '<string>',
cancel_note: '<string>',
cancel_reason_id: 123,
metadata: {}
})
};
fetch('https://{clinic}.{region}.practicehub.io/v3/api/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://{clinic}.{region}.practicehub.io/v3/api/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([
'location_id' => 123,
'appointment_type_id' => 123,
'practitioner_id' => 123,
'resource_id' => 123,
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z',
'columns' => 123,
'note' => '<string>',
'cancel_note' => '<string>',
'cancel_reason_id' => 123,
'metadata' => [
]
]),
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://{clinic}.{region}.practicehub.io/v3/api/appointments/{id}"
payload := strings.NewReader("{\n \"location_id\": 123,\n \"appointment_type_id\": 123,\n \"practitioner_id\": 123,\n \"resource_id\": 123,\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"columns\": 123,\n \"note\": \"<string>\",\n \"cancel_note\": \"<string>\",\n \"cancel_reason_id\": 123,\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://{clinic}.{region}.practicehub.io/v3/api/appointments/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"location_id\": 123,\n \"appointment_type_id\": 123,\n \"practitioner_id\": 123,\n \"resource_id\": 123,\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"columns\": 123,\n \"note\": \"<string>\",\n \"cancel_note\": \"<string>\",\n \"cancel_reason_id\": 123,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{clinic}.{region}.practicehub.io/v3/api/appointments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"location_id\": 123,\n \"appointment_type_id\": 123,\n \"practitioner_id\": 123,\n \"resource_id\": 123,\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"columns\": 123,\n \"note\": \"<string>\",\n \"cancel_note\": \"<string>\",\n \"cancel_reason_id\": 123,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"appointment_type_id": 123,
"practitioner_id": 123,
"resource_id": 123,
"columns": 123,
"patient_id": 123,
"location_id": 123,
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"status": "pending",
"note": "<string>",
"is_group": "<string>",
"group_master_id": 123,
"group_total_attendees": "<string>",
"cancel_date": "<string>",
"cancel_note": "<string>",
"updated": "<string>",
"created": "<string>",
"metadata": {}
}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}Appointments
Update appointments
PATCH
https://{clinic}.{region}.practicehub.io/v3/api
/
appointments
/
{id}
Update appointments
curl --request PATCH \
--url https://{clinic}.{region}.practicehub.io/v3/api/appointments/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"location_id": 123,
"appointment_type_id": 123,
"practitioner_id": 123,
"resource_id": 123,
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"columns": 123,
"note": "<string>",
"cancel_note": "<string>",
"cancel_reason_id": 123,
"metadata": {}
}
'import requests
url = "https://{clinic}.{region}.practicehub.io/v3/api/appointments/{id}"
payload = {
"location_id": 123,
"appointment_type_id": 123,
"practitioner_id": 123,
"resource_id": 123,
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"columns": 123,
"note": "<string>",
"cancel_note": "<string>",
"cancel_reason_id": 123,
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
location_id: 123,
appointment_type_id: 123,
practitioner_id: 123,
resource_id: 123,
start: '2023-11-07T05:31:56Z',
end: '2023-11-07T05:31:56Z',
columns: 123,
note: '<string>',
cancel_note: '<string>',
cancel_reason_id: 123,
metadata: {}
})
};
fetch('https://{clinic}.{region}.practicehub.io/v3/api/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://{clinic}.{region}.practicehub.io/v3/api/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([
'location_id' => 123,
'appointment_type_id' => 123,
'practitioner_id' => 123,
'resource_id' => 123,
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z',
'columns' => 123,
'note' => '<string>',
'cancel_note' => '<string>',
'cancel_reason_id' => 123,
'metadata' => [
]
]),
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://{clinic}.{region}.practicehub.io/v3/api/appointments/{id}"
payload := strings.NewReader("{\n \"location_id\": 123,\n \"appointment_type_id\": 123,\n \"practitioner_id\": 123,\n \"resource_id\": 123,\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"columns\": 123,\n \"note\": \"<string>\",\n \"cancel_note\": \"<string>\",\n \"cancel_reason_id\": 123,\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://{clinic}.{region}.practicehub.io/v3/api/appointments/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"location_id\": 123,\n \"appointment_type_id\": 123,\n \"practitioner_id\": 123,\n \"resource_id\": 123,\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"columns\": 123,\n \"note\": \"<string>\",\n \"cancel_note\": \"<string>\",\n \"cancel_reason_id\": 123,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{clinic}.{region}.practicehub.io/v3/api/appointments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"location_id\": 123,\n \"appointment_type_id\": 123,\n \"practitioner_id\": 123,\n \"resource_id\": 123,\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"columns\": 123,\n \"note\": \"<string>\",\n \"cancel_note\": \"<string>\",\n \"cancel_reason_id\": 123,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"appointment_type_id": 123,
"practitioner_id": 123,
"resource_id": 123,
"columns": 123,
"patient_id": 123,
"location_id": 123,
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"status": "pending",
"note": "<string>",
"is_group": "<string>",
"group_master_id": 123,
"group_total_attendees": "<string>",
"cancel_date": "<string>",
"cancel_note": "<string>",
"updated": "<string>",
"created": "<string>",
"metadata": {}
}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}Authorizations
API key from Developers → API Keys, sent as Authorization: Bearer .
Path Parameters
Body
application/json
Format Y-m-d H:i:s
Format Y-m-d H:i:s
Maximum string length:
1000Available options:
pending, arrived, cancelled, missed Maximum string length:
1000Integrator-owned key/value metadata (max 50 keys). Values are strings (≤500 chars), numbers or booleans and read back with the type they were written with. On write, a null value removes the key. Filter with metadata[key]=op:value; number operands compare numerically.
Show child attributes
Show child attributes
Response
The resource
Show child attributes
Show child attributes
Was this page helpful?
⌘I