SmartGare
API referenceEndpoints

Read a departure's seat inventory

Returns the departure's capacity — null while nobody has stated it — every stretch of its route from one stop to the next with the seats sold, held and available there, every declaration, and how many of its tickets the station's cancellation of the departure affected, to refund or rebook. For a coach with numbered seats, `numbered_seats` is true and `seat_map` lists its seats in display order, each saying whether it is still `free`. **Required permission:** `ticketing.seat-inventory:read`

GET/ticketing/v1/departures/{departureId}/seat-inventory

Returns the departure's capacity — null while nobody has stated it — every stretch of its route from one stop to the next with the seats sold, held and available there, every declaration, and how many of its tickets the station's cancellation of the departure affected, to refund or rebook. For a coach with numbered seats, numbered_seats is true and seat_map lists its seats in display order, each saying whether it is still free.

Required permission: ticketing.seat-inventory:read

AuthorizationBearer <token>

In: header

Response Body

*/*

curl -X GET "https://example.com/ticketing/v1/departures/{departureId}/seat-inventory"
{  "capacity": 0,  "capacity_source": "DECLARED",  "declarations": [    {      "assignment_id": "string",      "declared_at": "2019-08-24T14:15:22Z",      "declared_by": "string",      "id": "string",      "reason": "string",      "seats": 0    }  ],  "departure_id": "string",  "numbered_seats": true,  "seat_map": [    {      "free": true,      "label": "string"    }  ],  "stretches": [    {      "available": 0,      "from_station_id": "string",      "held": 0,      "shortage": 0,      "sold": 0,      "to_station_id": "string"    }  ],  "tickets_affected_by_cancellation": 0}