Skip to content
REST API Reference & SDKs

Passinstance Developer Documentation

Build high-volume Apple Wallet (.pkpass) and Google Wallet integrations. Issue, update, scan, and broadcast real-time lockscreen notifications via production-grade REST APIs.

Get API Keys
Live docs workbench — snippets update as you type
Security

Overview — How Pass Validation Works

Every barcode or NFC scan executes a deterministic rule-engine validation pipeline (scanner config, pass status & void check, expiration & grace period, validation places, check-in/cooldown & once-per-day limits, mechanics, and anti-replay nonces) with optional offline dataset sync.

Anti-Replay Nonce

POST /api/v1/scans/prepare issues a short-lived cryptographic anti-replay nonce bound to the barcode

Validation Rule Pipeline

ConfigCheck → PassStatus & VoidCheck → PassExpiry & GracePeriod → ValidationPlace & Cooldown/OncePerDay → Mechanics & AntiReplay

Offline Dataset Sync

GET /api/v1/scans/offline-dataset provides cursor-paginated snapshots for offline terminals

Scanner Key Pairing

POST /api/v1/scanner-keys/from-link exchanges a pairing token + PIN for a scoped x-scanner-key

Scanner Configuration

5 endpoints
GEThttps://api.passinstance.com/api/v1/validation/configsAPI Key
Scanner Configuration

List Scanner Configurations

List all scanner configurations (validation profiles) in your workspace along with their bound templates, scan modes, and active device counts.

Headers1 required
X-API-Keystring
Required

Workspace secret API key (pi_live_... or pi_test_...). You may alternatively send Authorization: ApiKey <key>.

Example: pi_live_98a7b6c5d4e3f2a1
Query Parameters2 optional
Response Body Structure (JSON)5 required
configsarray of objectsSchema
Required

Scanner configuration profiles.

pagenumber
Required

Current 1-based page index.

pageSizenumber
Required

Number of items requested per page.

totalnumber
Required

Total number of items matching the query.

totalPagesnumber
Required

Total number of pages for the current limit.

Response Status Codes

GEThttps://api.passinstance.com/api/v1/validation/configs/{id}API Key
Scanner Configuration

Get Scanner Configuration

Retrieve a single scanner configuration profile by ID, including its allowed templates, validation rules, and after-scan display message.

Headers1 required
X-API-Keystring
Required

Workspace secret API key (pi_live_... or pi_test_...). You may alternatively send Authorization: ApiKey <key>.

Example: pi_live_98a7b6c5d4e3f2a1
Path Parameters1 required
idstring (UUID)
Required

Scanner configuration UUID.

Example: 7a8b9c0d-1e2f-4a3b-8c9d-0e1f2a3b4c5d
Response Body Structure (JSON)15 required • 24 optional
idstring (UUID)
Required

Scanner profile identifier.

namestring
Required

Profile name.

templateIdstring (UUID)
Required

Primary template.

templateNamestring
Required

Primary template name.

scanModestring (enum)
Required

Scan behavior.

Allowed values:SAVE_ATTENDANCEVOIDED_AFTER_SCANINVALIDATE_AFTER_SCANCHECK_INCHECK_OUTCHECK_IN_CHECK_OUT_TOGGLE
typestring (enum)
Required

Scanner platform.

Allowed values:SMART_SCAN_APPVALIDATION_LINK
allowColorOverrideboolean
Required

Colors may be overridden by the link.

showStoredValueboolean
Required

Show the stored value.

incrementStoredValueboolean
Required

Increment the stored value.

doesNotExpireboolean
Required

The profile never expires.

isActiveboolean
Required

The profile is active.

linkCountnumber
Required

Number of scanner access links.

eventCountnumber
Required

Number of scan events.

createdAtstring (ISO 8601)
Required

Creation timestamp.

updatedAtstring (ISO 8601)
Required

Last update timestamp.

Response Status Codes

POSThttps://api.passinstance.com/api/v1/validation/configsAPI Key
Scanner Configuration

Create Scanner Configuration

Create a new scanner configuration profile defining which templates can be scanned, the validation mode (check-in, single-use voiding, loyalty increment), and anti-replay cooldown rules.

Headers1 required
X-API-Keystring
Required

Workspace secret API key (pi_live_... or pi_test_...). You may alternatively send Authorization: ApiKey <key>.

Example: pi_live_98a7b6c5d4e3f2a1

Scanner configuration profile name, primary templateId, scanMode, platform type, optional additional allowedTemplates, and optional cooldown duration in hours.

Request Body4 required • 16 optional
namestring
Required

Human-readable name for the scanner configuration.

Example: Main Entrance Gate Scanners
templateIdstring (UUID)
Required

Primary template UUID for pass validation under this profile.

