REST API reference
Omio API
10 endpoints for Omio. Each one is a POST with a JSON body, called with your API key.
- Base URL
- https://cotlet.dev/api/v1/omio
- Connects with
- Your own Omio account
- Integration page
- Omio
| Endpoint | Access | Description |
|---|---|---|
| search_trips | read | Trains, buses, flights and ferries between two places on a date, with times, duration, changes, operator and price. |
| get_trip | read | Legs of one trip and its fare options with their conditions: exchangeable, refundable, Omio Flex. |
| list_bookings | read | Bookings from Your Bookings with route, date, operator and status. |
| get_booking | read | Journey, passengers, fare conditions, Omio Flex, confirmation status and price paid for one booking. |
| get_tickets | read | The tickets Your Bookings shows for a confirmed booking. |
| get_change_options | read | For an exchangeable fare: the travel options for a new date and the fee for each. |
| get_cancellation_quote | read | Refund amount and non-refundable fees before you cancel, or why the fare cannot be cancelled online. |
| book_trip | write | Book a fare on your account. You confirm the total, including the service fee, before anything is paid. |
| change_booking | write | Switch an exchangeable ticket to another departure. You confirm the fee first. |
| cancel_booking | write | Cancel a refundable booking, or one with Omio Flex, and get the refund Omio quotes. |
Search trips
readPOST https://cotlet.dev/api/v1/omio/search_trips
Searches Omio for one route and date. Each result has an operator, departure and arrival, duration, number of changes and the lowest price, so your agent can rank by price or travel time. Pass the trip_id of a result to get_trip for its fares.
Parameters
| Name | Type | Description |
|---|---|---|
| from required | string | Departure city or station, e.g. "Amsterdam". |
| to required | string | Arrival city or station. |
| date required | date | Departure date. |
| return_date | date | Return date for a round trip. |
| passengers | object | Count per passenger type, as in the Omio search form, e.g. { "adult": 2 }. Default: 1 adult. |
| modes | string[] | Any of train, bus, flight, ferry. Default: all. |
| limit | integer | 1 to 50. Default: 20. |
Request
curl -X POST https://cotlet.dev/api/v1/omio/search_trips \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"from":"Amsterdam","to":"to","date":"2026-10-01"}' result = client.call("omio", "search_trips", {"from":"Amsterdam","to":"to","date":"2026-10-01"}) const result = await cotlet.call('omio', 'search_trips', {"from":"Amsterdam","to":"to","date":"2026-10-01"}); cotlet call omio search_trips --data '{"from":"Amsterdam","to":"to","date":"2026-10-01"}' Example response
{
"trips": [
{
"trip_id": "trp_7f3k29qa",
"mode": "train",
"operator": "Deutsche Bahn",
"departs": "2026-11-19T09:37:00+01:00",
"arrives": "2026-11-19T17:05:00+01:00",
"duration": "7h 28m",
"changes": 1,
"price": {
"amount": 89,
"currency": "EUR"
}
},
{
"trip_id": "trp_2c9d41bz",
"mode": "bus",
"operator": "FlixBus",
"departs": "2026-11-19T10:15:00+01:00",
"arrives": "2026-11-19T22:40:00+01:00",
"duration": "12h 25m",
"changes": 0,
"price": {
"amount": 54.99,
"currency": "EUR"
}
},
{
"trip_id": "trp_5a1h88mx",
"mode": "flight",
"operator": "Lufthansa",
"departs": "2026-11-19T11:20:00+01:00",
"arrives": "2026-11-19T12:45:00+01:00",
"duration": "1h 25m",
"changes": 0,
"price": {
"amount": 142,
"currency": "EUR"
}
}
]
} Get trip
readPOST https://cotlet.dev/api/v1/omio/get_trip
Returns the legs of one search result and every fare option for it with the price and its conditions. Exchangeable decides whether you can change the ticket online later; refundable decides whether you can cancel it online. Pass fare_id to book_trip.
Parameters
| Name | Type | Description |
|---|---|---|
| trip_id required | string | Trip ID from search_trips. |
Request
curl -X POST https://cotlet.dev/api/v1/omio/get_trip \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"trip_id":"trip_8c41d2"}' result = client.call("omio", "get_trip", {"trip_id":"trip_8c41d2"}) const result = await cotlet.call('omio', 'get_trip', {"trip_id":"trip_8c41d2"}); cotlet call omio get_trip --data '{"trip_id":"trip_8c41d2"}' Example response
{
"trip_id": "trp_7f3k29qa",
"mode": "train",
"operator": "Deutsche Bahn",
"legs": [
{
"from": "Amsterdam Centraal",
"to": "Köln Hbf",
"departs": "2026-11-19T09:37:00+01:00",
"arrives": "2026-11-19T12:19:00+01:00"
},
{
"from": "Köln Hbf",
"to": "München Hbf",
"departs": "2026-11-19T12:49:00+01:00",
"arrives": "2026-11-19T17:05:00+01:00"
}
],
"fares": [
{
"fare_id": "fare_2nd_refundable",
"class": "2nd",
"price": {
"amount": 89,
"currency": "EUR"
},
"exchangeable": false,
"refundable": true,
"omio_flex_available": true
},
{
"fare_id": "fare_2nd_saver",
"class": "2nd",
"price": {
"amount": 69,
"currency": "EUR"
},
"exchangeable": false,
"refundable": false,
"omio_flex_available": true
}
]
} List bookings
readPOST https://cotlet.dev/api/v1/omio/list_bookings
Reads Your Bookings and returns the trips on your account, upcoming by default, with route, departure, operator and status. Use booking_id with the other booking tools.
Parameters
| Name | Type | Description |
|---|---|---|
| status | enum | upcoming, past, cancelled or all. Default: upcoming. |
| limit | integer | 1 to 100. Default: 20. |
Request
curl -X POST https://cotlet.dev/api/v1/omio/list_bookings \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("omio", "list_bookings") const result = await cotlet.call('omio', 'list_bookings'); cotlet call omio list_bookings Example response
{
"bookings": [
{
"booking_id": "OM58214793",
"route": "Amsterdam Centraal to München Hbf",
"departs": "2026-11-19T09:37:00+01:00",
"operator": "Deutsche Bahn",
"status": "confirmed"
},
{
"booking_id": "OM61903278",
"route": "Paris Gare du Nord to Bruxelles-Midi",
"departs": "2026-11-18T09:13:00+01:00",
"operator": "Eurostar",
"status": "confirmed"
},
{
"booking_id": "OM47720516",
"route": "Madrid Atocha to València Joaquín Sorolla",
"departs": "2026-12-03T08:20:00+01:00",
"operator": "Renfe",
"status": "confirmed"
}
]
} Get booking
readPOST https://cotlet.dev/api/v1/omio/get_booking
Returns one booking: the journey, travelers, fare conditions (exchangeable, refundable), whether Omio Flex was added, the confirmation status and the price paid. Your agent reads the conditions to know whether it can still change or cancel the trip.
Parameters
| Name | Type | Description |
|---|---|---|
| booking_id required | string | Booking ID from list_bookings. |
Request
curl -X POST https://cotlet.dev/api/v1/omio/get_booking \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"booking_id":"booking_8c41d2"}' result = client.call("omio", "get_booking", {"booking_id":"booking_8c41d2"}) const result = await cotlet.call('omio', 'get_booking', {"booking_id":"booking_8c41d2"}); cotlet call omio get_booking --data '{"booking_id":"booking_8c41d2"}' Example response
{
"booking_id": "OM58214793",
"status": "confirmed",
"route": "Amsterdam Centraal to München Hbf",
"departs": "2026-11-19T09:37:00+01:00",
"operator": "Deutsche Bahn",
"passengers": [
{
"first_name": "Alex",
"last_name": "Example"
}
],
"fare": {
"class": "2nd",
"exchangeable": false,
"refundable": true
},
"omio_flex": false,
"total": {
"amount": 92.98,
"currency": "EUR"
}
} Get tickets
readPOST https://cotlet.dev/api/v1/omio/get_tickets
Returns the ticket entries Your Bookings shows for a confirmed booking: the type of each ticket and a link to it where Omio offers one. A booking that is not confirmed has no tickets yet and the call says so.
Parameters
| Name | Type | Description |
|---|---|---|
| booking_id required | string | Booking ID from list_bookings. |
Request
curl -X POST https://cotlet.dev/api/v1/omio/get_tickets \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"booking_id":"booking_8c41d2"}' result = client.call("omio", "get_tickets", {"booking_id":"booking_8c41d2"}) const result = await cotlet.call('omio', 'get_tickets', {"booking_id":"booking_8c41d2"}); cotlet call omio get_tickets --data '{"booking_id":"booking_8c41d2"}' Example response
{
"booking_id": "OM58214793",
"tickets": [
{
"passenger": "Alex Example",
"type": "e-ticket",
"url": "https://www.omio.com/mybookings"
}
]
} Get change options
readPOST https://cotlet.dev/api/v1/omio/get_change_options
Returns the other travel options Omio offers for a new date on an exchangeable booking, each with the price difference and fee. Omio allows online changes only for exchangeable fares; for any other fare the call returns why the ticket cannot be changed online. Pass option_id to change_booking.
Parameters
| Name | Type | Description |
|---|---|---|
| booking_id required | string | Booking ID from list_bookings. |
| date required | date | New departure date. |
Request
curl -X POST https://cotlet.dev/api/v1/omio/get_change_options \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"booking_id":"booking_8c41d2","date":"2026-10-01"}' result = client.call("omio", "get_change_options", {"booking_id":"booking_8c41d2","date":"2026-10-01"}) const result = await cotlet.call('omio', 'get_change_options', {"booking_id":"booking_8c41d2","date":"2026-10-01"}); cotlet call omio get_change_options --data '{"booking_id":"booking_8c41d2","date":"2026-10-01"}' Example response
{
"booking_id": "OM61903278",
"options": [
{
"option_id": "opt_8841",
"departs": "2026-11-20T15:13:00+01:00",
"arrives": "2026-11-20T16:35:00+01:00",
"price_difference": {
"amount": 12,
"currency": "EUR"
},
"fee": {
"amount": 5,
"currency": "EUR"
},
"total": {
"amount": 17,
"currency": "EUR"
}
},
{
"option_id": "opt_8842",
"departs": "2026-11-20T17:43:00+01:00",
"arrives": "2026-11-20T19:05:00+01:00",
"price_difference": {
"amount": 20,
"currency": "EUR"
},
"fee": {
"amount": 5,
"currency": "EUR"
},
"total": {
"amount": 25,
"currency": "EUR"
}
}
]
} POST https://cotlet.dev/api/v1/omio/get_cancellation_quote
Returns the refund Omio would pay if you cancelled now, with the service fee shown apart because Omio lists it as non-refundable. Omio allows online cancellation only for a refundable fare or a booking with Omio Flex; for other fares the call returns why it cannot be cancelled online. Nothing is cancelled.
Parameters
| Name | Type | Description |
|---|---|---|
| booking_id required | string | Booking ID from list_bookings. |
Request
curl -X POST https://cotlet.dev/api/v1/omio/get_cancellation_quote \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"booking_id":"OM47720516"}' result = client.call("omio", "get_cancellation_quote", {"booking_id":"OM47720516"}) const result = await cotlet.call('omio', 'get_cancellation_quote', {"booking_id":"OM47720516"}); cotlet call omio get_cancellation_quote --data '{"booking_id":"OM47720516"}' Example response
{
"booking_id": "OM47720516",
"cancellable": true,
"refund": {
"amount": 42.5,
"currency": "EUR"
},
"non_refundable": {
"service_fee": 2.5,
"currency": "EUR"
},
"paid": {
"amount": 45,
"currency": "EUR"
}
} POST https://cotlet.dev/api/v1/omio/book_trip
Books the fare you pick from get_trip with Omio's checkout. The total includes Omio's service fee. If your bank asks you to approve the payment, the call returns a link for you to finish it; Cotlet never bypasses that step. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| trip_id required | string | Trip ID from search_trips. |
| fare_id required | string | Fare option from get_trip. |
| passengers required | object[] | One entry per traveler: first_name, last_name, and any extra detail the travel company asks for. |
| seat_preference | enum | window, aisle or any, where the travel company offers seat choice. Default: any. |
| add_omio_flex | boolean | Add Omio Flex to the booking. Default: false. |
Request
curl -X POST https://cotlet.dev/api/v1/omio/book_trip \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"trip_id":"trp_7f3k29qa","fare_id":"fare_2nd_refundable","passengers":[{"first_name":"Alex","last_name":"Example"}],"add_omio_flex":false}' result = client.call("omio", "book_trip", {"trip_id":"trp_7f3k29qa","fare_id":"fare_2nd_refundable","passengers":[{"first_name":"Alex","last_name":"Example"}],"add_omio_flex":False}) const result = await cotlet.call('omio', 'book_trip', {"trip_id":"trp_7f3k29qa","fare_id":"fare_2nd_refundable","passengers":[{"first_name":"Alex","last_name":"Example"}],"add_omio_flex":false}); cotlet call omio book_trip --data '{"trip_id":"trp_7f3k29qa","fare_id":"fare_2nd_refundable","passengers":[{"first_name":"Alex","last_name":"Example"}],"add_omio_flex":false}' Example response
{
"booking_id": "OM58214793",
"status": "confirmed",
"route": "Amsterdam Centraal to München Hbf",
"departs": "2026-11-19T09:37:00+01:00",
"operator": "Deutsche Bahn",
"total": {
"amount": 92.98,
"currency": "EUR",
"fare": 89,
"service_fee": 3.98
}
} POST https://cotlet.dev/api/v1/omio/change_booking
Switches an exchangeable ticket to the option you pick from get_change_options. The price difference and the fee are charged as shown there. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| booking_id required | string | Booking ID from list_bookings. |
| option_id required | string | Travel option from get_change_options. |
Request
curl -X POST https://cotlet.dev/api/v1/omio/change_booking \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"booking_id":"OM61903278","option_id":"opt_8841"}' result = client.call("omio", "change_booking", {"booking_id":"OM61903278","option_id":"opt_8841"}) const result = await cotlet.call('omio', 'change_booking', {"booking_id":"OM61903278","option_id":"opt_8841"}); cotlet call omio change_booking --data '{"booking_id":"OM61903278","option_id":"opt_8841"}' Example response
{
"booking_id": "OM61903278",
"status": "changed",
"departs": "2026-11-20T15:13:00+01:00",
"charged": {
"price_difference": 12,
"fee": 5,
"total": 17,
"currency": "EUR"
}
} POST https://cotlet.dev/api/v1/omio/cancel_booking
Cancels one booking that Omio lets you cancel online: a refundable fare, or a booking with Omio Flex, which cancels through it. The refund is the amount from get_cancellation_quote. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| booking_id required | string | Booking ID from list_bookings. |
Request
curl -X POST https://cotlet.dev/api/v1/omio/cancel_booking \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"booking_id":"booking_8c41d2"}' result = client.call("omio", "cancel_booking", {"booking_id":"booking_8c41d2"}) const result = await cotlet.call('omio', 'cancel_booking', {"booking_id":"booking_8c41d2"}); cotlet call omio cancel_booking --data '{"booking_id":"booking_8c41d2"}' Example response
{
"booking_id": "OM47720516",
"status": "cancelled",
"refund": {
"amount": 42.5,
"currency": "EUR"
},
"non_refundable": {
"service_fee": 2.5,
"currency": "EUR"
}
}