Afaq DigitalSendTo Wallet

Developers

A JSON REST API over HTTPS. Your system issues, updates and voids passes; we handle the signing and Apple.

The basics

  • Every path is under /api/v1
  • The key goes in the header X-Api-Key
  • Every issue, void or stamp accepts Idempotency-Key
  • Each key has a per-minute request limit; going over it returns 429 with Retry-After. One batch holds up to 500 passes.
  • Errors are Problem Details, with the reason and the fix.

Operations

POST /api/v1/passesIssue a pass from a template
POST /api/v1/passes/batchIssue a batch
PATCH /api/v1/passes/{serial}Update a pass's fields; the change reaches the device
POST /api/v1/passes/{serial}/voidVoid a pass
POST /api/v1/passes/{serial}/stampsAdd stamps to a loyalty card
GET /api/v1/passes/by-ref/{ref}Read the status by your own reference

Voiding only turns the barcode off: the pass stays in the customer's Wallet and is not removed.

Documentation

Keys are created in your account's dashboard and shown once. Never put them in git or in logs.