Example: tpl_8f2a1e0b-3c4d-4e5f-9a1b-2c3d4e5f6a7b
scanModestring (enum)
Required

Scanning behavior: SAVE_ATTENDANCE, VOIDED_AFTER_SCAN, INVALIDATE_AFTER_SCAN, CHECK_IN, CHECK_OUT, or CHECK_IN_CHECK_OUT_TOGGLE.

Allowed values:SAVE_ATTENDANCEVOIDED_AFTER_SCANINVALIDATE_AFTER_SCANCHECK_INCHECK_OUTCHECK_IN_CHECK_OUT_TOGGLE
Example: CHECK_IN
typestring (enum)
Required

Scanner platform type: SMART_SCAN_APP or VALIDATION_LINK.

Allowed values:SMART_SCAN_APPVALIDATION_LINK
Example: SMART_SCAN_APP
Response Body Structure (JSON)15 required • 24 optional
idstring (UUID)
Required

Scanner profile identifier.

namestring
Required

Profile name.

templateIdstring (UUID)
Required

Primary template.

templateNamestring
Required

Primary template name.

scanModestring (enum)
Required

Scan behavior.

Allowed values:SAVE_ATTENDANCEVOIDED_AFTER_SCANINVALIDATE_AFTER_SCANCHECK_INCHECK_OUTCHECK_IN_CHECK_OUT_TOGGLE
typestring (enum)
Required

Scanner platform.

Allowed values:SMART_SCAN_APPVALIDATION_LINK
allowColorOverrideboolean
Required

Colors may be overridden by the link.

showStoredValueboolean
Required

Show the stored value.

incrementStoredValueboolean
Required

Increment the stored value.

doesNotExpireboolean
Required

The profile never expires.

isActiveboolean
Required

The profile is active.

linkCountnumber
Required

Number of scanner access links.

eventCountnumber
Required

Number of scan events.

createdAtstring (ISO 8601)
Required

Creation timestamp.

updatedAtstring (ISO 8601)
Required

Last update timestamp.

Response Status Codes

PUThttps://api.passinstance.com/api/v1/validation/configs/{id}API Key
Scanner Configuration

Update Scanner Configuration

Update an existing scanner profile's scanMode, stored-value rules, colors, NFC settings, or custom operator scan fields.

Headers1 required
X-API-Keystring
Required

Workspace secret API key (pi_live_... or pi_test_...). You may alternatively send Authorization: ApiKey <key>.

Example: pi_live_98a7b6c5d4e3f2a1
Path Parameters1 required
idstring (UUID)UUID v4
Required

Scanner configuration UUID to update.

Example: cfg_12a3b4c5-6d7e-8f9a-0b1c-2d3e4f5a6b7c

Partial UpdateScannerConfigurationDto payload. Increments the profile version automatically.

Request Body20 optional
Response Body Structure (JSON)15 required • 24 optional
idstring (UUID)
Required

Scanner profile identifier.

namestring
Required

Profile name.

templateIdstring (UUID)
Required

Primary template.

templateNamestring
Required

Primary template name.

scanModestring (enum)
Required

Scan behavior.

Allowed values:SAVE_ATTENDANCEVOIDED_AFTER_SCANINVALIDATE_AFTER_SCANCHECK_INCHECK_OUTCHECK_IN_CHECK_OUT_TOGGLE
typestring (enum)
Required

Scanner platform.

Allowed values:SMART_SCAN_APPVALIDATION_LINK
allowColorOverrideboolean
Required

Colors may be overridden by the link.

showStoredValueboolean
Required

Show the stored value.

incrementStoredValueboolean
Required

Increment the stored value.

doesNotExpireboolean
Required

The profile never expires.

isActiveboolean
Required

The profile is active.

linkCountnumber
Required

Number of scanner access links.

eventCountnumber
Required

Number of scan events.

createdAtstring (ISO 8601)
Required

Creation timestamp.

updatedAtstring (ISO 8601)
Required

Last update timestamp.

Response Status Codes

DELETEhttps://api.passinstance.com/api/v1/validation/configs/{id}API Key
Scanner Configuration

Delete Scanner Configuration

Delete a scanner profile and revoke associated validation link access. Returns HTTP 204 No Content.

Headers1 required
X-API-Keystring
Required

Workspace secret API key (pi_live_... or pi_test_...). You may alternatively send Authorization: ApiKey <key>.

Example: pi_live_98a7b6c5d4e3f2a1
Path Parameters1 required
idstring (UUID)UUID v4
Required

Scanner configuration UUID to delete.

Example: cfg_12a3b4c5-6d7e-8f9a-0b1c-2d3e4f5a6b7c
Response Body Structure (JSON)1 required
(empty body)void (HTTP 204)
Required

Returns HTTP 204 No Content with an empty response body upon successful deletion.

Response Status Codes

Scan Operations

