API showdown///
- Train Travel
Train Travel API
- Create a booking
List existing bookings
Get a booking
Delete a booking
New Booking
Create a booking
A booking is a temporary hold on a trip. It is not confirmed until the payment is processed.
Security
OAuth2(Required scopes: write)
- Mock serverhttps://innovario.apishowdown.com/_mock/catalog/api-showdown/api-hub/train-travel/openapi/bookings
- Productionhttps://api.example.com/bookings
- application/json
- application/xml
curl -i -X POST \
https://innovario.apishowdown.com/_mock/catalog/api-showdown/api-hub/train-travel/openapi/bookings \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"trip_id": "4f4e4e1-c824-4d63-b37a-d8d698862f1d",
"passenger_name": "John Doe",
"has_bicycle": true,
"has_dog": true
}'Booking successful
Response
- application/json
- application/xml
{ "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", "passenger_name": "John Doe", "has_bicycle": true, "has_dog": true, "links": { "self": "https://api.example.com/bookings/efdbb9d1-02c2-4bc3-afb7-6788d8782b1e" } }