Create an auto-assigning appointment
curl --request POST \
--url https://api.qminder.com/v1/appointments/auto-assign \
--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",
"startTime": "2024-12-15T10:00:00Z",
"endTime": "2024-12-15T10:30:00Z"
}
'import requests
url = "https://api.qminder.com/v1/appointments/auto-assign"
payload = {
"lineId": 12345,
"firstName": "John",
"lastName": "Doe",
"startTime": "2024-12-15T10:00:00Z",
"endTime": "2024-12-15T10:30:00Z"
}
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',
startTime: '2024-12-15T10:00:00Z',
endTime: '2024-12-15T10:30:00Z'
})
};
fetch('https://api.qminder.com/v1/appointments/auto-assign', 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/auto-assign",
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',
'startTime' => '2024-12-15T10:00:00Z',
'endTime' => '2024-12-15T10:30:00Z'
]),
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/auto-assign"
payload := strings.NewReader("{\n \"lineId\": 12345,\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"startTime\": \"2024-12-15T10:00:00Z\",\n \"endTime\": \"2024-12-15T10:30:00Z\"\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/auto-assign")
.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 \"startTime\": \"2024-12-15T10:00:00Z\",\n \"endTime\": \"2024-12-15T10:30:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qminder.com/v1/appointments/auto-assign")
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 \"startTime\": \"2024-12-15T10:00:00Z\",\n \"endTime\": \"2024-12-15T10:30:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "226859",
"publicId": "A-42"
}Appointments
Create an auto-assigning appointment
Creates a scheduled appointment that will be automatically assigned to an available user based on their availability.
POST
/
v1
/
appointments
/
auto-assign
Create an auto-assigning appointment
curl --request POST \
--url https://api.qminder.com/v1/appointments/auto-assign \
--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",
"startTime": "2024-12-15T10:00:00Z",
"endTime": "2024-12-15T10:30:00Z"
}
'import requests
url = "https://api.qminder.com/v1/appointments/auto-assign"
payload = {
"lineId": 12345,
"firstName": "John",
"lastName": "Doe",
"startTime": "2024-12-15T10:00:00Z",
"endTime": "2024-12-15T10:30:00Z"
}
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',
startTime: '2024-12-15T10:00:00Z',
endTime: '2024-12-15T10:30:00Z'
})
};
fetch('https://api.qminder.com/v1/appointments/auto-assign', 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/auto-assign",
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',
'startTime' => '2024-12-15T10:00:00Z',
'endTime' => '2024-12-15T10:30:00Z'
]),
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/auto-assign"
payload := strings.NewReader("{\n \"lineId\": 12345,\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"startTime\": \"2024-12-15T10:00:00Z\",\n \"endTime\": \"2024-12-15T10:30:00Z\"\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/auto-assign")
.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 \"startTime\": \"2024-12-15T10:00:00Z\",\n \"endTime\": \"2024-12-15T10:30:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qminder.com/v1/appointments/auto-assign")
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 \"startTime\": \"2024-12-15T10:00:00Z\",\n \"endTime\": \"2024-12-15T10:30:00Z\"\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.
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