SmartGare
API referenceEndpoints

Report a code typed at a keypad

Checks what was typed and records the attempt. **The answer is the same whatever the station concluded** — a wrong code, an expired one, one ended by hand and one used at the wrong point are indistinguishable from here, because a keypad that answered differently would tell whoever is standing at it which they hold. What the station concluded is stored and read afterwards. A right code says which coach is at the point; it allows nothing. **Required permission:** `cycle.coach-cycle:write`

POST/cycle/v1/temporary-access-code-presentations

Checks what was typed and records the attempt. The answer is the same whatever the station concluded — a wrong code, an expired one, one ended by hand and one used at the wrong point are indistinguishable from here, because a keypad that answered differently would tell whoever is standing at it which they hold. What the station concluded is stored and read afterwards. A right code says which coach is at the point; it allows nothing.

Required permission: cycle.coach-cycle:write

AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*PresentTemporaryAccessCodeRequest

Response Body

*/*

*/*

curl -X POST "https://example.com/cycle/v1/temporary-access-code-presentations" \  -H "Content-Type: application/json" \  -d '{    "access_point_id": "string",    "code": "string",    "direction": "INBOUND",    "lane_id": "string",    "purpose": "STATION_ENTRY",    "reading_id": "string",    "source": "string"  }'
{  "access_attempt_id": "string",  "duplicate": true,  "id": "string"}