SmartGare
API referenceEndpoints

Put a coach under an authorization

Records which vehicle runs under the authorization from a date. Any coach in place is closed the day before — the register carries one vehicle per authorization number. Dated on the first day of the coach in place, it corrects a coach named by mistake instead: the coach in place is replaced and the new one covers from that same day, unless the station's rule refuses it. The correction requires a reason and is kept in the authorization's history with who and when. **Required permission:** `referential.authorization:write`

POST/referential/v1/authorizations/{id}/vehicle-coverages

Records which vehicle runs under the authorization from a date. Any coach in place is closed the day before — the register carries one vehicle per authorization number. Dated on the first day of the coach in place, it corrects a coach named by mistake instead: the coach in place is replaced and the new one covers from that same day, unless the station's rule refuses it. The correction requires a reason and is kept in the authorization's history with who and when.

Required permission: referential.authorization:write

AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*CoverVehicleByTransportAuthorizationRequest

Response Body

*/*

*/*

curl -X POST "https://example.com/referential/v1/authorizations/string/vehicle-coverages" \  -H "Content-Type: application/json" \  -d '{    "effective_from": "2019-08-24",    "vehicle_id": "string"  }'
{  "id": "string"}