6 endpoints
GEThttps://api.passinstance.com/api/v1/validation/scansAPI Key
Scan Operations

List Scan Records

Retrieve a paginated audit log of recorded pass scans across your scanner configurations, filterable by scanner profile, template, or validation outcome.

Headers1 required
X-API-Keystring
Required

Workspace secret API key (pi_live_... or pi_test_...). You may alternatively send Authorization: ApiKey <key>.

Example: pi_live_98a7b6c5d4e3f2a1
Query Parameters3 optional
Response Body Structure (JSON)4 required
successboolean
Required

Indicates whether the API request succeeded.

Example: true
dataobject
Required

Primary resource or operation result payload.

errorsarray
Required

List of error messages (empty array on success).

statusCodenumber
Required

HTTP status code mirrored in the JSON envelope.

Example: 200

Response Status Codes

POSThttps://api.passinstance.com/api/v1/scansScanner Key
Scan Operations

Record Pass Scan

Validate an optical barcode, QR code, or Apple VAS / Google Smart Tap NFC scan payload from a terminal or mobile scanner through the deterministic scan validation rule engine.

Headers3 required • 1 optional
x-scanner-keystring
Required

Scoped scanner configuration key provisioned in the Dashboard or via scanner pairing link.

Example: scan_key_77a8b9c0d1e2f3a4b5c6d7e8
Content-Typestring
Required

Must be application/json.

Example: application/json
x-idempotency-keystring
Required

Required unique key (UUID or client token) guaranteeing idempotent scan execution across network retries.

Example: scan-op-9b1deb4d-3b7d-4bad-9bdd

Request payload containing scanned barcode string, optional anti-replay nonce, channel/protocol metadata, and operator context.

Request Body1 required • 13 optional
scannedBarcodeValuestring
Required

The raw payload string read from the QR code, PDF417, CODE128, AZTEC, or NFC tap.

Example: PI-8891-JD-VIP
Response Body Structure (JSON)1 required • 20 optional
decisionstring (enum)
Required

Outcome of the validation pipeline.

Allowed values:SUCCESSFAILEDALREADY_USEDALREADY_VOIDEDEXPIREDINVALID

Response Status Codes

GEThttps://api.passinstance.com/api/v1/scans/result/{scanId}Scanner Key
Scan Operations

Get Scan Result by ID

Retrieve the decision, rule trace, pass snapshot, and effects of a previously processed scan by UUID using a scanner key.

Headers1 required
x-scanner-keystring
Required

Scoped scanner device key issued via pairing link or scanner-keys API.

Example: scan_key_77a8b9c0d1e2f3a4
Path Parameters1 required
scanIdstring (UUID)UUID v4
Required

Scan record UUID.

Example: scn_3c4d5e6f-7a8b-4c9d-8e1f-2a3b4c5d6e7f
Response Body Structure (JSON)1 required • 20 optional
decisionstring (enum)
Required

Outcome of the validation pipeline.

Allowed values:SUCCESSFAILEDALREADY_USEDALREADY_VOIDEDEXPIREDINVALID

Response Status Codes

POSThttps://api.passinstance.com/api/v1/scans/prepareScanner Key
Scan Operations

Prepare Anti-Replay Scan Nonce

Issue a short-lived cryptographic anti-replay nonce bound to a pass barcode prior to executing POST /api/v1/scans.

Headers1 required
x-scanner-keystring
Required

Scoped scanner configuration key provisioned in the Dashboard or via scanner pairing link.

Example: scan_key_77a8b9c0d1e2f3a4b5c6d7e8

Request payload containing the scanned barcode value to bind the cryptographic nonce to.

Request Body1 required
scannedBarcodeValuestring
Required

Barcode or NFC token string to bind the anti-replay nonce to.

Example: PI-8891-JD-VIP
Response Body Structure (JSON)3 required
successboolean
Required

Indicates whether the API request succeeded.

Example: true
dataobject
Required

Primary resource or operation result payload.

metadataobject
Required

Returned metadata property.

Response Status Codes

GEThttps://api.passinstance.com/api/v1/scans/passScanner Key
Scan Operations

Lookup Pass by Barcode (Read-Only)

Inspect current pass status, tier, stored value, and attributes for a scanned barcode using a scanner key without creating a scan record or mutating balances.

Headers1 required
x-scanner-keystring
Required

Scoped scanner device key issued via pairing link or scanner-keys API.

Example: scan_key_77a8b9c0d1e2f3a4
Query Parameters1 required
barcodestring
Required

Scanned barcode or NFC payload value (passed as query parameter to preserve URL-shaped payloads).

Example: MEMBER-2026-8891
Response Body Structure (JSON)7 required • 8 optional
passIdstring (UUID)
Required

Pass id.

templateIdstring (UUID)
Required

Template id.

statusstring
Required

Pass status.

