SmartGare
API referenceEndpoints

Create a one-off departure

Adds a departure no schedule produces, when the station's one-off-service rule permits it. Every stop of the itinerary needs a call. **Required permission:** `traffic.departure:write`

POST/traffic/v1/departures

Adds a departure no schedule produces, when the station's one-off-service rule permits it. Every stop of the itinerary needs a call.

Required permission: traffic.departure:write

AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*CreateOneOffDepartureRequest

Response Body

*/*

curl -X POST "https://example.com/traffic/v1/departures" \  -H "Content-Type: application/json" \  -d '{    "calls": [      {        "service_kind": "BOARD_ONLY",        "stop_id": "string"      }    ],    "itinerary_id": "string",    "reason": "string",    "timetable_service_date": "2019-08-24"  }'
{  "calls": [    {      "announced_departure": true,      "arrival_time": "string",      "day_offset": 0,      "departure_time": "string",      "service_kind": "BOARD_ONLY",      "stop_id": "string"    }  ],  "departure": {    "closed_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "delay_minutes": 0,    "departure_at": "2019-08-24T14:15:22Z",    "generation_source": "SCHEDULE",    "id": "string",    "itinerary_id": "string",    "line_id": "string",    "planned_departure_at": "2019-08-24T14:15:22Z",    "planned_station_call_local_datetime": "2019-08-24T14:15:22Z",    "schedule_id": "string",    "station_call_local_datetime": "2019-08-24T14:15:22Z",    "station_operational_date": "2019-08-24",    "status": "SCHEDULED",    "timetable_service_date": "2019-08-24",    "updated_at": "2019-08-24T14:15:22Z"  },  "one_off_rule_version": 0,  "one_off_rule_version_id": "string"}