openapi: 3.0.1 info: title: Omio Plugin description: A plugin that allows the user to search schedules and redirect via deeplink to Omio to book. version: 1.0.0 servers: - url: https://omio.com/b2b-chatgpt-plugin paths: /schedules: get: operationId: schedules description: Get request to retrieve train, bus, ferry or flight schedules with links to book via Omio summary: Get request to retrieve train, bus, ferry or flight schedules links to book via Omio parameters: - name: departureLocation in: query required: true description: The departure location of the trip schema: type: string - name: arrivalLocation in: query description: The arrival location of the trip required: true schema: type: string - name: departureDate in: query description: The departure date of the trip in the format YYYY-MM-DD schema: type: string - name: arrivalDate in: query description: The arrival date of the trip the format YYYY-MM-DD schema: type: string - name: offset description: How many results should be skipped in: query schema: type: integer - name: limit in: query description: How many results maximum to return schema: type: integer - name: currency in: query description: What currency should prices be presented schema: type: string - name: preferredTravelMode in: query description: What mode of transportation should be returned, if empty, all modes will be returned. Options are one of bus, train, ferry, or flight. schema: type: string enum: [bus, train, ferry, flight] - name: minDepartureTime in: query description: From what time should results depart schema: type: string - name: maxDepartureTime in: query description: To what time should results depart schema: type: string - name: sortingField in: query description: What field to use for sorting schema: type: string enum: [price, departureTime, arrivalTime] - name: sortingOrder in: query description: How to sort the results schema: type: string enum: [ascending, descending] responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/schedulesResponse' components: schemas: scheduleResponse: type: object properties: departureLocation: type: string arrivalLocation: type: string departureDateAndTime: type: string format: date-time arrivalDateAndTime: type: string format: date-time durationInMinutes: description: The duration of the schedule in minutes type: number numberOfStops: description: The number of stops, 0 means the schedule is direct type: integer carrier: description: The carrier of the ticket type: string price: description: The price of the schedule type: number currency: description: Currency of the price type: string travelMode: description: The travel mode of the schedule type: string deeplink: type: string format: uri description: Target URL that redirects the user to the Omio.com booking page to buy the ticket. schedulesResponse: type: object properties: schedules: type: array items: $ref: '#/components/schemas/scheduleResponse' description: The list of bookable schedules currency: type: string description: Currency of schedule prices offset: type: integer limit: type: integer totalCount: type: integer