Skip to content

Commit 8cde6d5

Browse files
committed
Added request for client credentials oAuth, moved paths to v1, added languageCode
1 parent 8f0eac2 commit 8cde6d5

File tree

1 file changed

+84
-2
lines changed

1 file changed

+84
-2
lines changed

postman-collections/oracle-hospitality-nor1-upgrade.postman_collection.json

Lines changed: 84 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"info": {
33
"_postman_id": "ef882897-a02c-431c-8942-7827cbbc5023",
44
"name": "4. Nor1 Upgrade REST APIs",
5-
"description": "APIs to cater for Nor1 eXpress Upgrades\n\nOracle's Nor1 eXpress Upgrade allows hotels and resorts to present confirmed room upsell offers to guests before arrival, allowing the hotel to monetize inventory and avoid oversold conversations at check-in. Nor1 eXpress Upgrade offers allows instant fulfillment of the offer and updates the reservation in OPERA Cloud in real time.\n\nFor further detailed information on Nor1 eXpress, please refer to the eXpress User Guide located [here](https://docs.oracle.com/en/industries/hospitality/nor1-cloud/norug/ch_express_upgrades.htm#EXpressUpgrades-95A131F1).",
5+
"description": "APIs to cater for Nor1 eXpress Upgrades\n\nOracles Nor1 eXpress Upgrade allows hotels and resorts to present confirmed room upsell offers to guests before arrival, allowing the hotel to monetize inventory and avoid oversold conversations at check-in. Nor1 eXpress Upgrade offers allows instant fulfillment of the offer and updates the reservation in OPERA Cloud in real time.\n\nFor further detailed information on Nor1 eXpress, please refer to the eXpress User Guide located [here](https://docs.oracle.com/en/industries/hospitality/nor1-cloud/norug/ch_express_upgrades.htm#EXpressUpgrades-95A131F1).",
66
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
77
"_exporter_id": "15729853",
88
"_collection_link": "https://hospitalityapis.postman.co/workspace/Team-Workspace~f6e529a2-8cdb-43d1-8526-1aa5d61f48e4/collection/15729853-ef882897-a02c-431c-8942-7827cbbc5023?action=share&source=collection_link&creator=15729853"
@@ -12,7 +12,7 @@
1212
"name": "OAuth Token",
1313
"item": [
1414
{
15-
"name": "Get OAuth Token",
15+
"name": "Get OAuth Token for Resource Owner environments",
1616
"event": [
1717
{
1818
"listen": "test",
@@ -108,7 +108,89 @@
108108
"v1",
109109
"tokens"
110110
]
111+
},
112+
"description": "Use this API to request an oAuth token when the environment is a Resource Owner environment. You can see which oAuth flow an environment supports by looking at the Environment page in the OHIP Developer Portal. For more information see (Authenticating to Oracle Hospitality Property APIs)\\[[https://docs.oracle.com/en/industries/hospitality/integration-platform/ohipu/c_oracle_hospitality_property_apis.htm#AuthenticatingToOracleHospitalityPr-1BD54F80](https://docs.oracle.com/en/industries/hospitality/integration-platform/ohipu/c_oracle_hospitality_property_apis.htm#AuthenticatingToOracleHospitalityPr-1BD54F80)\\] under the heading \"Resource Owner-Based Authentication\".\n\nTo call this API you will need:\n\n1. To know the environment is a Resource Owner environment - see above\n \n2. A valid ClientId and ClientSecret\n \n3. An integration user and its password that has been approved by the environment owner\n \n4. A valid application key\n \n\nBecause of this, oAuth tokens may only be used when calling the given environment.\n\noAuth tokens expire after 60 minutes. We recommend obtaining a new oAuth token every 50 minutes, but not more frequently."
113+
},
114+
"response": []
115+
},
116+
{
117+
"name": "Get OAuth Token for Client Credentials environments",
118+
"event": [
119+
{
120+
"listen": "test",
121+
"script": {
122+
"exec": [
123+
"var jsonData = JSON.parse(responseBody);\r",
124+
"postman.setEnvironmentVariable(\"Token\", jsonData.access_token);\r",
125+
"//Set currentdate and currentdateplus1 variables\r",
126+
"var moment = require('moment');\r",
127+
"pm.environment.set('currentdate', moment().format((\"YYYY-MM-DD\")))\r",
128+
"pm.environment.set('currentdateplus1', moment().add(1, 'days').format((\"YYYY-MM-DD\")))\r",
129+
"var uuid = require('uuid');\r",
130+
"var myUUID = uuid.v4();\r",
131+
"pm.environment.set(\"MyGUID\", myUUID);\r",
132+
"pm.environment.set(\"HashedAppKey\", CryptoJS.SHA256(pm.environment.get(\"AppKey\")).toString());"
133+
],
134+
"type": "text/javascript"
135+
}
111136
}
137+
],
138+
"request": {
139+
"auth": {
140+
"type": "basic",
141+
"basic": [
142+
{
143+
"key": "undefined",
144+
"type": "any"
145+
}
146+
]
147+
},
148+
"method": "POST",
149+
"header": [
150+
{
151+
"key": "Content-Type",
152+
"name": "Content-Type",
153+
"type": "text",
154+
"value": "application/x-www-form-urlencoded"
155+
},
156+
{
157+
"key": "x-app-key",
158+
"type": "text",
159+
"value": "{{AppKey}}"
160+
}
161+
],
162+
"body": {
163+
"mode": "urlencoded",
164+
"urlencoded": [
165+
{
166+
"key": "username",
167+
"value": "{{Username}}",
168+
"type": "text"
169+
},
170+
{
171+
"key": "password",
172+
"value": "{{Password}}",
173+
"type": "text"
174+
},
175+
{
176+
"key": "grant_type",
177+
"value": "password",
178+
"type": "text"
179+
}
180+
]
181+
},
182+
"url": {
183+
"raw": "{{HostName}}/oauth/v1/tokens",
184+
"host": [
185+
"{{HostName}}"
186+
],
187+
"path": [
188+
"oauth",
189+
"v1",
190+
"tokens"
191+
]
192+
},
193+
"description": "Use this API to request an oAuth token when the environment is a Client Credentials environment. You can see which oAuth flow an environment supports by looking at the Environment page in the OHIP Developer Portal. For more information see (Authenticating to Oracle Hospitality Property APIs)\\[[https://docs.oracle.com/en/industries/hospitality/integration-platform/ohipu/c_oracle_hospitality_property_apis.htm#AuthenticatingToOracleHospitalityPr-1BD54F80](https://docs.oracle.com/en/industries/hospitality/integration-platform/ohipu/c_oracle_hospitality_property_apis.htm#AuthenticatingToOracleHospitalityPr-1BD54F80)\\] under the heading \"Client Credentials-Based Authentication\".\n\nTo call this API you will need:\n\n1. To know the environment is a Client Credentials environment - see above\n2. A valid ClientId and ClientSecret\n3. A valid EnterpriseId\n \n4. A valid application key\n \n\nBecause of this, oAuth tokens may only be used when calling the given environment.\n\noAuth tokens expire after 60 minutes. We recommend obtaining a new oAuth token every 50 minutes, but not more frequently."
112194
},
113195
"response": []
114196
}

0 commit comments

Comments
 (0)