Skip to main content
GET
/
api
/
v1
/
scans
/
{id}
Get scan
curl --request GET \
  --url https://api.passentry.com/api/v1/scans/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.passentry.com/api/v1/scans/{id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.passentry.com/api/v1/scans/{id}', 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/{id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.passentry.com/api/v1/scans/{id}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.passentry.com/api/v1/scans/{id}")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.passentry.com/api/v1/scans/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "data": {
    "id": "019488b8-c2fc-7b5b-b5b4-deb2b7f33bdd",
    "type": "scan",
    "attributes": {
      "scanType": "nfc",
      "scanValue": "factory_scan_value",
      "validationType": "internalValidation",
      "status": "failed",
      "statusDetail": "Pass is not active",
      "scannedAt": "2025-01-13T13:00:00Z"
    },
    "relationships": {
      "pass": {
        "data": {
          "id": "7882e98b-0eba-4625-9223-5221eb8dad7f",
          "type": "pass"
        }
      },
      "reader": {
        "data": {
          "id": "south-gate-1",
          "type": "reader"
        }
      }
    }
  },
  "included": [
    {
      "id": "7882e98b-0eba-4625-9223-5221eb8dad7f",
      "type": "pass",
      "attributes": {
        "downloadUrl": "https://www.example.com?pass=7882e98b-0eba-4625-9223-5221eb8dad7f",
        "passType": "generic",
        "createdAt": "2022-01-01T00:00:00Z",
        "status": "issued",
        "extId": "4312d68fd106e3e6dd15",
        "passTemplateUuid": "7f24e7371e67c7af15103815",
        "passTemplateName": "PassEntry Event",
        "nfc": null,
        "barcode": {},
        "passContent": {
          "fullName": "John Johnson"
        }
      }
    },
    {
      "id": "south-gate-1",
      "type": "reader",
      "attributes": {
        "name": "South Gate Reader",
        "readerType": "PassentryReader",
        "loggedIn": false,
        "qrEnabled": false,
        "mifareClassicNfcEnabled": false,
        "scanEnabled": true,
        "redeemEnabled": false,
        "addPointsEnabled": false,
        "ndefTagScanningEnabled": false,
        "lastSeenAt": "2020-03-13T13:00:00Z"
      }
    }
  ]
}
{
  "errors": [
    "Access denied"
  ]
}
{
  "errors": [
    "Scan not found"
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Scan UUID

Response

Successful

data
object
included
object[]