SmartGare
API referenceEndpoints

Issue a temporary access code

Hands a stuck driver a short-lived keypad code for this visit, recording who issued it, why, and how far it reaches. **The code is in this answer and nowhere else** — only a one-way hash is kept, so it cannot be read back and an operator who loses it issues another. How far it reaches is the station's versioned policy, not a choice made here; a station that has authored none issues no code at all. **Required permission:** `cycle.access-code:write`

POST/cycle/v1/coach-cycles/{id}/temporary-access-codes

Hands a stuck driver a short-lived keypad code for this visit, recording who issued it, why, and how far it reaches. The code is in this answer and nowhere else — only a one-way hash is kept, so it cannot be read back and an operator who loses it issues another. How far it reaches is the station's versioned policy, not a choice made here; a station that has authored none issues no code at all.

Required permission: cycle.access-code:write

AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*IssueTemporaryAccessCodeRequest

Response Body

*/*

*/*

curl -X POST "https://example.com/cycle/v1/coach-cycles/string/temporary-access-codes" \  -H "Content-Type: application/json" \  -d '{    "access_point_id": "string",    "purpose": "STATION_ENTRY",    "reason": "string"  }'
{  "access_point_id": "string",  "code": "string",  "cycle_id": "string",  "expires_at": "2019-08-24T14:15:22Z",  "id": "string",  "issued_at": "2019-08-24T14:15:22Z",  "issued_by": "string",  "permitted_purposes": [    "STATION_ENTRY"  ],  "scope": "SINGLE_PASSAGE"}