-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yaml
126 lines (122 loc) · 3.63 KB
/
swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
openapi: 3.0.0
servers:
- url: 'https://price-check.pf.triptease.io'
info:
version: "1.0.0"
title: Triptease API
description: |
Welcome to the Triptease API documentation. This page documents all the public facing APIs that Triptease currently support. Over time we intend to expose more of the platform features as APIs so that customers and partners can build bespoke solutions.
contact:
email: [email protected]
license:
name: Proprietary License
paths:
/get-prices:
post:
tags:
- Prices API
summary: Polling API to retrieve latest OTA prices
operationId: getPrice
description: |
This API will allow the consumer to get the latest prices for a specific hotel
on any supported OTA. You can control if prices should include tax and in what
currency they should be returned.
Prerequisites:
1. A hotel `apiKey` - provided once a hotel has been setup in the platform
2. OTA links setup in the platform for that hotel
NB: This is a polling API, repeatedly call until `complete` returns `true`.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GetPriceRequest'
description: Get Price Request
responses:
'200':
description: Latest Prices
content:
application/json:
schema:
$ref: '#/components/schemas/GetPriceResponse'
'400':
description: Bad request
components:
schemas:
GetPriceRequest:
type: object
required:
- apiKey
- itinerary
- currency
- pricesShouldIncludeTax
properties:
apiKey:
type: string
example: 'acbab351539049cf85043be72cd3306b'
description: 'This is the Hotels api key'
format: uuid
itinerary:
type: object
required:
- checkIn
- checkOut
- adults
- children
- childrenAges
properties:
checkIn:
type: string
format: date
example: '2023-08-13'
checkOut:
type: string
format: date
example: '2023-08-14'
adults:
type: integer
example: 2
children:
type: integer
example: 1
childrenAges:
type: array
items:
type: integer
example: 7
currency:
type: string
example: 'EUR'
pricesShouldIncludeTax:
type: boolean
example: true
GetPriceResponse:
type: object
properties:
request:
$ref: '#/components/schemas/GetPriceRequest'
complete:
type: boolean
description: Used to determin if all prices have aquired
nightlyPrices:
type: array
items:
type: object
properties:
agentName:
type: string
example: 'booking'
price:
type: object
properties:
value:
type: number
example: 267.94
currency:
type: string
example: 'EUR'
convertedFrom:
type: string
example: 'USD'
convertedRate:
type: number
example: 0.94015