Issue a Queue ticket
curl --request POST \
--url https://app.layarva.com/api/public/v1/queue/tickets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Request-Nonce: <x-request-nonce>' \
--header 'X-Request-Timestamp: <x-request-timestamp>' \
--data '
{
"locationId": "<string>",
"serviceId": "<string>",
"externalReference": "<string>"
}
'import requests
url = "https://app.layarva.com/api/public/v1/queue/tickets"
payload = {
"locationId": "<string>",
"serviceId": "<string>",
"externalReference": "<string>"
}
headers = {
"X-Request-Timestamp": "<x-request-timestamp>",
"X-Request-Nonce": "<x-request-nonce>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Request-Timestamp': '<x-request-timestamp>',
'X-Request-Nonce': '<x-request-nonce>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({locationId: '<string>', serviceId: '<string>', externalReference: '<string>'})
};
fetch('https://app.layarva.com/api/public/v1/queue/tickets', 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://app.layarva.com/api/public/v1/queue/tickets",
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([
'locationId' => '<string>',
'serviceId' => '<string>',
'externalReference' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-Request-Nonce: <x-request-nonce>",
"X-Request-Timestamp: <x-request-timestamp>"
],
]);
$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://app.layarva.com/api/public/v1/queue/tickets"
payload := strings.NewReader("{\n \"locationId\": \"<string>\",\n \"serviceId\": \"<string>\",\n \"externalReference\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Request-Timestamp", "<x-request-timestamp>")
req.Header.Add("X-Request-Nonce", "<x-request-nonce>")
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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://app.layarva.com/api/public/v1/queue/tickets")
.header("X-Request-Timestamp", "<x-request-timestamp>")
.header("X-Request-Nonce", "<x-request-nonce>")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"locationId\": \"<string>\",\n \"serviceId\": \"<string>\",\n \"externalReference\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.layarva.com/api/public/v1/queue/tickets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Request-Timestamp"] = '<x-request-timestamp>'
request["X-Request-Nonce"] = '<x-request-nonce>'
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"locationId\": \"<string>\",\n \"serviceId\": \"<string>\",\n \"externalReference\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"ticketId": "<string>",
"ticketNumber": "<string>",
"status": "<string>",
"source": "<string>",
"queueUnitId": "<string>",
"locationId": "<string>",
"serviceId": "<string>",
"externalReference": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"calledAt": "2023-11-07T05:31:56Z",
"servingAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Queue API Reference
Issue a Queue ticket
Issues one ticket idempotently for an allowed Location and service. Refused while an Edge holds Queue authority.
POST
/
api
/
public
/
v1
/
queue
/
tickets
Issue a Queue ticket
curl --request POST \
--url https://app.layarva.com/api/public/v1/queue/tickets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Request-Nonce: <x-request-nonce>' \
--header 'X-Request-Timestamp: <x-request-timestamp>' \
--data '
{
"locationId": "<string>",
"serviceId": "<string>",
"externalReference": "<string>"
}
'import requests
url = "https://app.layarva.com/api/public/v1/queue/tickets"
payload = {
"locationId": "<string>",
"serviceId": "<string>",
"externalReference": "<string>"
}
headers = {
"X-Request-Timestamp": "<x-request-timestamp>",
"X-Request-Nonce": "<x-request-nonce>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Request-Timestamp': '<x-request-timestamp>',
'X-Request-Nonce': '<x-request-nonce>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({locationId: '<string>', serviceId: '<string>', externalReference: '<string>'})
};
fetch('https://app.layarva.com/api/public/v1/queue/tickets', 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://app.layarva.com/api/public/v1/queue/tickets",
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([
'locationId' => '<string>',
'serviceId' => '<string>',
'externalReference' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-Request-Nonce: <x-request-nonce>",
"X-Request-Timestamp: <x-request-timestamp>"
],
]);
$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://app.layarva.com/api/public/v1/queue/tickets"
payload := strings.NewReader("{\n \"locationId\": \"<string>\",\n \"serviceId\": \"<string>\",\n \"externalReference\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Request-Timestamp", "<x-request-timestamp>")
req.Header.Add("X-Request-Nonce", "<x-request-nonce>")
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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://app.layarva.com/api/public/v1/queue/tickets")
.header("X-Request-Timestamp", "<x-request-timestamp>")
.header("X-Request-Nonce", "<x-request-nonce>")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"locationId\": \"<string>\",\n \"serviceId\": \"<string>\",\n \"externalReference\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.layarva.com/api/public/v1/queue/tickets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Request-Timestamp"] = '<x-request-timestamp>'
request["X-Request-Nonce"] = '<x-request-nonce>'
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"locationId\": \"<string>\",\n \"serviceId\": \"<string>\",\n \"externalReference\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"ticketId": "<string>",
"ticketNumber": "<string>",
"status": "<string>",
"source": "<string>",
"queueUnitId": "<string>",
"locationId": "<string>",
"serviceId": "<string>",
"externalReference": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"calledAt": "2023-11-07T05:31:56Z",
"servingAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Current UTC ISO-8601 time, within five minutes.
Unique 12–160 character value for this mutation.
Required string length:
12 - 160Maximum string length:
160Maximum string length:
120Pattern:
^[A-Za-z0-9_.:-]+$Body
application/json
Response
Ticket issued
Show child attributes
Show child attributes
⌘I

