Scans
Create scan
POST
/
api
/
v1
/
scans
Create scan
curl --request POST \
--url https://api.passentry.com/api/v1/scans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scan": {
"readerId": "south-gate-1",
"passId": "7882e98b-0eba-4625-9223-5221eb8dad7f",
"scanType": "barcode",
"loyalty": {
"balance": 10
}
}
}
'import requests
url = "https://api.passentry.com/api/v1/scans"
payload = { "scan": {
"readerId": "south-gate-1",
"passId": "7882e98b-0eba-4625-9223-5221eb8dad7f",
"scanType": "barcode",
"loyalty": { "balance": 10 }
} }
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({
scan: {
readerId: 'south-gate-1',
passId: '7882e98b-0eba-4625-9223-5221eb8dad7f',
scanType: 'barcode',
loyalty: {balance: 10}
}
})
};
fetch('https://api.passentry.com/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://api.passentry.com/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([
'scan' => [
'readerId' => 'south-gate-1',
'passId' => '7882e98b-0eba-4625-9223-5221eb8dad7f',
'scanType' => 'barcode',
'loyalty' => [
'balance' => 10
]
]
]),
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://api.passentry.com/api/v1/scans"
payload := strings.NewReader("{\n \"scan\": {\n \"readerId\": \"south-gate-1\",\n \"passId\": \"7882e98b-0eba-4625-9223-5221eb8dad7f\",\n \"scanType\": \"barcode\",\n \"loyalty\": {\n \"balance\": 10\n }\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://api.passentry.com/api/v1/scans")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scan\": {\n \"readerId\": \"south-gate-1\",\n \"passId\": \"7882e98b-0eba-4625-9223-5221eb8dad7f\",\n \"scanType\": \"barcode\",\n \"loyalty\": {\n \"balance\": 10\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.passentry.com/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 \"scan\": {\n \"readerId\": \"south-gate-1\",\n \"passId\": \"7882e98b-0eba-4625-9223-5221eb8dad7f\",\n \"scanType\": \"barcode\",\n \"loyalty\": {\n \"balance\": 10\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"validationResponse": {
"status": "successful",
"statusDetail": "",
"readerInstructions": {
"message": "10 points added to your balance. Current balance: 25"
},
"loyalty": {
"balanceChange": "10",
"updatedBalance": "25",
"operation": "add"
}
},
"scanInfo": {
"scanId": "019488b8-c2fc-7b5b-b5b4-deb2b7f33bdd",
"scanType": "barcode",
"scanValue": "7882e98b-0eba-4625-9223-5221eb8dad7f",
"validationType": "internalValidation",
"status": "successful",
"statusDetail": "",
"scannedAt": "2025-01-21T11:56:37Z",
"passId": "7882e98b-0eba-4625-9223-5221eb8dad7f",
"passExtId": "4312d68fd106e3e6dd15",
"readerId": "south-gate-1"
}
}{
"errors": [
"<string>"
]
}{
"errors": [
"<string>"
]
}Was this page helpful?
⌘I
Create scan
curl --request POST \
--url https://api.passentry.com/api/v1/scans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scan": {
"readerId": "south-gate-1",
"passId": "7882e98b-0eba-4625-9223-5221eb8dad7f",
"scanType": "barcode",
"loyalty": {
"balance": 10
}
}
}
'import requests
url = "https://api.passentry.com/api/v1/scans"
payload = { "scan": {
"readerId": "south-gate-1",
"passId": "7882e98b-0eba-4625-9223-5221eb8dad7f",
"scanType": "barcode",
"loyalty": { "balance": 10 }
} }
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({
scan: {
readerId: 'south-gate-1',
passId: '7882e98b-0eba-4625-9223-5221eb8dad7f',
scanType: 'barcode',
loyalty: {balance: 10}
}
})
};
fetch('https://api.passentry.com/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://api.passentry.com/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([
'scan' => [
'readerId' => 'south-gate-1',
'passId' => '7882e98b-0eba-4625-9223-5221eb8dad7f',
'scanType' => 'barcode',
'loyalty' => [
'balance' => 10
]
]
]),
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://api.passentry.com/api/v1/scans"
payload := strings.NewReader("{\n \"scan\": {\n \"readerId\": \"south-gate-1\",\n \"passId\": \"7882e98b-0eba-4625-9223-5221eb8dad7f\",\n \"scanType\": \"barcode\",\n \"loyalty\": {\n \"balance\": 10\n }\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://api.passentry.com/api/v1/scans")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scan\": {\n \"readerId\": \"south-gate-1\",\n \"passId\": \"7882e98b-0eba-4625-9223-5221eb8dad7f\",\n \"scanType\": \"barcode\",\n \"loyalty\": {\n \"balance\": 10\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.passentry.com/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 \"scan\": {\n \"readerId\": \"south-gate-1\",\n \"passId\": \"7882e98b-0eba-4625-9223-5221eb8dad7f\",\n \"scanType\": \"barcode\",\n \"loyalty\": {\n \"balance\": 10\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"validationResponse": {
"status": "successful",
"statusDetail": "",
"readerInstructions": {
"message": "10 points added to your balance. Current balance: 25"
},
"loyalty": {
"balanceChange": "10",
"updatedBalance": "25",
"operation": "add"
}
},
"scanInfo": {
"scanId": "019488b8-c2fc-7b5b-b5b4-deb2b7f33bdd",
"scanType": "barcode",
"scanValue": "7882e98b-0eba-4625-9223-5221eb8dad7f",
"validationType": "internalValidation",
"status": "successful",
"statusDetail": "",
"scannedAt": "2025-01-21T11:56:37Z",
"passId": "7882e98b-0eba-4625-9223-5221eb8dad7f",
"passExtId": "4312d68fd106e3e6dd15",
"readerId": "south-gate-1"
}
}{
"errors": [
"<string>"
]
}{
"errors": [
"<string>"
]
}