Passes REST API
All pass operations use the REST API at /api/v2.
For a guided walkthrough, see the Working with Passes guide.
Endpoints
Section titled “Endpoints”| Method | Endpoint | Description |
|---|---|---|
GET | /api/v2/organisations/{orgId}/passes/{passKey} | Retrieve a pass type by key |
GET | /api/v2/organisations/{orgId}/passes/{passKey}/{passId} | Retrieve a specific pass |
PUT | /api/v2/organisations/{orgId}/passes/{passKey}/{passId} | Update a pass |
DELETE | /api/v2/organisations/{orgId}/passes/{passKey}/{passId} | Delete a pass |
Path parameters
Section titled “Path parameters”| Parameter | Description |
|---|---|
orgId | Organisation UUID |
passKey | The pass type’s unique key (set when creating the pass type in the UI) |
passId | The individual pass’s ID |
Pass input schema (PUT)
Section titled “Pass input schema (PUT)”| Property | Type | Required | Description |
|---|---|---|---|
attributes | object | Yes | Key-value pairs (e.g. driver name, vehicle rego) |
url | string | Yes | URL for additional details |
validity | DateRange | No | { begin, end } — validity period |
Pass response schema (GET)
Section titled “Pass response schema (GET)”| Property | Type | Description |
|---|---|---|
id | string | Pass identifier |
attributes | object | Key-value attributes |
validity | object | { begin, end } date range |
url | string | Associated URL |
createdAt | string | ISO 8601 creation timestamp |
modifiedAt | string | ISO 8601 last modified timestamp |
Example response
Section titled “Example response”{ "id": "0400102390", "attributes": { "Driver Name": "Mack", "Rego": "XYZ 123" }, "validity": { "begin": "2024-01-01T00:00Z", "end": "2024-12-01T00:00Z" }, "url": "https://example.com/passes/0400102390", "createdAt": "2023-09-11T23:31:50.69", "modifiedAt": "2023-09-12T02:05:22.073"}