Create appointment
curl --request POST \
--url https://api.clinikapi.com/v1/appointments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"patientId": "<string>",
"practitionerId": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"minutesDuration": 123,
"appointmentType": "<string>",
"serviceType": "<string>",
"serviceCategory": "<string>",
"specialty": "<string>",
"reasonCode": "<string>",
"priority": 4,
"description": "<string>",
"comment": "<string>",
"patientInstruction": "<string>",
"cancelationReason": "<string>",
"basedOnId": "<string>",
"requestedPeriod": [
{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
}
],
"created": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.clinikapi.com/v1/appointments"
payload = {
"patientId": "<string>",
"practitionerId": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"minutesDuration": 123,
"appointmentType": "<string>",
"serviceType": "<string>",
"serviceCategory": "<string>",
"specialty": "<string>",
"reasonCode": "<string>",
"priority": 4,
"description": "<string>",
"comment": "<string>",
"patientInstruction": "<string>",
"cancelationReason": "<string>",
"basedOnId": "<string>",
"requestedPeriod": [
{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
}
],
"created": "2023-11-07T05:31:56Z"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
patientId: '<string>',
practitionerId: '<string>',
start: '2023-11-07T05:31:56Z',
end: '2023-11-07T05:31:56Z',
minutesDuration: 123,
appointmentType: '<string>',
serviceType: '<string>',
serviceCategory: '<string>',
specialty: '<string>',
reasonCode: '<string>',
priority: 4,
description: '<string>',
comment: '<string>',
patientInstruction: '<string>',
cancelationReason: '<string>',
basedOnId: '<string>',
requestedPeriod: [{start: '2023-11-07T05:31:56Z', end: '2023-11-07T05:31:56Z'}],
created: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.clinikapi.com/v1/appointments', 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.clinikapi.com/v1/appointments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'patientId' => '<string>',
'practitionerId' => '<string>',
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z',
'minutesDuration' => 123,
'appointmentType' => '<string>',
'serviceType' => '<string>',
'serviceCategory' => '<string>',
'specialty' => '<string>',
'reasonCode' => '<string>',
'priority' => 4,
'description' => '<string>',
'comment' => '<string>',
'patientInstruction' => '<string>',
'cancelationReason' => '<string>',
'basedOnId' => '<string>',
'requestedPeriod' => [
[
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z'
]
],
'created' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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.clinikapi.com/v1/appointments"
payload := strings.NewReader("{\n \"patientId\": \"<string>\",\n \"practitionerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"minutesDuration\": 123,\n \"appointmentType\": \"<string>\",\n \"serviceType\": \"<string>\",\n \"serviceCategory\": \"<string>\",\n \"specialty\": \"<string>\",\n \"reasonCode\": \"<string>\",\n \"priority\": 4,\n \"description\": \"<string>\",\n \"comment\": \"<string>\",\n \"patientInstruction\": \"<string>\",\n \"cancelationReason\": \"<string>\",\n \"basedOnId\": \"<string>\",\n \"requestedPeriod\": [\n {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"created\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-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.post("https://api.clinikapi.com/v1/appointments")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"patientId\": \"<string>\",\n \"practitionerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"minutesDuration\": 123,\n \"appointmentType\": \"<string>\",\n \"serviceType\": \"<string>\",\n \"serviceCategory\": \"<string>\",\n \"specialty\": \"<string>\",\n \"reasonCode\": \"<string>\",\n \"priority\": 4,\n \"description\": \"<string>\",\n \"comment\": \"<string>\",\n \"patientInstruction\": \"<string>\",\n \"cancelationReason\": \"<string>\",\n \"basedOnId\": \"<string>\",\n \"requestedPeriod\": [\n {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"created\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clinikapi.com/v1/appointments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"patientId\": \"<string>\",\n \"practitionerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"minutesDuration\": 123,\n \"appointmentType\": \"<string>\",\n \"serviceType\": \"<string>\",\n \"serviceCategory\": \"<string>\",\n \"specialty\": \"<string>\",\n \"reasonCode\": \"<string>\",\n \"priority\": 4,\n \"description\": \"<string>\",\n \"comment\": \"<string>\",\n \"patientInstruction\": \"<string>\",\n \"cancelationReason\": \"<string>\",\n \"basedOnId\": \"<string>\",\n \"requestedPeriod\": [\n {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"created\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_bodyAppointments
Create Appointment
POST
/
v1
/
appointments
Create appointment
curl --request POST \
--url https://api.clinikapi.com/v1/appointments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"patientId": "<string>",
"practitionerId": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"minutesDuration": 123,
"appointmentType": "<string>",
"serviceType": "<string>",
"serviceCategory": "<string>",
"specialty": "<string>",
"reasonCode": "<string>",
"priority": 4,
"description": "<string>",
"comment": "<string>",
"patientInstruction": "<string>",
"cancelationReason": "<string>",
"basedOnId": "<string>",
"requestedPeriod": [
{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
}
],
"created": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.clinikapi.com/v1/appointments"
payload = {
"patientId": "<string>",
"practitionerId": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"minutesDuration": 123,
"appointmentType": "<string>",
"serviceType": "<string>",
"serviceCategory": "<string>",
"specialty": "<string>",
"reasonCode": "<string>",
"priority": 4,
"description": "<string>",
"comment": "<string>",
"patientInstruction": "<string>",
"cancelationReason": "<string>",
"basedOnId": "<string>",
"requestedPeriod": [
{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
}
],
"created": "2023-11-07T05:31:56Z"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
patientId: '<string>',
practitionerId: '<string>',
start: '2023-11-07T05:31:56Z',
end: '2023-11-07T05:31:56Z',
minutesDuration: 123,
appointmentType: '<string>',
serviceType: '<string>',
serviceCategory: '<string>',
specialty: '<string>',
reasonCode: '<string>',
priority: 4,
description: '<string>',
comment: '<string>',
patientInstruction: '<string>',
cancelationReason: '<string>',
basedOnId: '<string>',
requestedPeriod: [{start: '2023-11-07T05:31:56Z', end: '2023-11-07T05:31:56Z'}],
created: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.clinikapi.com/v1/appointments', 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.clinikapi.com/v1/appointments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'patientId' => '<string>',
'practitionerId' => '<string>',
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z',
'minutesDuration' => 123,
'appointmentType' => '<string>',
'serviceType' => '<string>',
'serviceCategory' => '<string>',
'specialty' => '<string>',
'reasonCode' => '<string>',
'priority' => 4,
'description' => '<string>',
'comment' => '<string>',
'patientInstruction' => '<string>',
'cancelationReason' => '<string>',
'basedOnId' => '<string>',
'requestedPeriod' => [
[
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z'
]
],
'created' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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.clinikapi.com/v1/appointments"
payload := strings.NewReader("{\n \"patientId\": \"<string>\",\n \"practitionerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"minutesDuration\": 123,\n \"appointmentType\": \"<string>\",\n \"serviceType\": \"<string>\",\n \"serviceCategory\": \"<string>\",\n \"specialty\": \"<string>\",\n \"reasonCode\": \"<string>\",\n \"priority\": 4,\n \"description\": \"<string>\",\n \"comment\": \"<string>\",\n \"patientInstruction\": \"<string>\",\n \"cancelationReason\": \"<string>\",\n \"basedOnId\": \"<string>\",\n \"requestedPeriod\": [\n {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"created\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-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.post("https://api.clinikapi.com/v1/appointments")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"patientId\": \"<string>\",\n \"practitionerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"minutesDuration\": 123,\n \"appointmentType\": \"<string>\",\n \"serviceType\": \"<string>\",\n \"serviceCategory\": \"<string>\",\n \"specialty\": \"<string>\",\n \"reasonCode\": \"<string>\",\n \"priority\": 4,\n \"description\": \"<string>\",\n \"comment\": \"<string>\",\n \"patientInstruction\": \"<string>\",\n \"cancelationReason\": \"<string>\",\n \"basedOnId\": \"<string>\",\n \"requestedPeriod\": [\n {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"created\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clinikapi.com/v1/appointments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"patientId\": \"<string>\",\n \"practitionerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"minutesDuration\": 123,\n \"appointmentType\": \"<string>\",\n \"serviceType\": \"<string>\",\n \"serviceCategory\": \"<string>\",\n \"specialty\": \"<string>\",\n \"reasonCode\": \"<string>\",\n \"priority\": 4,\n \"description\": \"<string>\",\n \"comment\": \"<string>\",\n \"patientInstruction\": \"<string>\",\n \"cancelationReason\": \"<string>\",\n \"basedOnId\": \"<string>\",\n \"requestedPeriod\": [\n {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"created\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Your ClinikAPI secret key (clk_live_* or clk_test_*)
Body
application/json
Available options:
proposed, pending, booked, arrived, fulfilled, cancelled, noshow, checked-in, waitlist Required range:
x <= 1440Type of appointment (routine, walkin, urgent, followup)
Maximum string length:
100Service being booked (e.g. cardiology consultation)
Maximum string length:
200Service category (general-practice, specialist, dental)
Maximum string length:
200Required specialty (e.g. cardiology, dermatology)
Maximum string length:
200Reason for the appointment
Maximum string length:
5000 = routine, 1-9 = increasing urgency
Required range:
0 <= x <= 9Shown on a subject line in a meeting request
Maximum string length:
2000Maximum string length:
2000Instructions for the patient (e.g. fast for 12 hours)
Maximum string length:
2000Reason for cancellation (when status is cancelled/noshow)
Maximum string length:
500ServiceRequest ID this appointment is allocated to assess
Preferred time windows for the appointment
Show child attributes
Show child attributes
When the appointment was initially created (defaults to now)
Response
201
Appointment created
⌘I