Skip to content

Commit 86fd3de

Browse files
committed
Added NOR1 Integrated Upsell API
1 parent a4e1412 commit 86fd3de

File tree

1 file changed

+389
-0
lines changed

1 file changed

+389
-0
lines changed
Lines changed: 389 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,389 @@
1+
swagger: "2.0"
2+
info:
3+
description: "An upsell service that can be consumed to display upgrade offers to a hotel guest prior to arrival. Pre-arrival upsells are becoming increasingly important due to the adoption of mobile and kiosk check-in which reduces the opportunity for front-desk upselling. Upgrade offers are based on PRiME® AI/ML decision intelligence and OPERA real-time inventory. The service allows instant fulfillment of the upgrade offer."
4+
version: "1.0.0"
5+
title: "Nor1 Integrated Upsell API"
6+
host: "oracle.api.com"
7+
basePath: "/ohcgep/v1"
8+
9+
tags:
10+
- name: "Nor1 Integrated Upsell API"
11+
description: "API to serve Upsell offers to customers and third parties"
12+
13+
schemes:
14+
- "https"
15+
16+
parameters:
17+
accept:
18+
name: 'Accept'
19+
in: header
20+
required: true
21+
type: string
22+
enum: ['application/json; charset=UTF-8','application/json']
23+
x-example: 'application/json; charset=UTF-8'
24+
acceptForPost:
25+
name: 'consumes'
26+
in: header
27+
type: string
28+
enum: ['application/json; charset=UTF-8','application/json']
29+
x-example: 'application/json'
30+
authorization:
31+
name: 'Authorization'
32+
in: header
33+
type: string
34+
x-example: 'Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
35+
x-app-key:
36+
name: 'x-app-key'
37+
in: header
38+
type: string
39+
x-example: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
40+
providerId:
41+
name: 'providerId'
42+
in: header
43+
type: string
44+
x-example: 'SAN'
45+
description: "Partner's Unique Nor1 Provider ID"
46+
Accept-Language:
47+
name: 'Accept-Language'
48+
in: header
49+
type: string
50+
description: 'Language code'
51+
52+
paths:
53+
'/hotels/{hotelId}/reservations/{reservationId}/arrivalDate/{arrivalDate}/upsellOffers':
54+
get:
55+
summary: Get Upsell Offers for a reservation
56+
description: >-
57+
This API will allow a user to retrieve a retrieve a list of available upsell offers
58+
based on the search criteria specified in the request body, inventory availability and
59+
current reservation details.
60+
<p><strong>OperationId:</strong> getUpsellOffers</p>
61+
operationId: getUpsellOffers
62+
tags:
63+
- "Upsell Offers"
64+
produces:
65+
- 'application/json; charset=UTF-8'
66+
parameters:
67+
- $ref: '#/parameters/accept'
68+
- $ref: '#/parameters/authorization'
69+
- $ref: '#/parameters/x-app-key'
70+
- $ref: '#/parameters/providerId'
71+
- $ref: '#/parameters/Accept-Language'
72+
- name: hotelId
73+
in: path
74+
required: true
75+
type: string
76+
x-example: "SAND01"
77+
pattern: "^[A-Z0-9]{6-10}$"
78+
description: "Unique ID of the hotel where reservation is searched based on reservation Id."
79+
- name: reservationId
80+
in: path
81+
required: true
82+
type: string
83+
x-example: "17158"
84+
pattern: "^[0-9]{5-7}$"
85+
description: "A unique identifying value for reservation assigned by the creating system."
86+
- name: arrivalDate
87+
in: path
88+
required: true
89+
type: string
90+
x-example: "2022-03-28"
91+
format: date
92+
description: "Arrival Date of the reservation."
93+
responses:
94+
"200":
95+
description: "Successful Response"
96+
headers:
97+
Content-Language:
98+
type: string
99+
description: "Audience language"
100+
x-example: "en-GB"
101+
schema:
102+
$ref: "#/definitions/UpsellOffers"
103+
"204":
104+
description: "No Offers Found"
105+
106+
"404":
107+
description: "Unable to find HotelId or ReservationId"
108+
schema:
109+
$ref: '#/definitions/errorInstanceNF'
110+
"500":
111+
description: "System Error"
112+
schema:
113+
$ref: '#/definitions/errorInstanceISE'
114+
"502":
115+
description: "Bad Gateway"
116+
"503":
117+
description: "Service Unavailable"
118+
post:
119+
summary: Post Upsell Offers for a reservation
120+
description: >-
121+
This API will allow a user to update a reservation with an offer selected
122+
from the list of available upsell offers based on the unique offer id specified
123+
in the request body.
124+
<p><strong>OperationId:</strong> postUpsellOffers</p>
125+
operationId: postUpsellOffers
126+
tags:
127+
- "API to serve Fulfill Upsell Offers to customers and thirdparties"
128+
produces:
129+
- 'application/json; charset=UTF-8'
130+
parameters:
131+
- $ref: '#/parameters/acceptForPost'
132+
- $ref: '#/parameters/authorization'
133+
- $ref: '#/parameters/x-app-key'
134+
- $ref: '#/parameters/providerId'
135+
- $ref: '#/parameters/Accept-Language'
136+
- name: hotelId
137+
in: path
138+
required: true
139+
type: string
140+
x-example: "SAND01"
141+
pattern: "^[A-Z0-9]{6-10}$"
142+
description: "Unique ID of the hotel where reservation is searched based on reservation Id."
143+
- name: reservationId
144+
in: path
145+
required: true
146+
type: string
147+
x-example: "17158"
148+
pattern: "^[0-9]{5-7}$"
149+
description: "A unique identifying value for reservation assigned by the creating system."
150+
- name: arrivalDate
151+
in: path
152+
required: true
153+
type: string
154+
x-example: "2022-03-28"
155+
format: date
156+
description: "Arrival Date of the reservation."
157+
- name: body
158+
in: body
159+
required: true
160+
description: ''
161+
schema:
162+
$ref: '#/definitions/Item'
163+
164+
responses:
165+
"200":
166+
description: "Successful Response"
167+
schema:
168+
$ref: "#/definitions/UpsellOffers"
169+
"415":
170+
description: "Unsupported Media Type"
171+
schema:
172+
$ref: '#/definitions/errorInstanceUMT'
173+
"404":
174+
description: "Unable to find HotelId or ReservationId"
175+
schema:
176+
$ref: '#/definitions/errorInstanceNF'
177+
"500":
178+
description: "System Error"
179+
schema:
180+
$ref: '#/definitions/errorInstanceISE'
181+
"502":
182+
description: "Bad Gateway"
183+
"503":
184+
description: "Service Unavailable"
185+
definitions:
186+
UpsellOffers:
187+
type: object
188+
description: "Success and Failure Summary Data"
189+
properties:
190+
Items:
191+
type: array
192+
items:
193+
$ref: "#/definitions/Items"
194+
totalResults:
195+
type: number
196+
example: 1
197+
offset:
198+
type: number
199+
example: 0
200+
count:
201+
type: number
202+
example: 1
203+
hasMore:
204+
type: boolean
205+
example: false
206+
limit:
207+
type: number
208+
example: 0
209+
210+
Items:
211+
type: object
212+
description: "Success and Failure Summary Data"
213+
properties:
214+
upsellOffers:
215+
type: array
216+
items:
217+
$ref: "#/definitions/UpsellOffer"
218+
219+
UpsellOffer:
220+
type: object
221+
properties:
222+
offerType:
223+
type: string
224+
example: "room_upgrade"
225+
description: "describes type of an offer"
226+
selectionType:
227+
type: string
228+
description: ""
229+
example: "zero_to_one"
230+
enum: [zeroToOne, zeroToMany]
231+
offers:
232+
type: array
233+
items:
234+
$ref: "#/definitions/Offers"
235+
236+
Offers:
237+
type: object
238+
properties:
239+
offerId:
240+
type: string
241+
format: uuid
242+
description: "A unique upsell ID per upsell offer"
243+
name:
244+
type: string
245+
example: "Deluxe King Suite"
246+
description: "offer name"
247+
description:
248+
type: string
249+
example: "Rest easy in the 600-square-foot suite with sitting area and cityscape views. Enjoy pillow top mattress, pull out sofa bed, premium mini bar, 24 hour room service, and a large marble bathroom."
250+
images:
251+
$ref: "#/definitions/Image"
252+
price:
253+
type: object
254+
properties:
255+
amount:
256+
type: number
257+
example: 33.94
258+
currency:
259+
type: string
260+
description: "This is an ISO 4217(https://en.wikipedia.org/wiki/ISO_4217) currency code."
261+
example: "USD"
262+
savings:
263+
type: string
264+
example: 16.06
265+
chargeFrequency:
266+
type: string
267+
example: "per_unit_per_night"
268+
fixedCharge:
269+
type: number
270+
example: 33.94
271+
roomTypeCode:
272+
type: array
273+
items:
274+
type: string
275+
example: "SGL"
276+
277+
Image:
278+
type: object
279+
properties:
280+
big:
281+
type: string
282+
example: "https://example.com/img_url1.jpg"
283+
small:
284+
type: string
285+
example: "https://example.com/img_url2.jpg"
286+
287+
Item:
288+
type: object
289+
properties:
290+
offerId:
291+
type: string
292+
format: uuid
293+
294+
errorDetail:
295+
type: object
296+
description: "Complex type that contains error detail"
297+
properties:
298+
title:
299+
type: string
300+
description: "Holds error details in short"
301+
detail:
302+
type: string
303+
description: "Holds error details"
304+
errorCode:
305+
type: string
306+
description: "Holds specific error code"
307+
308+
errorInstanceISE:
309+
type: object
310+
description: "Complex type that contains internal server error instance details for a REST call"
311+
properties:
312+
type:
313+
type: string
314+
description: "Holds error type"
315+
example: "http://www.example.org/protocols/.."
316+
title:
317+
type: string
318+
description: "Holds error details in short"
319+
example: "Internal Server Error"
320+
status:
321+
type: number
322+
example: 500
323+
detail:
324+
type: string
325+
description: "Holds error details"
326+
example: "Internal Server Error"
327+
errorCode:
328+
type: string
329+
description: "Holds specific error code"
330+
example: null
331+
errorDetails:
332+
type: array
333+
description: "Holds List of errors"
334+
items:
335+
$ref: "#/definitions/errorDetail"
336+
337+
338+
errorInstanceNF:
339+
type: object
340+
description: "Complex type that contains not found error instance details for a REST call"
341+
properties:
342+
type:
343+
type: string
344+
description: "Holds error type"
345+
example: "http://www.example.org/protocols/.."
346+
title:
347+
type: string
348+
description: "Holds error details in short"
349+
example: "Not Found"
350+
status:
351+
type: number
352+
example: 404
353+
detail:
354+
type: string
355+
description: "Holds error details"
356+
example: "Unable to find HotelId or ReservationId"
357+
errorCode:
358+
type: string
359+
description: "Holds specific error code"
360+
example: null
361+
errorDetails:
362+
type: array
363+
description: "Holds List of errors"
364+
items:
365+
$ref: "#/definitions/errorDetail"
366+
367+
errorInstanceUMT:
368+
type: object
369+
description: "Complex type that contains refuse request error instance details for a REST call"
370+
properties:
371+
type:
372+
type: string
373+
description: "Holds error type"
374+
example: "http://www.example.org/protocols/.."
375+
title:
376+
type: string
377+
description: "Holds error details in short"
378+
example: "Unsupported Media Type"
379+
status:
380+
type: number
381+
example: 415
382+
detail:
383+
type: string
384+
description: "Holds error details"
385+
example: "Unsupported Media Type"
386+
errorCode:
387+
type: string
388+
description: "Holds specific error code"
389+
example: null

0 commit comments

Comments
 (0)