swagger: '2.0' info: description: This small API is used by OpenBooking to request available accommodation objects from your booking system. version: 1.0.0 title: Availabilities REST API for OpenBooking ODI # put the contact info for your development or API team contact: email: support@openbooking.ch x-logo: url: https://docs.openbooking.ch/assets/OpenBooking_Logo.png license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html # tags are used for organizing operations tags: - name: public description: Operations available OpenBooking ODI paths: /query: get: tags: - public summary: search for free vacancies operationId: getAvailabilities description: | By passing in the appropriate options, you can search for available vacancies in the system produces: - application/json parameters: - in: query name: partner_id required: true description: Send results for this partner type: string - in: query name: checkin description: Desired checkin date (format in yyyy-mm-dd) required: true type: string format: date - in: query name: checkout description: Desired checkout date (format in yyyy-mm-dd) required: true type: string format: date - in: query name: adults description: Number of adults required: true type: integer minimum: 1 - in: query name: children description: Comma-separated list of ages for every child type: array items: type: integer - in: query name: language required: true description: two-character code of desired language for response type: string minLength: 2 maxLength: 2 - in: query name: currency required: true description: desired price currency type: string minLength: 3 maxLength: 3 - in: query name: accommodation_id description: Send only results for this accommodation_id type: string required: false - in: query name: skip description: number of records to skip for pagination type: integer format: int32 minimum: 0 - in: query name: limit description: maximum number of records to return type: integer format: int32 minimum: 0 maximum: 100 responses: 200: description: found availabilities for query, or empty array schema: type: array minItems: 0 items: $ref: '#/definitions/AvailableItem' 204: description: No content found. Alternatively send 200 with empty array [] 400: description: bad input parameter definitions: AvailableItem: type: object required: - id - accommodation_id - service_id - checkin - checkout - price - currency - url properties: id: type: string example: "offer_id" accommodation_id: description: the accommodation ID from core data import type: string example: "odi-accommodation-id" service_id: description: the service ID from core data import type: string example: "odi-service-id" checkin: type: string format: date example: "2018-06-01" checkout: type: string format: date example: "2018-06-08" title: type: string example: A specific title for this offer, not required price: type: number format: float example: 290.50 currency: type: string example: CHF url: type: string format: url example: "https://YOURBOOKING.COM/?checkin=2021-06-01&checkout=2021-06-08&adults=2&partner_id=abc123&etc..." # Added by API Auto Mocking Plugin host: virtserver.swaggerhub.com schemes: - https - http # Added by API Auto Mocking Plugin basePath: /OpenBooking/ODI_Availabilities/1.0.0