Sample Workflow
For a sample workflow, this example uses the operation startRevenueInventoryStatistics.
-
POST Request: startRevenueInventoryStatisticsProcess
curl --location '{{HostName}}/inv/async/v1/externalSystems/{{ExtSystemCode}}/hotels/{{HotelId}}/revenueInventoryStatistics' \ --header 'Content-Type: application/json' \ --header 'x-app-key: {{AppKey}}' \ --header 'x-hotelId: {{HotelId}}' \ --header 'Authorization: Bearer {{Token}}' \ --data '{ "dateRangeStart": "YYYY-MM-DD", "dateRangeEnd": "YYYY-MM-DD", "roomTypes": [ "" ] }'
POST Response Headers:
HTTP Status: 202 Accepted
Key Value Date
Sat, 23 Dec 2023 03:59:40 GMT
Content-Length
0
Connection
keep-alive
X-Powered-By
Express
cache-control
no-cache, no-store
location
{{HostName}}/inv/async/v1/externalSystems/{{ExtSystemCode}}/hotels/{{HotelId}}/revenueInventoryStatistics/<ID1
path
startRevenueInventoryStatisticsProcess
vary
origin
Strict-Transport-Security
max-age=31536000; includeSubDomains
X-Content-Type-Options
nosniff
X-XSS-Protection
1; mode=block
X-Frame-Options
SAMEORIGIN
-
HEAD request: getRevenueInventoryStatisticsProcessStatus
The ID (ID1 in Step 1) from the location URL of the POST Response Header parameter is fed to the HEAD request.
curl --location --head '{{HostName}}/inv/async/v1/externalSystems/{{ExtSystemCode}}/hotels/{{HotelId}}/revenueInventoryStatistics/{{ID1}}' \ --header 'Content-Type: application/json' \ --header 'x-app-key: {{AppKey}}' \ --header 'x-hotelId: {{HotelId}}' \ --header 'Authorization: Bearer {{Token}}' \ --data ''
HEAD Response Headers:
HTTP Status: 201 Created
Key Value Date
Sat, 23 Dec 2023 03:59:40 GMT
Content-Length
0
Connection
keep-alive
X-Powered-By
Express
cache-control
no-cache, no-store
location
{{HostName}}/inv/async/v1/externalSystems/{{ExtSystemCode}}/hotels/{{HotelId}}/revenueInventoryStatistics/<ID2
path
getRevenueInventoryStatisticsProcessStatus
status
COMPLETED
vary
origin
Strict-Transport-Security
max-age=31536000; includeSubDomains
X-Content-Type-Options
nosniff
X-XSS-Protection
1; mode=block
X-Frame-Options
SAMEORIGIN
Referrer-Policy
no-referrer
Pragma
no-cache
Access-Control-Expose-Headers
Set-Cookie
Set-Cookie
operaEntId=<EntId>;Path=/;Secure;SameSite=None
Set-Cookie
tenant=<tenantId>Path=/;Secure;SameSite=None
-
GET request: getRevenueInventoryStatistics
Similar to step 1, the ID (ID2 in step 2) from the location URL of the HEAD Response Header parameter is fed to the GET request.
curl --location '{{HostName}}/inv/async/v1/externalSystems/{{ExtSystemCode}}/hotels/{{HotelId}}/revenueInventoryStatistics/{{ID2}}' \ --header 'Content-Type: application/json' \ --header 'x-app-key: {{AppKey}}' \ --header 'x-hotelId: {{HotelId}}' \ --header 'Authorization: Bearer {{Token}}' \ --data ''
GET Response Body:
HTTP Status: 200 OK
A sample successful response body for the operation getRevenueInventoryStatistics is shown below:
"revInvStats": [ { "property": "<HotelID>", "occupancyDate": "YYYY-MM-DD", "physicalRooms": "0", "noShowRooms": "0" }, { "property": "<HotelID>", "occupancyDate": "YYYY-MM-DD", "physicalRooms": "0", "noShowRooms": "0" }, { "property": "<HotelID>", "occupancyDate": "YYYY-MM-DD", "physicalRooms": "0" } ] }
Parent topic: Workflow