Create Event
curl --request POST \
--url https://api.decodahealth.com/check-in/calendar/create \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"organizerId": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"title": "<string>",
"locationId": "<string>",
"locationIds": [
"<string>"
],
"roomId": "<string>",
"attendeeIds": [
"<string>"
],
"segments": [
{
"serviceId": "<string>",
"type": "SERVICE",
"providerId": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"isArchived": false,
"serviceAddonId": "<string>"
}
],
"bookableIds": [
"<string>"
],
"recurringEvent": {
"rrule": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"durationMinutes": 123,
"timezone": "<string>",
"id": "<string>",
"segments": [
{
"serviceId": "<string>",
"bookableId": "<string>",
"bookableGroupId": "<string>",
"providerId": "<string>",
"title": "<string>",
"color": "<string>",
"durationMinutes": 123,
"bufferMinutes": 123,
"offsetMinutes": 123
}
],
"serviceIds": [
"<string>"
],
"bookableIds": [
"<string>"
],
"capacity": 123,
"description": "<string>",
"patientRequestedProvider": true,
"isBusinessBlock": true
},
"confirmationText": "<string>",
"capacity": 123,
"externalId": "<string>",
"description": "<string>",
"opportunityId": "<string>",
"patientRequestedProvider": true,
"isBusinessBlock": true
}
'import requests
url = "https://api.decodahealth.com/check-in/calendar/create"
payload = {
"organizerId": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"title": "<string>",
"locationId": "<string>",
"locationIds": ["<string>"],
"roomId": "<string>",
"attendeeIds": ["<string>"],
"segments": [
{
"serviceId": "<string>",
"type": "SERVICE",
"providerId": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"isArchived": False,
"serviceAddonId": "<string>"
}
],
"bookableIds": ["<string>"],
"recurringEvent": {
"rrule": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"durationMinutes": 123,
"timezone": "<string>",
"id": "<string>",
"segments": [
{
"serviceId": "<string>",
"bookableId": "<string>",
"bookableGroupId": "<string>",
"providerId": "<string>",
"title": "<string>",
"color": "<string>",
"durationMinutes": 123,
"bufferMinutes": 123,
"offsetMinutes": 123
}
],
"serviceIds": ["<string>"],
"bookableIds": ["<string>"],
"capacity": 123,
"description": "<string>",
"patientRequestedProvider": True,
"isBusinessBlock": True
},
"confirmationText": "<string>",
"capacity": 123,
"externalId": "<string>",
"description": "<string>",
"opportunityId": "<string>",
"patientRequestedProvider": True,
"isBusinessBlock": True
}
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
organizerId: '<string>',
start: '2023-11-07T05:31:56Z',
end: '2023-11-07T05:31:56Z',
title: '<string>',
locationId: '<string>',
locationIds: ['<string>'],
roomId: '<string>',
attendeeIds: ['<string>'],
segments: [
{
serviceId: '<string>',
type: 'SERVICE',
providerId: '<string>',
start: '2023-11-07T05:31:56Z',
end: '2023-11-07T05:31:56Z',
externalId: '<string>',
isArchived: false,
serviceAddonId: '<string>'
}
],
bookableIds: ['<string>'],
recurringEvent: {
rrule: '<string>',
startDate: '2023-11-07T05:31:56Z',
durationMinutes: 123,
timezone: '<string>',
id: '<string>',
segments: [
{
serviceId: '<string>',
bookableId: '<string>',
bookableGroupId: '<string>',
providerId: '<string>',
title: '<string>',
color: '<string>',
durationMinutes: 123,
bufferMinutes: 123,
offsetMinutes: 123
}
],
serviceIds: ['<string>'],
bookableIds: ['<string>'],
capacity: 123,
description: '<string>',
patientRequestedProvider: true,
isBusinessBlock: true
},
confirmationText: '<string>',
capacity: 123,
externalId: '<string>',
description: '<string>',
opportunityId: '<string>',
patientRequestedProvider: true,
isBusinessBlock: true
})
};
fetch('https://api.decodahealth.com/check-in/calendar/create', 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.decodahealth.com/check-in/calendar/create",
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([
'organizerId' => '<string>',
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z',
'title' => '<string>',
'locationId' => '<string>',
'locationIds' => [
'<string>'
],
'roomId' => '<string>',
'attendeeIds' => [
'<string>'
],
'segments' => [
[
'serviceId' => '<string>',
'type' => 'SERVICE',
'providerId' => '<string>',
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z',
'externalId' => '<string>',
'isArchived' => false,
'serviceAddonId' => '<string>'
]
],
'bookableIds' => [
'<string>'
],
'recurringEvent' => [
'rrule' => '<string>',
'startDate' => '2023-11-07T05:31:56Z',
'durationMinutes' => 123,
'timezone' => '<string>',
'id' => '<string>',
'segments' => [
[
'serviceId' => '<string>',
'bookableId' => '<string>',
'bookableGroupId' => '<string>',
'providerId' => '<string>',
'title' => '<string>',
'color' => '<string>',
'durationMinutes' => 123,
'bufferMinutes' => 123,
'offsetMinutes' => 123
]
],
'serviceIds' => [
'<string>'
],
'bookableIds' => [
'<string>'
],
'capacity' => 123,
'description' => '<string>',
'patientRequestedProvider' => true,
'isBusinessBlock' => true
],
'confirmationText' => '<string>',
'capacity' => 123,
'externalId' => '<string>',
'description' => '<string>',
'opportunityId' => '<string>',
'patientRequestedProvider' => true,
'isBusinessBlock' => true
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: application/json",
"TENANT: <tenant>"
],
]);
$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.decodahealth.com/check-in/calendar/create"
payload := strings.NewReader("{\n \"organizerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"locationId\": \"<string>\",\n \"locationIds\": [\n \"<string>\"\n ],\n \"roomId\": \"<string>\",\n \"attendeeIds\": [\n \"<string>\"\n ],\n \"segments\": [\n {\n \"serviceId\": \"<string>\",\n \"type\": \"SERVICE\",\n \"providerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"externalId\": \"<string>\",\n \"isArchived\": false,\n \"serviceAddonId\": \"<string>\"\n }\n ],\n \"bookableIds\": [\n \"<string>\"\n ],\n \"recurringEvent\": {\n \"rrule\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"durationMinutes\": 123,\n \"timezone\": \"<string>\",\n \"id\": \"<string>\",\n \"segments\": [\n {\n \"serviceId\": \"<string>\",\n \"bookableId\": \"<string>\",\n \"bookableGroupId\": \"<string>\",\n \"providerId\": \"<string>\",\n \"title\": \"<string>\",\n \"color\": \"<string>\",\n \"durationMinutes\": 123,\n \"bufferMinutes\": 123,\n \"offsetMinutes\": 123\n }\n ],\n \"serviceIds\": [\n \"<string>\"\n ],\n \"bookableIds\": [\n \"<string>\"\n ],\n \"capacity\": 123,\n \"description\": \"<string>\",\n \"patientRequestedProvider\": true,\n \"isBusinessBlock\": true\n },\n \"confirmationText\": \"<string>\",\n \"capacity\": 123,\n \"externalId\": \"<string>\",\n \"description\": \"<string>\",\n \"opportunityId\": \"<string>\",\n \"patientRequestedProvider\": true,\n \"isBusinessBlock\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("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.decodahealth.com/check-in/calendar/create")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"organizerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"locationId\": \"<string>\",\n \"locationIds\": [\n \"<string>\"\n ],\n \"roomId\": \"<string>\",\n \"attendeeIds\": [\n \"<string>\"\n ],\n \"segments\": [\n {\n \"serviceId\": \"<string>\",\n \"type\": \"SERVICE\",\n \"providerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"externalId\": \"<string>\",\n \"isArchived\": false,\n \"serviceAddonId\": \"<string>\"\n }\n ],\n \"bookableIds\": [\n \"<string>\"\n ],\n \"recurringEvent\": {\n \"rrule\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"durationMinutes\": 123,\n \"timezone\": \"<string>\",\n \"id\": \"<string>\",\n \"segments\": [\n {\n \"serviceId\": \"<string>\",\n \"bookableId\": \"<string>\",\n \"bookableGroupId\": \"<string>\",\n \"providerId\": \"<string>\",\n \"title\": \"<string>\",\n \"color\": \"<string>\",\n \"durationMinutes\": 123,\n \"bufferMinutes\": 123,\n \"offsetMinutes\": 123\n }\n ],\n \"serviceIds\": [\n \"<string>\"\n ],\n \"bookableIds\": [\n \"<string>\"\n ],\n \"capacity\": 123,\n \"description\": \"<string>\",\n \"patientRequestedProvider\": true,\n \"isBusinessBlock\": true\n },\n \"confirmationText\": \"<string>\",\n \"capacity\": 123,\n \"externalId\": \"<string>\",\n \"description\": \"<string>\",\n \"opportunityId\": \"<string>\",\n \"patientRequestedProvider\": true,\n \"isBusinessBlock\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/check-in/calendar/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"organizerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"locationId\": \"<string>\",\n \"locationIds\": [\n \"<string>\"\n ],\n \"roomId\": \"<string>\",\n \"attendeeIds\": [\n \"<string>\"\n ],\n \"segments\": [\n {\n \"serviceId\": \"<string>\",\n \"type\": \"SERVICE\",\n \"providerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"externalId\": \"<string>\",\n \"isArchived\": false,\n \"serviceAddonId\": \"<string>\"\n }\n ],\n \"bookableIds\": [\n \"<string>\"\n ],\n \"recurringEvent\": {\n \"rrule\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"durationMinutes\": 123,\n \"timezone\": \"<string>\",\n \"id\": \"<string>\",\n \"segments\": [\n {\n \"serviceId\": \"<string>\",\n \"bookableId\": \"<string>\",\n \"bookableGroupId\": \"<string>\",\n \"providerId\": \"<string>\",\n \"title\": \"<string>\",\n \"color\": \"<string>\",\n \"durationMinutes\": 123,\n \"bufferMinutes\": 123,\n \"offsetMinutes\": 123\n }\n ],\n \"serviceIds\": [\n \"<string>\"\n ],\n \"bookableIds\": [\n \"<string>\"\n ],\n \"capacity\": 123,\n \"description\": \"<string>\",\n \"patientRequestedProvider\": true,\n \"isBusinessBlock\": true\n },\n \"confirmationText\": \"<string>\",\n \"capacity\": 123,\n \"externalId\": \"<string>\",\n \"description\": \"<string>\",\n \"opportunityId\": \"<string>\",\n \"patientRequestedProvider\": true,\n \"isBusinessBlock\": true\n}"
response = http.request(request)
puts response.read_body{
"events": [
{
"id": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"organizer": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>"
},
"title": "<string>",
"isAllDay": false,
"location": {
"id": "<string>",
"isVirtual": true,
"name": "<string>",
"addressLineOne": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"timezone": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"spakinectLocationId": "<string>",
"dosespotClinicId": "<string>",
"dosespotClinicKey": "<string>",
"externalId": "<string>",
"taxIdentificationNumber": "<string>"
},
"roomId": "<string>",
"attendees": [],
"recurringEventId": "<string>",
"recurringEvent": {
"id": "<string>",
"rrule": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"durationMinutes": 123,
"timezone": "<string>",
"organizerId": "<string>",
"segments": [
{
"serviceId": "<string>",
"bookableId": "<string>",
"bookableGroupId": "<string>",
"providerId": "<string>",
"title": "<string>",
"color": "<string>",
"durationMinutes": 123,
"bufferMinutes": 123,
"offsetMinutes": 123
}
],
"serviceIds": [
"<string>"
],
"bookableIds": [
"<string>"
],
"capacity": 123,
"description": "<string>",
"patientRequestedProvider": true,
"isBusinessBlock": true,
"title": "<string>",
"attendeeIds": [
"<string>"
],
"locationId": "<string>",
"externalId": "<string>"
},
"segments": [],
"icons": [],
"capacity": 123,
"quickNotes": [
{
"id": "<string>",
"patientId": "<string>",
"note": "<string>",
"creator": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>"
},
"createdDate": "2023-11-07T05:31:56Z",
"eventId": "<string>",
"externalId": "<string>",
"updatedDate": "2023-11-07T05:31:56Z",
"isArchived": false,
"isPinned": false
}
],
"carePlan": {
"carePlanId": "<string>",
"stepNumber": 123,
"carePlanName": "<string>",
"status": "<string>"
},
"createdDate": "2023-11-07T05:31:56Z",
"updatedDate": "2023-11-07T05:31:56Z",
"meetingLink": "<string>",
"description": "<string>",
"gcalBusy": true,
"patientRequestedProvider": false,
"isBusinessBlock": false,
"locationId": "<string>",
"formCompleted": true,
"reminders": [],
"attribution": {
"staffId": "<string>",
"sourceId": "<string>",
"attributedAt": "2023-11-07T05:31:56Z"
}
}
],
"status": "success",
"googleCalendarFailures": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Calendar and Appointments
Create Event
Create a calendar event (appointment, shift, or block), optionally recurring and across multiple locations.
POST
/
check-in
/
calendar
/
create
Create Event
curl --request POST \
--url https://api.decodahealth.com/check-in/calendar/create \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"organizerId": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"title": "<string>",
"locationId": "<string>",
"locationIds": [
"<string>"
],
"roomId": "<string>",
"attendeeIds": [
"<string>"
],
"segments": [
{
"serviceId": "<string>",
"type": "SERVICE",
"providerId": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"isArchived": false,
"serviceAddonId": "<string>"
}
],
"bookableIds": [
"<string>"
],
"recurringEvent": {
"rrule": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"durationMinutes": 123,
"timezone": "<string>",
"id": "<string>",
"segments": [
{
"serviceId": "<string>",
"bookableId": "<string>",
"bookableGroupId": "<string>",
"providerId": "<string>",
"title": "<string>",
"color": "<string>",
"durationMinutes": 123,
"bufferMinutes": 123,
"offsetMinutes": 123
}
],
"serviceIds": [
"<string>"
],
"bookableIds": [
"<string>"
],
"capacity": 123,
"description": "<string>",
"patientRequestedProvider": true,
"isBusinessBlock": true
},
"confirmationText": "<string>",
"capacity": 123,
"externalId": "<string>",
"description": "<string>",
"opportunityId": "<string>",
"patientRequestedProvider": true,
"isBusinessBlock": true
}
'import requests
url = "https://api.decodahealth.com/check-in/calendar/create"
payload = {
"organizerId": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"title": "<string>",
"locationId": "<string>",
"locationIds": ["<string>"],
"roomId": "<string>",
"attendeeIds": ["<string>"],
"segments": [
{
"serviceId": "<string>",
"type": "SERVICE",
"providerId": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"isArchived": False,
"serviceAddonId": "<string>"
}
],
"bookableIds": ["<string>"],
"recurringEvent": {
"rrule": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"durationMinutes": 123,
"timezone": "<string>",
"id": "<string>",
"segments": [
{
"serviceId": "<string>",
"bookableId": "<string>",
"bookableGroupId": "<string>",
"providerId": "<string>",
"title": "<string>",
"color": "<string>",
"durationMinutes": 123,
"bufferMinutes": 123,
"offsetMinutes": 123
}
],
"serviceIds": ["<string>"],
"bookableIds": ["<string>"],
"capacity": 123,
"description": "<string>",
"patientRequestedProvider": True,
"isBusinessBlock": True
},
"confirmationText": "<string>",
"capacity": 123,
"externalId": "<string>",
"description": "<string>",
"opportunityId": "<string>",
"patientRequestedProvider": True,
"isBusinessBlock": True
}
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
organizerId: '<string>',
start: '2023-11-07T05:31:56Z',
end: '2023-11-07T05:31:56Z',
title: '<string>',
locationId: '<string>',
locationIds: ['<string>'],
roomId: '<string>',
attendeeIds: ['<string>'],
segments: [
{
serviceId: '<string>',
type: 'SERVICE',
providerId: '<string>',
start: '2023-11-07T05:31:56Z',
end: '2023-11-07T05:31:56Z',
externalId: '<string>',
isArchived: false,
serviceAddonId: '<string>'
}
],
bookableIds: ['<string>'],
recurringEvent: {
rrule: '<string>',
startDate: '2023-11-07T05:31:56Z',
durationMinutes: 123,
timezone: '<string>',
id: '<string>',
segments: [
{
serviceId: '<string>',
bookableId: '<string>',
bookableGroupId: '<string>',
providerId: '<string>',
title: '<string>',
color: '<string>',
durationMinutes: 123,
bufferMinutes: 123,
offsetMinutes: 123
}
],
serviceIds: ['<string>'],
bookableIds: ['<string>'],
capacity: 123,
description: '<string>',
patientRequestedProvider: true,
isBusinessBlock: true
},
confirmationText: '<string>',
capacity: 123,
externalId: '<string>',
description: '<string>',
opportunityId: '<string>',
patientRequestedProvider: true,
isBusinessBlock: true
})
};
fetch('https://api.decodahealth.com/check-in/calendar/create', 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.decodahealth.com/check-in/calendar/create",
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([
'organizerId' => '<string>',
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z',
'title' => '<string>',
'locationId' => '<string>',
'locationIds' => [
'<string>'
],
'roomId' => '<string>',
'attendeeIds' => [
'<string>'
],
'segments' => [
[
'serviceId' => '<string>',
'type' => 'SERVICE',
'providerId' => '<string>',
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z',
'externalId' => '<string>',
'isArchived' => false,
'serviceAddonId' => '<string>'
]
],
'bookableIds' => [
'<string>'
],
'recurringEvent' => [
'rrule' => '<string>',
'startDate' => '2023-11-07T05:31:56Z',
'durationMinutes' => 123,
'timezone' => '<string>',
'id' => '<string>',
'segments' => [
[
'serviceId' => '<string>',
'bookableId' => '<string>',
'bookableGroupId' => '<string>',
'providerId' => '<string>',
'title' => '<string>',
'color' => '<string>',
'durationMinutes' => 123,
'bufferMinutes' => 123,
'offsetMinutes' => 123
]
],
'serviceIds' => [
'<string>'
],
'bookableIds' => [
'<string>'
],
'capacity' => 123,
'description' => '<string>',
'patientRequestedProvider' => true,
'isBusinessBlock' => true
],
'confirmationText' => '<string>',
'capacity' => 123,
'externalId' => '<string>',
'description' => '<string>',
'opportunityId' => '<string>',
'patientRequestedProvider' => true,
'isBusinessBlock' => true
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: application/json",
"TENANT: <tenant>"
],
]);
$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.decodahealth.com/check-in/calendar/create"
payload := strings.NewReader("{\n \"organizerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"locationId\": \"<string>\",\n \"locationIds\": [\n \"<string>\"\n ],\n \"roomId\": \"<string>\",\n \"attendeeIds\": [\n \"<string>\"\n ],\n \"segments\": [\n {\n \"serviceId\": \"<string>\",\n \"type\": \"SERVICE\",\n \"providerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"externalId\": \"<string>\",\n \"isArchived\": false,\n \"serviceAddonId\": \"<string>\"\n }\n ],\n \"bookableIds\": [\n \"<string>\"\n ],\n \"recurringEvent\": {\n \"rrule\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"durationMinutes\": 123,\n \"timezone\": \"<string>\",\n \"id\": \"<string>\",\n \"segments\": [\n {\n \"serviceId\": \"<string>\",\n \"bookableId\": \"<string>\",\n \"bookableGroupId\": \"<string>\",\n \"providerId\": \"<string>\",\n \"title\": \"<string>\",\n \"color\": \"<string>\",\n \"durationMinutes\": 123,\n \"bufferMinutes\": 123,\n \"offsetMinutes\": 123\n }\n ],\n \"serviceIds\": [\n \"<string>\"\n ],\n \"bookableIds\": [\n \"<string>\"\n ],\n \"capacity\": 123,\n \"description\": \"<string>\",\n \"patientRequestedProvider\": true,\n \"isBusinessBlock\": true\n },\n \"confirmationText\": \"<string>\",\n \"capacity\": 123,\n \"externalId\": \"<string>\",\n \"description\": \"<string>\",\n \"opportunityId\": \"<string>\",\n \"patientRequestedProvider\": true,\n \"isBusinessBlock\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("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.decodahealth.com/check-in/calendar/create")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"organizerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"locationId\": \"<string>\",\n \"locationIds\": [\n \"<string>\"\n ],\n \"roomId\": \"<string>\",\n \"attendeeIds\": [\n \"<string>\"\n ],\n \"segments\": [\n {\n \"serviceId\": \"<string>\",\n \"type\": \"SERVICE\",\n \"providerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"externalId\": \"<string>\",\n \"isArchived\": false,\n \"serviceAddonId\": \"<string>\"\n }\n ],\n \"bookableIds\": [\n \"<string>\"\n ],\n \"recurringEvent\": {\n \"rrule\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"durationMinutes\": 123,\n \"timezone\": \"<string>\",\n \"id\": \"<string>\",\n \"segments\": [\n {\n \"serviceId\": \"<string>\",\n \"bookableId\": \"<string>\",\n \"bookableGroupId\": \"<string>\",\n \"providerId\": \"<string>\",\n \"title\": \"<string>\",\n \"color\": \"<string>\",\n \"durationMinutes\": 123,\n \"bufferMinutes\": 123,\n \"offsetMinutes\": 123\n }\n ],\n \"serviceIds\": [\n \"<string>\"\n ],\n \"bookableIds\": [\n \"<string>\"\n ],\n \"capacity\": 123,\n \"description\": \"<string>\",\n \"patientRequestedProvider\": true,\n \"isBusinessBlock\": true\n },\n \"confirmationText\": \"<string>\",\n \"capacity\": 123,\n \"externalId\": \"<string>\",\n \"description\": \"<string>\",\n \"opportunityId\": \"<string>\",\n \"patientRequestedProvider\": true,\n \"isBusinessBlock\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/check-in/calendar/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"organizerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"locationId\": \"<string>\",\n \"locationIds\": [\n \"<string>\"\n ],\n \"roomId\": \"<string>\",\n \"attendeeIds\": [\n \"<string>\"\n ],\n \"segments\": [\n {\n \"serviceId\": \"<string>\",\n \"type\": \"SERVICE\",\n \"providerId\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"externalId\": \"<string>\",\n \"isArchived\": false,\n \"serviceAddonId\": \"<string>\"\n }\n ],\n \"bookableIds\": [\n \"<string>\"\n ],\n \"recurringEvent\": {\n \"rrule\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"durationMinutes\": 123,\n \"timezone\": \"<string>\",\n \"id\": \"<string>\",\n \"segments\": [\n {\n \"serviceId\": \"<string>\",\n \"bookableId\": \"<string>\",\n \"bookableGroupId\": \"<string>\",\n \"providerId\": \"<string>\",\n \"title\": \"<string>\",\n \"color\": \"<string>\",\n \"durationMinutes\": 123,\n \"bufferMinutes\": 123,\n \"offsetMinutes\": 123\n }\n ],\n \"serviceIds\": [\n \"<string>\"\n ],\n \"bookableIds\": [\n \"<string>\"\n ],\n \"capacity\": 123,\n \"description\": \"<string>\",\n \"patientRequestedProvider\": true,\n \"isBusinessBlock\": true\n },\n \"confirmationText\": \"<string>\",\n \"capacity\": 123,\n \"externalId\": \"<string>\",\n \"description\": \"<string>\",\n \"opportunityId\": \"<string>\",\n \"patientRequestedProvider\": true,\n \"isBusinessBlock\": true\n}"
response = http.request(request)
puts response.read_body{
"events": [
{
"id": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"organizer": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>"
},
"title": "<string>",
"isAllDay": false,
"location": {
"id": "<string>",
"isVirtual": true,
"name": "<string>",
"addressLineOne": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"timezone": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"spakinectLocationId": "<string>",
"dosespotClinicId": "<string>",
"dosespotClinicKey": "<string>",
"externalId": "<string>",
"taxIdentificationNumber": "<string>"
},
"roomId": "<string>",
"attendees": [],
"recurringEventId": "<string>",
"recurringEvent": {
"id": "<string>",
"rrule": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"durationMinutes": 123,
"timezone": "<string>",
"organizerId": "<string>",
"segments": [
{
"serviceId": "<string>",
"bookableId": "<string>",
"bookableGroupId": "<string>",
"providerId": "<string>",
"title": "<string>",
"color": "<string>",
"durationMinutes": 123,
"bufferMinutes": 123,
"offsetMinutes": 123
}
],
"serviceIds": [
"<string>"
],
"bookableIds": [
"<string>"
],
"capacity": 123,
"description": "<string>",
"patientRequestedProvider": true,
"isBusinessBlock": true,
"title": "<string>",
"attendeeIds": [
"<string>"
],
"locationId": "<string>",
"externalId": "<string>"
},
"segments": [],
"icons": [],
"capacity": 123,
"quickNotes": [
{
"id": "<string>",
"patientId": "<string>",
"note": "<string>",
"creator": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>"
},
"createdDate": "2023-11-07T05:31:56Z",
"eventId": "<string>",
"externalId": "<string>",
"updatedDate": "2023-11-07T05:31:56Z",
"isArchived": false,
"isPinned": false
}
],
"carePlan": {
"carePlanId": "<string>",
"stepNumber": 123,
"carePlanName": "<string>",
"status": "<string>"
},
"createdDate": "2023-11-07T05:31:56Z",
"updatedDate": "2023-11-07T05:31:56Z",
"meetingLink": "<string>",
"description": "<string>",
"gcalBusy": true,
"patientRequestedProvider": false,
"isBusinessBlock": false,
"locationId": "<string>",
"formCompleted": true,
"reminders": [],
"attribution": {
"staffId": "<string>",
"sourceId": "<string>",
"attributedAt": "2023-11-07T05:31:56Z"
}
}
],
"status": "success",
"googleCalendarFailures": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
The tenant you are making this request on behalf of
Your api key
Query Parameters
Body
application/json
Available options:
APPOINTMENT, SHIFT, BLOCK, GOOGLE_CALENDAR segments
(EventServiceCreate · object | EventBookableSegmentCreate · object | EventPrepSegmentCreate · object | EventCleanupSegmentCreate · object)[] | null
Service segment creation request.
- EventServiceCreate
- EventBookableSegmentCreate
- EventPrepSegmentCreate
- EventCleanupSegmentCreate
Show child attributes
Show child attributes
Request schema for recurring events.
Use segments for appointments that need provider assignments per service.
Use service_ids for shifts/blocks that don't require provider-specific assignments.
Show child attributes
Show child attributes
⌘I
