SmartGare
API referenceEndpoints

Mark a bay occupied

Records the moment a coach starts standing at the bay. The first observation is the bay's answer: an identical one changes nothing, one from the same source is a conflict, and one from another accepted source either corroborates it or opens a disagreement beside it. **Required permission:** `traffic.assignment:write`

POST/traffic/v1/bay-assignments/{id}/occupancy

Records the moment a coach starts standing at the bay. The first observation is the bay's answer: an identical one changes nothing, one from the same source is a conflict, and one from another accepted source either corroborates it or opens a disagreement beside it.

Required permission: traffic.assignment:write

AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*MarkBayOccupiedRequest

Response Body

*/*

*/*

curl -X POST "https://example.com/traffic/v1/bay-assignments/string/occupancy" \  -H "Content-Type: application/json" \  -d '{    "occupied_at": "2019-08-24T14:15:22Z",    "source": "string",    "vehicle_id": "string"  }'
{  "bay_assignment_id": "string",  "bay_id": "string",  "correction_status": "NONE",  "freed_at": "2019-08-24T14:15:22Z",  "freed_by": "string",  "freed_source": "string",  "id": "string",  "occupied_at": "2019-08-24T14:15:22Z",  "occupied_by": "string",  "occupied_source": "string",  "vehicle_id": "string"}