Scan an entity
curl --request POST \
--url https://b.anny.co/api/v1/scans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"type": "scans"
}
}
'import requests
url = "https://b.anny.co/api/v1/scans"
payload = { "data": { "type": "scans" } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: {type: 'scans'}})
};
fetch('https://b.anny.co/api/v1/scans', 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://b.anny.co/api/v1/scans",
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([
'data' => [
'type' => 'scans'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://b.anny.co/api/v1/scans"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"scans\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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://b.anny.co/api/v1/scans")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"type\": \"scans\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/scans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"type\": \"scans\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "scans",
"attributes": {
"scan_type": "<string>",
"status": "<string>",
"device_identifier": "<string>",
"quantity": 123,
"meta": {},
"created_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"scannable": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"scanner": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
}
}
}
}Booking Management
Scan an entity
Record a check-in or check-out scan. The scannable entity is identified via query parameters
(code + optional scannable_type), not via JSON:API relationships.
POST
/
api
/
v1
/
scans
Scan an entity
curl --request POST \
--url https://b.anny.co/api/v1/scans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"type": "scans"
}
}
'import requests
url = "https://b.anny.co/api/v1/scans"
payload = { "data": { "type": "scans" } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: {type: 'scans'}})
};
fetch('https://b.anny.co/api/v1/scans', 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://b.anny.co/api/v1/scans",
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([
'data' => [
'type' => 'scans'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://b.anny.co/api/v1/scans"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"scans\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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://b.anny.co/api/v1/scans")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"type\": \"scans\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/scans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"type\": \"scans\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "scans",
"attributes": {
"scan_type": "<string>",
"status": "<string>",
"device_identifier": "<string>",
"quantity": 123,
"meta": {},
"created_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"scannable": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"scanner": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
}
}
}
}Autorisierungen
The access token received from the authorization server in the OAuth 2.0 flow.
Abfrageparameter
Organization ID
Unique code of the scannable entity (e.g. booking scan code)
Type of the scannable entity. Default: bookings
Optional array of resource IDs to restrict which resources may be scanned
Body
application/json
Show child attributes
Show child attributes
Antwort
201 - application/json
Created
A check-in scan record for a booking.
Show child attributes
Show child attributes
⌘I