SmartGare
API referenceEndpoints

Record a confirmed exit passage

Stores the reading and, when the coach's record agrees, ends its visit at the passage instant. The coach is named either by the station-exit presentation that identified it or directly by the producer, never both. A reading that closes nothing is still stored, and says why — including one the station could not attribute to any coach. **Required permission:** `cycle.coach-cycle:write`

POST/cycle/v1/exit-passages

Stores the reading and, when the coach's record agrees, ends its visit at the passage instant. The coach is named either by the station-exit presentation that identified it or directly by the producer, never both. A reading that closes nothing is still stored, and says why — including one the station could not attribute to any coach.

Required permission: cycle.coach-cycle:write

AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*RecordExitPassageRequest

Response Body

*/*

*/*

curl -X POST "https://example.com/cycle/v1/exit-passages" \  -H "Content-Type: application/json" \  -d '{    "occurred_at": "2019-08-24T14:15:22Z",    "reading_id": "string",    "source": "string"  }'
{  "access_attempt_id": "string",  "access_point_id": "string",  "duplicate": true,  "id": "string",  "matched_cycle_id": "string",  "occurred_at": "2019-08-24T14:15:22Z",  "outcome": "CYCLE_CLOSED",  "reading_id": "string",  "recorded_at": "2019-08-24T14:15:22Z",  "recorded_by": "string",  "source": "string",  "vehicle_id": "string"}