Create an appointment
curl --request POST \
--url https://api.qminder.com/v1/appointments \
--header 'Content-Type: application/json' \
--header 'X-Qminder-API-Version: <x-qminder-api-version>' \
--header 'X-Qminder-REST-API-Key: <api-key>' \
--data '
{
"lineId": 12345,
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+12125551234",
"email": "john@example.com",
"startTime": "2024-12-15T10:00:00Z",
"endTime": "2024-12-15T10:30:00Z",
"assigneeId": 789
}
'import requests
url = "https://api.qminder.com/v1/appointments"
payload = {
"lineId": 12345,
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+12125551234",
"email": "john@example.com",
"startTime": "2024-12-15T10:00:00Z",
"endTime": "2024-12-15T10:30:00Z",
"assigneeId": 789
}
headers = {
"X-Qminder-API-Version": "<x-qminder-api-version>",
"X-Qminder-REST-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-Qminder-API-Version': '<x-qminder-api-version>',
'X-Qminder-REST-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
lineId: 12345,
firstName: 'John',
lastName: 'Doe',
phoneNumber: '+12125551234',
email: 'john@example.com',
startTime: '2024-12-15T10:00:00Z',
endTime: '2024-12-15T10:30:00Z',
assigneeId: 789
})
};
fetch('https://api.qminder.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.qminder.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([
'lineId' => 12345,
'firstName' => 'John',
'lastName' => 'Doe',
'phoneNumber' => '+12125551234',
'email' => 'john@example.com',
'startTime' => '2024-12-15T10:00:00Z',
'endTime' => '2024-12-15T10:30:00Z',
'assigneeId' => 789
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Qminder-API-Version: <x-qminder-api-version>",
"X-Qminder-REST-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.qminder.com/v1/appointments"
payload := strings.NewReader("{\n \"lineId\": 12345,\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"phoneNumber\": \"+12125551234\",\n \"email\": \"john@example.com\",\n \"startTime\": \"2024-12-15T10:00:00Z\",\n \"endTime\": \"2024-12-15T10:30:00Z\",\n \"assigneeId\": 789\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Qminder-API-Version", "<x-qminder-api-version>")
req.Header.Add("X-Qminder-REST-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.qminder.com/v1/appointments")
.header("X-Qminder-API-Version", "<x-qminder-api-version>")
.header("X-Qminder-REST-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"lineId\": 12345,\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"phoneNumber\": \"+12125551234\",\n \"email\": \"john@example.com\",\n \"startTime\": \"2024-12-15T10:00:00Z\",\n \"endTime\": \"2024-12-15T10:30:00Z\",\n \"assigneeId\": 789\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qminder.com/v1/appointments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Qminder-API-Version"] = '<x-qminder-api-version>'
request["X-Qminder-REST-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"lineId\": 12345,\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"phoneNumber\": \"+12125551234\",\n \"email\": \"john@example.com\",\n \"startTime\": \"2024-12-15T10:00:00Z\",\n \"endTime\": \"2024-12-15T10:30:00Z\",\n \"assigneeId\": 789\n}"
response = http.request(request)
puts response.read_body{
"id": "226859",
"publicId": "A-42"
}Appointments
Create an appointment
Creates a scheduled appointment for a visitor. Appointments have a specific time slot and are assigned to a user.
POST
/
v1
/
appointments
Create an appointment
curl --request POST \
--url https://api.qminder.com/v1/appointments \
--header 'Content-Type: application/json' \
--header 'X-Qminder-API-Version: <x-qminder-api-version>' \
--header 'X-Qminder-REST-API-Key: <api-key>' \
--data '
{
"lineId": 12345,
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+12125551234",
"email": "john@example.com",
"startTime": "2024-12-15T10:00:00Z",
"endTime": "2024-12-15T10:30:00Z",
"assigneeId": 789
}
'import requests
url = "https://api.qminder.com/v1/appointments"
payload = {
"lineId": 12345,
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+12125551234",
"email": "john@example.com",
"startTime": "2024-12-15T10:00:00Z",
"endTime": "2024-12-15T10:30:00Z",
"assigneeId": 789
}
headers = {
"X-Qminder-API-Version": "<x-qminder-api-version>",
"X-Qminder-REST-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-Qminder-API-Version': '<x-qminder-api-version>',
'X-Qminder-REST-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
lineId: 12345,
firstName: 'John',
lastName: 'Doe',
phoneNumber: '+12125551234',
email: 'john@example.com',
startTime: '2024-12-15T10:00:00Z',
endTime: '2024-12-15T10:30:00Z',
assigneeId: 789
})
};
fetch('https://api.qminder.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.qminder.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([
'lineId' => 12345,
'firstName' => 'John',
'lastName' => 'Doe',
'phoneNumber' => '+12125551234',
'email' => 'john@example.com',
'startTime' => '2024-12-15T10:00:00Z',
'endTime' => '2024-12-15T10:30:00Z',
'assigneeId' => 789
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Qminder-API-Version: <x-qminder-api-version>",
"X-Qminder-REST-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.qminder.com/v1/appointments"
payload := strings.NewReader("{\n \"lineId\": 12345,\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"phoneNumber\": \"+12125551234\",\n \"email\": \"john@example.com\",\n \"startTime\": \"2024-12-15T10:00:00Z\",\n \"endTime\": \"2024-12-15T10:30:00Z\",\n \"assigneeId\": 789\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Qminder-API-Version", "<x-qminder-api-version>")
req.Header.Add("X-Qminder-REST-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.qminder.com/v1/appointments")
.header("X-Qminder-API-Version", "<x-qminder-api-version>")
.header("X-Qminder-REST-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"lineId\": 12345,\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"phoneNumber\": \"+12125551234\",\n \"email\": \"john@example.com\",\n \"startTime\": \"2024-12-15T10:00:00Z\",\n \"endTime\": \"2024-12-15T10:30:00Z\",\n \"assigneeId\": 789\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qminder.com/v1/appointments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Qminder-API-Version"] = '<x-qminder-api-version>'
request["X-Qminder-REST-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"lineId\": 12345,\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"phoneNumber\": \"+12125551234\",\n \"email\": \"john@example.com\",\n \"startTime\": \"2024-12-15T10:00:00Z\",\n \"endTime\": \"2024-12-15T10:30:00Z\",\n \"assigneeId\": 789\n}"
response = http.request(request)
puts response.read_body{
"id": "226859",
"publicId": "A-42"
}Authorizations
Headers
API version. Must be set to 2020-09-01.
Available options:
2020-09-01 Body
application/json
ID of the line to create the appointment in.
Visitor's first name (2-50 characters).
Required string length:
2 - 50Appointment start time in ISO 8601 format.
Appointment end time in ISO 8601 format.
ID of the user to assign the appointment to.
Visitor's last name (max 50 characters).
Maximum string length:
50Phone number with optional + prefix (5-20 digits).
Pattern:
^(\+)?([0-9]){5,20}$Visitor's email address.
Maximum string length:
100Language code for the visitor (default: en).
Required string length:
2 - 5Custom input fields for the appointment. See Input Fields query to discover available IDs.
Show child attributes
Show child attributes
Labels to attach to the appointment.
Show child attributes
Show child attributes
⌘I