isExpiredboolean
Required

The pass is expired.

isVoidedboolean
Required

The pass is voided.

barcodeValuestring
Required

Barcode value.

checkedAtstring (ISO 8601)
Required

Time of the lookup.

Response Status Codes

GEThttps://api.passinstance.com/api/v1/scans/offline-datasetScanner Key
Scan Operations

Get Offline Scanner Dataset

Download a cursor-paginated pass snapshot dataset scoped to the calling x-scanner-key for local offline validation when network connectivity drops.

Headers1 required
x-scanner-keystring
Required

Scoped scanner configuration key provisioned in the Dashboard or via scanner pairing link.

Example: scan_key_77a8b9c0d1e2f3a4b5c6d7e8
Query Parameters3 optional
Response Body Structure (JSON)5 required
successboolean
Required

true when the operation succeeded, false for every error response.

dataobjectSchema
Required

Cursor-paginated offline scanner dataset.

descriptionstring
Required

Human-readable summary of the result.

errorsstring[]
Required

Error messages. Empty array on success.

statusCodenumber
Required

HTTP status code mirrored in the body.

Response Status Codes

Objects & Data Structures

6 objects

Canonical request and response objects for this API domain. Expand any nested object or array property to inspect every field, allowed enum value, and validation constraint.

ScannerConfiguration

Object66 properties

A scanner profile as returned by the validation configs endpoints.

Object Properties15 required • 24 optional
idstring (UUID)
Required

Scanner profile identifier.

namestring
Required

Profile name.

templateIdstring (UUID)
Required

Primary template.

templateNamestring
Required

Primary template name.

scanModestring (enum)
Required

Scan behavior.

Allowed values:SAVE_ATTENDANCEVOIDED_AFTER_SCANINVALIDATE_AFTER_SCANCHECK_INCHECK_OUTCHECK_IN_CHECK_OUT_TOGGLE
typestring (enum)
Required

Scanner platform.

Allowed values:SMART_SCAN_APPVALIDATION_LINK
allowColorOverrideboolean
Required

Colors may be overridden by the link.

showStoredValueboolean
Required

Show the stored value.

incrementStoredValueboolean
Required

Increment the stored value.

doesNotExpireboolean
Required

The profile never expires.

isActiveboolean
Required

The profile is active.

linkCountnumber
Required

Number of scanner access links.

eventCountnumber
Required

Number of scan events.

createdAtstring (ISO 8601)
Required

Creation timestamp.

updatedAtstring (ISO 8601)
Required

Last update timestamp.

ScannerConfigurationInput

Object39 properties

Body of POST and PUT /validation/configs. PUT accepts any subset.

Object Properties4 required • 16 optional
namestringmax 255 chars
Required

Scanner profile name.

templateIdstring (UUID)
Required

Primary template accepted by the profile.

scanModestring (enum)
Required

How passes are processed when scanned.

Allowed values:SAVE_ATTENDANCEVOIDED_AFTER_SCANINVALIDATE_AFTER_SCANCHECK_INCHECK_OUTCHECK_IN_CHECK_OUT_TOGGLE
typestring (enum)
Required

Scanner platform.

Allowed values:SMART_SCAN_APPVALIDATION_LINK

ScanRequest

Object21 properties

Body of POST /scans.

Object Properties1 required • 16 optional
scannedBarcodeValuestring
Required

Barcode or NFC payload read by the scanner.

ScanResponse

Object70 properties

Result of POST /scans. Returned directly, not wrapped in the standard envelope.

Object Properties1 required • 20 optional
decisionstring (enum)
Required

Outcome of the validation pipeline.

Allowed values:SUCCESSFAILEDALREADY_USEDALREADY_VOIDEDEXPIREDINVALID

PassLookup

Object17 properties

Read-only pass state returned by GET /scans/pass. Returned directly, not wrapped in the standard envelope.

Object Properties7 required • 8 optional
passIdstring (UUID)
Required

Pass id.

templateIdstring (UUID)
Required

Template id.

statusstring
Required

Pass status.

isExpiredboolean
Required

The pass is expired.

isVoidedboolean
Required

The pass is voided.

barcodeValuestring
Required

Barcode value.

checkedAtstring (ISO 8601)
Required

Time of the lookup.

OfflineScanDataset

Object47 properties

Cursor-paginated snapshot for offline scanners. Returned inside the standard envelope.

Object Properties5 required • 2 optional
configobject
Required

Scanner configuration snapshot.

passesarray of objects
Required

Pass snapshots for local validation.

hasMoreboolean
Required

More pages are available.

snapshotAtstring (ISO 8601)
Required

Time the snapshot was taken.

totalPassesnumber
Required

Total number of passes in the snapshot.

templatesarray of objects
Optional

Template summaries.

nextCursorstring
Optional

Cursor for the next page.