curl --request POST \
--url https://api.opencals.com/storefront/appointments \
--header 'Content-Type: application/json' \
--data '
{
"slot": {
"fromDate": "2023-06-15",
"fromTime": "09:00:00",
"toDate": "2023-06-15",
"toTime": "10:00:00",
"productId": "123e4567-e89b-12d3-a456-426614174001",
"locationId": "123e4567-e89b-12d3-a456-426614174002",
"staffMemberId": "123e4567-e89b-12d3-a456-426614174003"
},
"customer": {
"customerId": "123e4567-e89b-12d3-a456-426614174004"
},
"internalNote": "Customer requested extra attention for specific needs",
"address": {
"addressLine1": "123 Main Street",
"addressLine2": "Suite 456",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "USA"
},
"checkoutQuestionAnswers": [
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"question": "Do you have any allergies?",
"answer": "No allergies",
"fileIds": [
"<string>"
]
}
],
"numberOfAttendees": 1,
"cartId": "123e4567-e89b-12d3-a456-426614174005",
"addOns": [
{
"addOnId": "123e4567-e89b-12d3-a456-426614174006",
"quantity": 1
}
],
"guests": [
{
"email": "guest@example.com"
}
]
}
'import requests
url = "https://api.opencals.com/storefront/appointments"
payload = {
"slot": {
"fromDate": "2023-06-15",
"fromTime": "09:00:00",
"toDate": "2023-06-15",
"toTime": "10:00:00",
"productId": "123e4567-e89b-12d3-a456-426614174001",
"locationId": "123e4567-e89b-12d3-a456-426614174002",
"staffMemberId": "123e4567-e89b-12d3-a456-426614174003"
},
"customer": { "customerId": "123e4567-e89b-12d3-a456-426614174004" },
"internalNote": "Customer requested extra attention for specific needs",
"address": {
"addressLine1": "123 Main Street",
"addressLine2": "Suite 456",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "USA"
},
"checkoutQuestionAnswers": [
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"question": "Do you have any allergies?",
"answer": "No allergies",
"fileIds": ["<string>"]
}
],
"numberOfAttendees": 1,
"cartId": "123e4567-e89b-12d3-a456-426614174005",
"addOns": [
{
"addOnId": "123e4567-e89b-12d3-a456-426614174006",
"quantity": 1
}
],
"guests": [{ "email": "guest@example.com" }]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
slot: {
fromDate: '2023-06-15',
fromTime: '09:00:00',
toDate: '2023-06-15',
toTime: '10:00:00',
productId: '123e4567-e89b-12d3-a456-426614174001',
locationId: '123e4567-e89b-12d3-a456-426614174002',
staffMemberId: '123e4567-e89b-12d3-a456-426614174003'
},
customer: {customerId: '123e4567-e89b-12d3-a456-426614174004'},
internalNote: 'Customer requested extra attention for specific needs',
address: {
addressLine1: '123 Main Street',
addressLine2: 'Suite 456',
city: 'New York',
state: 'NY',
postalCode: '10001',
country: 'USA'
},
checkoutQuestionAnswers: [
{
questionId: '123e4567-e89b-12d3-a456-426614174000',
question: 'Do you have any allergies?',
answer: 'No allergies',
fileIds: ['<string>']
}
],
numberOfAttendees: 1,
cartId: '123e4567-e89b-12d3-a456-426614174005',
addOns: [{addOnId: '123e4567-e89b-12d3-a456-426614174006', quantity: 1}],
guests: [{email: 'guest@example.com'}]
})
};
fetch('https://api.opencals.com/storefront/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.opencals.com/storefront/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([
'slot' => [
'fromDate' => '2023-06-15',
'fromTime' => '09:00:00',
'toDate' => '2023-06-15',
'toTime' => '10:00:00',
'productId' => '123e4567-e89b-12d3-a456-426614174001',
'locationId' => '123e4567-e89b-12d3-a456-426614174002',
'staffMemberId' => '123e4567-e89b-12d3-a456-426614174003'
],
'customer' => [
'customerId' => '123e4567-e89b-12d3-a456-426614174004'
],
'internalNote' => 'Customer requested extra attention for specific needs',
'address' => [
'addressLine1' => '123 Main Street',
'addressLine2' => 'Suite 456',
'city' => 'New York',
'state' => 'NY',
'postalCode' => '10001',
'country' => 'USA'
],
'checkoutQuestionAnswers' => [
[
'questionId' => '123e4567-e89b-12d3-a456-426614174000',
'question' => 'Do you have any allergies?',
'answer' => 'No allergies',
'fileIds' => [
'<string>'
]
]
],
'numberOfAttendees' => 1,
'cartId' => '123e4567-e89b-12d3-a456-426614174005',
'addOns' => [
[
'addOnId' => '123e4567-e89b-12d3-a456-426614174006',
'quantity' => 1
]
],
'guests' => [
[
'email' => 'guest@example.com'
]
]
]),
CURLOPT_HTTPHEADER => [
"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://api.opencals.com/storefront/appointments"
payload := strings.NewReader("{\n \"slot\": {\n \"fromDate\": \"2023-06-15\",\n \"fromTime\": \"09:00:00\",\n \"toDate\": \"2023-06-15\",\n \"toTime\": \"10:00:00\",\n \"productId\": \"123e4567-e89b-12d3-a456-426614174001\",\n \"locationId\": \"123e4567-e89b-12d3-a456-426614174002\",\n \"staffMemberId\": \"123e4567-e89b-12d3-a456-426614174003\"\n },\n \"customer\": {\n \"customerId\": \"123e4567-e89b-12d3-a456-426614174004\"\n },\n \"internalNote\": \"Customer requested extra attention for specific needs\",\n \"address\": {\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Suite 456\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"USA\"\n },\n \"checkoutQuestionAnswers\": [\n {\n \"questionId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"question\": \"Do you have any allergies?\",\n \"answer\": \"No allergies\",\n \"fileIds\": [\n \"<string>\"\n ]\n }\n ],\n \"numberOfAttendees\": 1,\n \"cartId\": \"123e4567-e89b-12d3-a456-426614174005\",\n \"addOns\": [\n {\n \"addOnId\": \"123e4567-e89b-12d3-a456-426614174006\",\n \"quantity\": 1\n }\n ],\n \"guests\": [\n {\n \"email\": \"guest@example.com\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.opencals.com/storefront/appointments")
.header("Content-Type", "application/json")
.body("{\n \"slot\": {\n \"fromDate\": \"2023-06-15\",\n \"fromTime\": \"09:00:00\",\n \"toDate\": \"2023-06-15\",\n \"toTime\": \"10:00:00\",\n \"productId\": \"123e4567-e89b-12d3-a456-426614174001\",\n \"locationId\": \"123e4567-e89b-12d3-a456-426614174002\",\n \"staffMemberId\": \"123e4567-e89b-12d3-a456-426614174003\"\n },\n \"customer\": {\n \"customerId\": \"123e4567-e89b-12d3-a456-426614174004\"\n },\n \"internalNote\": \"Customer requested extra attention for specific needs\",\n \"address\": {\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Suite 456\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"USA\"\n },\n \"checkoutQuestionAnswers\": [\n {\n \"questionId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"question\": \"Do you have any allergies?\",\n \"answer\": \"No allergies\",\n \"fileIds\": [\n \"<string>\"\n ]\n }\n ],\n \"numberOfAttendees\": 1,\n \"cartId\": \"123e4567-e89b-12d3-a456-426614174005\",\n \"addOns\": [\n {\n \"addOnId\": \"123e4567-e89b-12d3-a456-426614174006\",\n \"quantity\": 1\n }\n ],\n \"guests\": [\n {\n \"email\": \"guest@example.com\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opencals.com/storefront/appointments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"slot\": {\n \"fromDate\": \"2023-06-15\",\n \"fromTime\": \"09:00:00\",\n \"toDate\": \"2023-06-15\",\n \"toTime\": \"10:00:00\",\n \"productId\": \"123e4567-e89b-12d3-a456-426614174001\",\n \"locationId\": \"123e4567-e89b-12d3-a456-426614174002\",\n \"staffMemberId\": \"123e4567-e89b-12d3-a456-426614174003\"\n },\n \"customer\": {\n \"customerId\": \"123e4567-e89b-12d3-a456-426614174004\"\n },\n \"internalNote\": \"Customer requested extra attention for specific needs\",\n \"address\": {\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Suite 456\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"USA\"\n },\n \"checkoutQuestionAnswers\": [\n {\n \"questionId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"question\": \"Do you have any allergies?\",\n \"answer\": \"No allergies\",\n \"fileIds\": [\n \"<string>\"\n ]\n }\n ],\n \"numberOfAttendees\": 1,\n \"cartId\": \"123e4567-e89b-12d3-a456-426614174005\",\n \"addOns\": [\n {\n \"addOnId\": \"123e4567-e89b-12d3-a456-426614174006\",\n \"quantity\": 1\n }\n ],\n \"guests\": [\n {\n \"email\": \"guest@example.com\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "1001",
"productId": "123e4567-e89b-12d3-a456-426614174001",
"staffMemberId": "123e4567-e89b-12d3-a456-426614174002",
"locationId": "123e4567-e89b-12d3-a456-426614174003",
"storeId": "123e4567-e89b-12d3-a456-426614174004",
"customerId": "123e4567-e89b-12d3-a456-426614174005",
"externalOrderId": "12345678",
"externalOrderName": "#1001",
"from": "2023-06-15T09:00:00Z",
"to": "2023-06-15T10:00:00Z",
"addressLine1": "123 Main Street",
"addressLine2": "Suite 456",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "USA",
"status": "scheduled",
"internalNote": "Customer requested extra attention for specific needs",
"createdBy": "customer",
"reminderSentAt": "2023-06-14T09:00:00Z",
"numberOfAttendees": 1,
"createdAt": "2023-06-01T10:30:00Z",
"updatedAt": "2023-06-02T14:15:00Z",
"deletedAt": "2023-06-03T09:45:00Z",
"product": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"productId": "123e4567-e89b-12d3-a456-426614174000",
"externalId": "1234567890",
"externalVariantId": "9876543210",
"storeId": "123e4567-e89b-12d3-a456-426614174001",
"slug": "haircut-basic",
"scheduleId": "<string>",
"productPoolId": "<string>",
"title": "Haircut Service",
"variantTitle": "Short Hair",
"description": "<string>",
"imageId": "<string>",
"color": "BLUE",
"price": 250,
"taxable": false,
"duration": 3600,
"allowCustomDuration": false,
"maxDuration": -1,
"maxAttendees": 1,
"maxGuests": 123,
"allowGuests": false,
"allowCustomerReschedule": false,
"allowCustomerCancel": false,
"rescheduleGap": 123,
"cancelGap": 123,
"beforeGap": 123,
"afterGap": 123,
"fixedTimes": false,
"fixedStartTime": "09:00:00",
"fixedEndTime": "17:00:00",
"advanceScheduleThreshold": 0,
"sendConfirmationEmail": true,
"sendReminderEmail": false,
"sendFeedbackEmail": false,
"skipCheckout": false,
"status": "ACTIVE",
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>",
"image": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"externalId": "img_123456",
"url": "https://storage.example.com/images/product-image.jpg",
"filename": "product-image.jpg",
"mime": "image/jpeg",
"createdAt": "2023-01-01T12:00:00Z",
"updatedAt": "2023-01-02T12:00:00Z",
"deletedAt": "2023-01-03T12:00:00Z",
"storeId": "store-uuid"
}
},
"staffMember": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"storeId": "123e4567-e89b-12d3-a456-426614174111",
"userId": "user-uuid",
"scheduleId": "123e4567-e89b-12d3-a456-426614174000",
"imageId": "123e4567-e89b-12d3-a456-426614174000",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"slug": "mike",
"refreshToken": "abc123xyz456",
"createdAt": "2025-05-01T12:00:00Z",
"updatedAt": "2025-05-15T14:30:00Z",
"deletedAt": "2025-06-01T09:15:00Z",
"image": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"externalId": "img_123456",
"url": "https://storage.example.com/images/product-image.jpg",
"filename": "product-image.jpg",
"mime": "image/jpeg",
"createdAt": "2023-01-01T12:00:00Z",
"updatedAt": "2023-01-02T12:00:00Z",
"deletedAt": "2023-01-03T12:00:00Z",
"storeId": "store-uuid"
}
},
"location": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"storeId": "123e4567-e89b-12d3-a456-426614174001",
"scheduleId": "123e4567-e89b-12d3-a456-426614174002",
"title": "Main Office",
"description": "Our main downtown office location with 3 treatment rooms",
"slug": "new-york",
"type": "physical",
"link": "https://zoom.us/j/123456789",
"addressLine1": "123 Main Street",
"addressLine2": "Suite 200",
"city": "San Francisco",
"state": "CA",
"postalCode": "94105",
"country": "United States",
"addressPlaceId": "ChIJIQBpAG2ahYAR_6128GcTUEo",
"latitude": 37.4224764,
"longitude": -122.0842499,
"createdAt": "2023-01-20T08:30:00Z",
"updatedAt": "2023-02-15T14:20:00Z",
"deletedAt": "2023-03-10T11:45:00Z",
"address": "<string>"
},
"addOns": [
{
"id": "<string>",
"appointmentId": "<string>",
"addOnId": "<string>",
"quantity": 1,
"createdAt": "2023-11-07T05:31:56Z",
"addOn": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"externalId": "1234567890",
"externalVariantId": "9876543210",
"storeId": "123e4567-e89b-12d3-a456-426614174001",
"slug": "child-seat",
"title": "Child Seat",
"description": "<string>",
"imageId": "<string>",
"color": "slate",
"price": 15,
"taxable": true,
"durationMultiplied": false,
"maxQuantity": 4,
"status": "active",
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>",
"image": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"externalId": "img_123456",
"url": "https://storage.example.com/images/product-image.jpg",
"filename": "product-image.jpg",
"mime": "image/jpeg",
"createdAt": "2023-01-01T12:00:00Z",
"updatedAt": "2023-01-02T12:00:00Z",
"deletedAt": "2023-01-03T12:00:00Z",
"storeId": "store-uuid"
}
}
}
],
"guests": [
{
"id": "<string>",
"appointmentId": "<string>",
"email": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"customer": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"externalId": "1234567890",
"firstName": "John",
"lastName": "Smith",
"email": "john.smith@example.com",
"phone": "+12135550123",
"password": "<string>",
"storeId": "store-uuid",
"language": "en",
"createdAt": "2023-01-15T10:30:00Z",
"updatedAt": "2023-02-20T14:15:00Z",
"emailVerifiedAt": "2023-01-02T00:00:00Z",
"deletedAt": "2023-06-03T09:45:00Z",
"isEmailVerified": true,
"isPasswordSet": true
}
}Create appointment
Creates a new appointment for a customer. Authentication is optional - if authenticated, the appointment will be associated with the logged-in user.
curl --request POST \
--url https://api.opencals.com/storefront/appointments \
--header 'Content-Type: application/json' \
--data '
{
"slot": {
"fromDate": "2023-06-15",
"fromTime": "09:00:00",
"toDate": "2023-06-15",
"toTime": "10:00:00",
"productId": "123e4567-e89b-12d3-a456-426614174001",
"locationId": "123e4567-e89b-12d3-a456-426614174002",
"staffMemberId": "123e4567-e89b-12d3-a456-426614174003"
},
"customer": {
"customerId": "123e4567-e89b-12d3-a456-426614174004"
},
"internalNote": "Customer requested extra attention for specific needs",
"address": {
"addressLine1": "123 Main Street",
"addressLine2": "Suite 456",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "USA"
},
"checkoutQuestionAnswers": [
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"question": "Do you have any allergies?",
"answer": "No allergies",
"fileIds": [
"<string>"
]
}
],
"numberOfAttendees": 1,
"cartId": "123e4567-e89b-12d3-a456-426614174005",
"addOns": [
{
"addOnId": "123e4567-e89b-12d3-a456-426614174006",
"quantity": 1
}
],
"guests": [
{
"email": "guest@example.com"
}
]
}
'import requests
url = "https://api.opencals.com/storefront/appointments"
payload = {
"slot": {
"fromDate": "2023-06-15",
"fromTime": "09:00:00",
"toDate": "2023-06-15",
"toTime": "10:00:00",
"productId": "123e4567-e89b-12d3-a456-426614174001",
"locationId": "123e4567-e89b-12d3-a456-426614174002",
"staffMemberId": "123e4567-e89b-12d3-a456-426614174003"
},
"customer": { "customerId": "123e4567-e89b-12d3-a456-426614174004" },
"internalNote": "Customer requested extra attention for specific needs",
"address": {
"addressLine1": "123 Main Street",
"addressLine2": "Suite 456",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "USA"
},
"checkoutQuestionAnswers": [
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"question": "Do you have any allergies?",
"answer": "No allergies",
"fileIds": ["<string>"]
}
],
"numberOfAttendees": 1,
"cartId": "123e4567-e89b-12d3-a456-426614174005",
"addOns": [
{
"addOnId": "123e4567-e89b-12d3-a456-426614174006",
"quantity": 1
}
],
"guests": [{ "email": "guest@example.com" }]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
slot: {
fromDate: '2023-06-15',
fromTime: '09:00:00',
toDate: '2023-06-15',
toTime: '10:00:00',
productId: '123e4567-e89b-12d3-a456-426614174001',
locationId: '123e4567-e89b-12d3-a456-426614174002',
staffMemberId: '123e4567-e89b-12d3-a456-426614174003'
},
customer: {customerId: '123e4567-e89b-12d3-a456-426614174004'},
internalNote: 'Customer requested extra attention for specific needs',
address: {
addressLine1: '123 Main Street',
addressLine2: 'Suite 456',
city: 'New York',
state: 'NY',
postalCode: '10001',
country: 'USA'
},
checkoutQuestionAnswers: [
{
questionId: '123e4567-e89b-12d3-a456-426614174000',
question: 'Do you have any allergies?',
answer: 'No allergies',
fileIds: ['<string>']
}
],
numberOfAttendees: 1,
cartId: '123e4567-e89b-12d3-a456-426614174005',
addOns: [{addOnId: '123e4567-e89b-12d3-a456-426614174006', quantity: 1}],
guests: [{email: 'guest@example.com'}]
})
};
fetch('https://api.opencals.com/storefront/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.opencals.com/storefront/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([
'slot' => [
'fromDate' => '2023-06-15',
'fromTime' => '09:00:00',
'toDate' => '2023-06-15',
'toTime' => '10:00:00',
'productId' => '123e4567-e89b-12d3-a456-426614174001',
'locationId' => '123e4567-e89b-12d3-a456-426614174002',
'staffMemberId' => '123e4567-e89b-12d3-a456-426614174003'
],
'customer' => [
'customerId' => '123e4567-e89b-12d3-a456-426614174004'
],
'internalNote' => 'Customer requested extra attention for specific needs',
'address' => [
'addressLine1' => '123 Main Street',
'addressLine2' => 'Suite 456',
'city' => 'New York',
'state' => 'NY',
'postalCode' => '10001',
'country' => 'USA'
],
'checkoutQuestionAnswers' => [
[
'questionId' => '123e4567-e89b-12d3-a456-426614174000',
'question' => 'Do you have any allergies?',
'answer' => 'No allergies',
'fileIds' => [
'<string>'
]
]
],
'numberOfAttendees' => 1,
'cartId' => '123e4567-e89b-12d3-a456-426614174005',
'addOns' => [
[
'addOnId' => '123e4567-e89b-12d3-a456-426614174006',
'quantity' => 1
]
],
'guests' => [
[
'email' => 'guest@example.com'
]
]
]),
CURLOPT_HTTPHEADER => [
"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://api.opencals.com/storefront/appointments"
payload := strings.NewReader("{\n \"slot\": {\n \"fromDate\": \"2023-06-15\",\n \"fromTime\": \"09:00:00\",\n \"toDate\": \"2023-06-15\",\n \"toTime\": \"10:00:00\",\n \"productId\": \"123e4567-e89b-12d3-a456-426614174001\",\n \"locationId\": \"123e4567-e89b-12d3-a456-426614174002\",\n \"staffMemberId\": \"123e4567-e89b-12d3-a456-426614174003\"\n },\n \"customer\": {\n \"customerId\": \"123e4567-e89b-12d3-a456-426614174004\"\n },\n \"internalNote\": \"Customer requested extra attention for specific needs\",\n \"address\": {\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Suite 456\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"USA\"\n },\n \"checkoutQuestionAnswers\": [\n {\n \"questionId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"question\": \"Do you have any allergies?\",\n \"answer\": \"No allergies\",\n \"fileIds\": [\n \"<string>\"\n ]\n }\n ],\n \"numberOfAttendees\": 1,\n \"cartId\": \"123e4567-e89b-12d3-a456-426614174005\",\n \"addOns\": [\n {\n \"addOnId\": \"123e4567-e89b-12d3-a456-426614174006\",\n \"quantity\": 1\n }\n ],\n \"guests\": [\n {\n \"email\": \"guest@example.com\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.opencals.com/storefront/appointments")
.header("Content-Type", "application/json")
.body("{\n \"slot\": {\n \"fromDate\": \"2023-06-15\",\n \"fromTime\": \"09:00:00\",\n \"toDate\": \"2023-06-15\",\n \"toTime\": \"10:00:00\",\n \"productId\": \"123e4567-e89b-12d3-a456-426614174001\",\n \"locationId\": \"123e4567-e89b-12d3-a456-426614174002\",\n \"staffMemberId\": \"123e4567-e89b-12d3-a456-426614174003\"\n },\n \"customer\": {\n \"customerId\": \"123e4567-e89b-12d3-a456-426614174004\"\n },\n \"internalNote\": \"Customer requested extra attention for specific needs\",\n \"address\": {\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Suite 456\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"USA\"\n },\n \"checkoutQuestionAnswers\": [\n {\n \"questionId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"question\": \"Do you have any allergies?\",\n \"answer\": \"No allergies\",\n \"fileIds\": [\n \"<string>\"\n ]\n }\n ],\n \"numberOfAttendees\": 1,\n \"cartId\": \"123e4567-e89b-12d3-a456-426614174005\",\n \"addOns\": [\n {\n \"addOnId\": \"123e4567-e89b-12d3-a456-426614174006\",\n \"quantity\": 1\n }\n ],\n \"guests\": [\n {\n \"email\": \"guest@example.com\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opencals.com/storefront/appointments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"slot\": {\n \"fromDate\": \"2023-06-15\",\n \"fromTime\": \"09:00:00\",\n \"toDate\": \"2023-06-15\",\n \"toTime\": \"10:00:00\",\n \"productId\": \"123e4567-e89b-12d3-a456-426614174001\",\n \"locationId\": \"123e4567-e89b-12d3-a456-426614174002\",\n \"staffMemberId\": \"123e4567-e89b-12d3-a456-426614174003\"\n },\n \"customer\": {\n \"customerId\": \"123e4567-e89b-12d3-a456-426614174004\"\n },\n \"internalNote\": \"Customer requested extra attention for specific needs\",\n \"address\": {\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Suite 456\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"USA\"\n },\n \"checkoutQuestionAnswers\": [\n {\n \"questionId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"question\": \"Do you have any allergies?\",\n \"answer\": \"No allergies\",\n \"fileIds\": [\n \"<string>\"\n ]\n }\n ],\n \"numberOfAttendees\": 1,\n \"cartId\": \"123e4567-e89b-12d3-a456-426614174005\",\n \"addOns\": [\n {\n \"addOnId\": \"123e4567-e89b-12d3-a456-426614174006\",\n \"quantity\": 1\n }\n ],\n \"guests\": [\n {\n \"email\": \"guest@example.com\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "1001",
"productId": "123e4567-e89b-12d3-a456-426614174001",
"staffMemberId": "123e4567-e89b-12d3-a456-426614174002",
"locationId": "123e4567-e89b-12d3-a456-426614174003",
"storeId": "123e4567-e89b-12d3-a456-426614174004",
"customerId": "123e4567-e89b-12d3-a456-426614174005",
"externalOrderId": "12345678",
"externalOrderName": "#1001",
"from": "2023-06-15T09:00:00Z",
"to": "2023-06-15T10:00:00Z",
"addressLine1": "123 Main Street",
"addressLine2": "Suite 456",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "USA",
"status": "scheduled",
"internalNote": "Customer requested extra attention for specific needs",
"createdBy": "customer",
"reminderSentAt": "2023-06-14T09:00:00Z",
"numberOfAttendees": 1,
"createdAt": "2023-06-01T10:30:00Z",
"updatedAt": "2023-06-02T14:15:00Z",
"deletedAt": "2023-06-03T09:45:00Z",
"product": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"productId": "123e4567-e89b-12d3-a456-426614174000",
"externalId": "1234567890",
"externalVariantId": "9876543210",
"storeId": "123e4567-e89b-12d3-a456-426614174001",
"slug": "haircut-basic",
"scheduleId": "<string>",
"productPoolId": "<string>",
"title": "Haircut Service",
"variantTitle": "Short Hair",
"description": "<string>",
"imageId": "<string>",
"color": "BLUE",
"price": 250,
"taxable": false,
"duration": 3600,
"allowCustomDuration": false,
"maxDuration": -1,
"maxAttendees": 1,
"maxGuests": 123,
"allowGuests": false,
"allowCustomerReschedule": false,
"allowCustomerCancel": false,
"rescheduleGap": 123,
"cancelGap": 123,
"beforeGap": 123,
"afterGap": 123,
"fixedTimes": false,
"fixedStartTime": "09:00:00",
"fixedEndTime": "17:00:00",
"advanceScheduleThreshold": 0,
"sendConfirmationEmail": true,
"sendReminderEmail": false,
"sendFeedbackEmail": false,
"skipCheckout": false,
"status": "ACTIVE",
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>",
"image": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"externalId": "img_123456",
"url": "https://storage.example.com/images/product-image.jpg",
"filename": "product-image.jpg",
"mime": "image/jpeg",
"createdAt": "2023-01-01T12:00:00Z",
"updatedAt": "2023-01-02T12:00:00Z",
"deletedAt": "2023-01-03T12:00:00Z",
"storeId": "store-uuid"
}
},
"staffMember": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"storeId": "123e4567-e89b-12d3-a456-426614174111",
"userId": "user-uuid",
"scheduleId": "123e4567-e89b-12d3-a456-426614174000",
"imageId": "123e4567-e89b-12d3-a456-426614174000",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"slug": "mike",
"refreshToken": "abc123xyz456",
"createdAt": "2025-05-01T12:00:00Z",
"updatedAt": "2025-05-15T14:30:00Z",
"deletedAt": "2025-06-01T09:15:00Z",
"image": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"externalId": "img_123456",
"url": "https://storage.example.com/images/product-image.jpg",
"filename": "product-image.jpg",
"mime": "image/jpeg",
"createdAt": "2023-01-01T12:00:00Z",
"updatedAt": "2023-01-02T12:00:00Z",
"deletedAt": "2023-01-03T12:00:00Z",
"storeId": "store-uuid"
}
},
"location": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"storeId": "123e4567-e89b-12d3-a456-426614174001",
"scheduleId": "123e4567-e89b-12d3-a456-426614174002",
"title": "Main Office",
"description": "Our main downtown office location with 3 treatment rooms",
"slug": "new-york",
"type": "physical",
"link": "https://zoom.us/j/123456789",
"addressLine1": "123 Main Street",
"addressLine2": "Suite 200",
"city": "San Francisco",
"state": "CA",
"postalCode": "94105",
"country": "United States",
"addressPlaceId": "ChIJIQBpAG2ahYAR_6128GcTUEo",
"latitude": 37.4224764,
"longitude": -122.0842499,
"createdAt": "2023-01-20T08:30:00Z",
"updatedAt": "2023-02-15T14:20:00Z",
"deletedAt": "2023-03-10T11:45:00Z",
"address": "<string>"
},
"addOns": [
{
"id": "<string>",
"appointmentId": "<string>",
"addOnId": "<string>",
"quantity": 1,
"createdAt": "2023-11-07T05:31:56Z",
"addOn": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"externalId": "1234567890",
"externalVariantId": "9876543210",
"storeId": "123e4567-e89b-12d3-a456-426614174001",
"slug": "child-seat",
"title": "Child Seat",
"description": "<string>",
"imageId": "<string>",
"color": "slate",
"price": 15,
"taxable": true,
"durationMultiplied": false,
"maxQuantity": 4,
"status": "active",
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>",
"image": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"externalId": "img_123456",
"url": "https://storage.example.com/images/product-image.jpg",
"filename": "product-image.jpg",
"mime": "image/jpeg",
"createdAt": "2023-01-01T12:00:00Z",
"updatedAt": "2023-01-02T12:00:00Z",
"deletedAt": "2023-01-03T12:00:00Z",
"storeId": "store-uuid"
}
}
}
],
"guests": [
{
"id": "<string>",
"appointmentId": "<string>",
"email": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"customer": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"externalId": "1234567890",
"firstName": "John",
"lastName": "Smith",
"email": "john.smith@example.com",
"phone": "+12135550123",
"password": "<string>",
"storeId": "store-uuid",
"language": "en",
"createdAt": "2023-01-15T10:30:00Z",
"updatedAt": "2023-02-20T14:15:00Z",
"emailVerifiedAt": "2023-01-02T00:00:00Z",
"deletedAt": "2023-06-03T09:45:00Z",
"isEmailVerified": true,
"isPasswordSet": true
}
}Body
Appointment details to create
Appointment slot information — date/time range with product, location, and staff
Show child attributes
Show child attributes
Customer information - either an existing customer ID or details for a new customer
- Option 1
- Option 2
Show child attributes
Show child attributes
Internal notes about the appointment (not visible to customers)
"Customer requested extra attention for specific needs"
Address details for the appointment
Show child attributes
Show child attributes
Answers to checkout questions provided during booking
Show child attributes
Show child attributes
Number of people attending the appointment
1
ID of the cart associated with this appointment
"123e4567-e89b-12d3-a456-426614174005"
Add-ons to attach to this appointment at creation time
Show child attributes
Show child attributes
Guests to invite to the appointment. They are copied on appointment notifications.
Show child attributes
Show child attributes
Response
The appointment has been successfully created
Unique identifier of the appointment
"123e4567-e89b-12d3-a456-426614174000"
Generated appointment name for the user (starts at 1001 and increments)
"1001"
ID of the service/product for this appointment
"123e4567-e89b-12d3-a456-426614174001"
ID of the staff member assigned to this appointment (if any)
"123e4567-e89b-12d3-a456-426614174002"
ID of the location where the appointment will take place (if any)
"123e4567-e89b-12d3-a456-426614174003"
ID of the store that owns this appointment
"123e4567-e89b-12d3-a456-426614174004"
ID of the customer who booked the appointment
"123e4567-e89b-12d3-a456-426614174005"
External order ID from user's platform (if any)
"12345678"
External order name/reference from user's platform
"#1001"
Start date and time of the appointment (UTC timezone)
"2023-06-15T09:00:00Z"
End date and time of the appointment (UTC timezone)
"2023-06-15T10:00:00Z"
First line of the appointment address
"123 Main Street"
Second line of the appointment address
"Suite 456"
City of the appointment location
"New York"
State/province of the appointment location
"NY"
Postal/zip code of the appointment location
"10001"
Country of the appointment location
"USA"
Current status of the appointment
pending, scheduled, completed, canceled "scheduled"
Internal notes about the appointment (not visible to customers)
"Customer requested extra attention for specific needs"
Indicates who created the appointment (customer or merchant)
customer, merchant "customer"
Date and time when reminder was sent to the customer
"2023-06-14T09:00:00Z"
Number of people attending the appointment
1
Date and time when the appointment was created
"2023-06-01T10:30:00Z"
Date and time when the appointment was last updated
"2023-06-02T14:15:00Z"
Date and time when the appointment was soft-deleted
"2023-06-03T09:45:00Z"
Service/product details for this appointment
Show child attributes
Show child attributes
Staff member assigned to this appointment
Show child attributes
Show child attributes
Location where the appointment will take place
Show child attributes
Show child attributes
Add-ons attached to this appointment
Show child attributes
Show child attributes
Guests invited to this appointment (copied on notifications)
Show child attributes
Show child attributes
Customer the appointment was booked for
Show child attributes
Show child attributes
Was this page helpful?