Polling API (pull)

To consume business events generated in OPERA Cloud using the polling APIs, visit OPERA Cloud Integration Processor API and follow the instructions.

Prerequisites

Configuring the Polling Subscription

The polling API requires the owner of the OPERA Cloud environment to configure the subscription in OPERA Cloud.

  1. Verify a chain-level user has the below tasks assigned. To assign these tasks, follow the steps in the Assigning Tasks to a Role topic in the OPERA Cloud User Guide.

    1. Interfaces Admin Property InterfacesExternal Systems:

      • New/Edit External Systems

    2. Toolbox:

      • External Databases

    3. Interfaces Admin Property InterfacesBusiness Events:

      • New/Edit Business Events

  2. Create an external system for your organization by following the steps in Configuring External Systems topic in the OPERA Cloud User Guide.

    Note:

    Make sure you remember the external system code you created.

  3. Create an external database by following the steps in the Configuring External Databases topic in the OPERA Cloud User Guide.

  4. Configure the chosen events on the external system by following the Configuring Business Events steps in the OPERA Cloud User Guide. For the list of events that can be consumed, see the Business Events Data Elements guide.

    Note:

    If there are challenges with this process, the owner of the OPERA Cloud environment should contact Oracle Customer Support at the Customer Support Portal, raise a Technical SR, and select Oracle Hospitality OPERA Cloud as the product.

  5. Communicate or make note of the external system code created at step 2.

Consuming Business Events using the Polling API

  1. Onboard to OHIP by following the steps in Getting Started for Hoteliers.

  2. Create an application by following the steps in Registering an Application. Take a note of the application key.

    Note:

    Make sure you remember the application key.

  3. Add an environment for the environment from which you need to consume events. For more information, see Environments (Gateways and Credentials). Take note of the following:
    • ClientId and ClientSecret — These are needed to obtain the oAuth token.

    • Gateway URL

  4. Determine the hotelId of the hotel from which to consume business events.

  5. Call the FetchBusinessEvents API and specify the external system code as configured in the ‘Configuring the Polling Subscription’ task above.

    Do not use the external system code created by the streaming API or the events will end up out of sequence.

  6. Specify the x-hotelId as the hotelId from step 4 above.

    If the following response is received from the FetchBusinessEvents API, contact Oracle Customer Support at the Customer Support Portal to raise a technical Service Request quoting this error. (This is resolved in OPERA Cloud version 21.2.1.)
    "shortText": "Failed to initialize <your external system code>
     interface for <hotelCode> resort: <your external system code> is not registered as an application user."

Note:

A maximum of 20 events can be retrieved in one call. A maximum of 300 requests per minute per gateway can be made to the polling API. If a larger amount of events is required, than these limits allow consider the streaming API.

There is a limit of 300 requests per minute for the fetchBusinessEvents API.

For information on how to interpret the event responses and for the differences between the polling and streaming APIs, see Interpreting the Event.

For more information on the polling API, watch OPERA Cloud Business Events.