Scans
Log scan
POST
/
api
/
v1
/
scans
/
log
Log scan
curl --request POST \
--url https://api.passentry.com/api/v1/scans/log \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scan": {
"readerId": "south-gate-1",
"scanType": "nfc",
"status": "failed",
"statusDetail": "Membership expired",
"scanValue": "PROMO-CODE-123456",
"passId": "7882e98b-0eba-4625-9223-5221eb8dad7f",
"loyalty": {
"balance": -10
}
}
}
'import requests
url = "https://api.passentry.com/api/v1/scans/log"
payload = { "scan": {
"readerId": "south-gate-1",
"scanType": "nfc",
"status": "failed",
"statusDetail": "Membership expired",
"scanValue": "PROMO-CODE-123456",
"passId": "7882e98b-0eba-4625-9223-5221eb8dad7f",
"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',
scanType: 'nfc',
status: 'failed',
statusDetail: 'Membership expired',
scanValue: 'PROMO-CODE-123456',
passId: '7882e98b-0eba-4625-9223-5221eb8dad7f',
loyalty: {balance: -10}
}
})
};
fetch('https://api.passentry.com/api/v1/scans/log', 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/log",
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',
'scanType' => 'nfc',
'status' => 'failed',
'statusDetail' => 'Membership expired',
'scanValue' => 'PROMO-CODE-123456',
'passId' => '7882e98b-0eba-4625-9223-5221eb8dad7f',
'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/log"
payload := strings.NewReader("{\n \"scan\": {\n \"readerId\": \"south-gate-1\",\n \"scanType\": \"nfc\",\n \"status\": \"failed\",\n \"statusDetail\": \"Membership expired\",\n \"scanValue\": \"PROMO-CODE-123456\",\n \"passId\": \"7882e98b-0eba-4625-9223-5221eb8dad7f\",\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/log")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scan\": {\n \"readerId\": \"south-gate-1\",\n \"scanType\": \"nfc\",\n \"status\": \"failed\",\n \"statusDetail\": \"Membership expired\",\n \"scanValue\": \"PROMO-CODE-123456\",\n \"passId\": \"7882e98b-0eba-4625-9223-5221eb8dad7f\",\n \"loyalty\": {\n \"balance\": -10\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.passentry.com/api/v1/scans/log")
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 \"scanType\": \"nfc\",\n \"status\": \"failed\",\n \"statusDetail\": \"Membership expired\",\n \"scanValue\": \"PROMO-CODE-123456\",\n \"passId\": \"7882e98b-0eba-4625-9223-5221eb8dad7f\",\n \"loyalty\": {\n \"balance\": -10\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"scanInfo": {
"scanId": "019488b8-c2fc-7b5b-b5b4-deb2b7f33bdd",
"scanType": "nfc",
"scanValue": "PROMO-CODE-123456",
"validationType": "externalValidation",
"status": "failed",
"statusDetail": "Membership expired",
"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
Log scan
curl --request POST \
--url https://api.passentry.com/api/v1/scans/log \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scan": {
"readerId": "south-gate-1",
"scanType": "nfc",
"status": "failed",
"statusDetail": "Membership expired",
"scanValue": "PROMO-CODE-123456",
"passId": "7882e98b-0eba-4625-9223-5221eb8dad7f",
"loyalty": {
"balance": -10
}
}
}
'import requests
url = "https://api.passentry.com/api/v1/scans/log"
payload = { "scan": {
"readerId": "south-gate-1",
"scanType": "nfc",
"status": "failed",
"statusDetail": "Membership expired",
"scanValue": "PROMO-CODE-123456",
"passId": "7882e98b-0eba-4625-9223-5221eb8dad7f",
"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',
scanType: 'nfc',
status: 'failed',
statusDetail: 'Membership expired',
scanValue: 'PROMO-CODE-123456',
passId: '7882e98b-0eba-4625-9223-5221eb8dad7f',
loyalty: {balance: -10}
}
})
};
fetch('https://api.passentry.com/api/v1/scans/log', 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/log",
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',
'scanType' => 'nfc',
'status' => 'failed',
'statusDetail' => 'Membership expired',
'scanValue' => 'PROMO-CODE-123456',
'passId' => '7882e98b-0eba-4625-9223-5221eb8dad7f',
'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/log"
payload := strings.NewReader("{\n \"scan\": {\n \"readerId\": \"south-gate-1\",\n \"scanType\": \"nfc\",\n \"status\": \"failed\",\n \"statusDetail\": \"Membership expired\",\n \"scanValue\": \"PROMO-CODE-123456\",\n \"passId\": \"7882e98b-0eba-4625-9223-5221eb8dad7f\",\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/log")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scan\": {\n \"readerId\": \"south-gate-1\",\n \"scanType\": \"nfc\",\n \"status\": \"failed\",\n \"statusDetail\": \"Membership expired\",\n \"scanValue\": \"PROMO-CODE-123456\",\n \"passId\": \"7882e98b-0eba-4625-9223-5221eb8dad7f\",\n \"loyalty\": {\n \"balance\": -10\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.passentry.com/api/v1/scans/log")
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 \"scanType\": \"nfc\",\n \"status\": \"failed\",\n \"statusDetail\": \"Membership expired\",\n \"scanValue\": \"PROMO-CODE-123456\",\n \"passId\": \"7882e98b-0eba-4625-9223-5221eb8dad7f\",\n \"loyalty\": {\n \"balance\": -10\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"scanInfo": {
"scanId": "019488b8-c2fc-7b5b-b5b4-deb2b7f33bdd",
"scanType": "nfc",
"scanValue": "PROMO-CODE-123456",
"validationType": "externalValidation",
"status": "failed",
"statusDetail": "Membership expired",
"scannedAt": "2025-01-21T11:56:37Z",
"passId": "7882e98b-0eba-4625-9223-5221eb8dad7f",
"passExtId": "4312d68fd106e3e6dd15",
"readerId": "south-gate-1"
}
}{
"errors": [
"<string>"
]
}{
"errors": [
"<string>"
]
}