Using the Asynchronous APIs

The Asynchronous APIs involve a three-step data flow process, and it is imperative to execute all three steps without skipping any steps. Refer to Best Practices for additional guidelines. 

  1. The POST request is the first step from an external system to OPERA Cloud, which can do one of the following:
    • POST Data to OPERA Cloud: This starts a process to accept the data into OPERA Cloud.
    • Fetch Data from OPERA Cloud: This starts a process to retrieve data from OPERA Cloud.
    Once you have sent this post request to OPERA Cloud, you should receive an HTTP 202 Accepted response if the request is valid. The response header parameter ‘location’ provides a URL that contains a request ID. This ID is required in step 2.

    Note:

    Refer to Types and Recommendations to learn more about the associated API limits. If the bulk data to be posted to or retrieved from OPERA Cloud does not align with the API specifications, a validation error is generated. 

  2. The HEAD request is the second step from an external system to OPERA Cloud to check the status of the process started with the POST request in the first step. Use the header parameter ‘location’ from the POST response in this HEAD request. Once the process is completed, the HEAD response returns a header parameter ‘status’ with value ‘COMPLETED.’ Similar to step 1, the header parameter ‘location’ returns a URL containing a request ID that is required in step 3.
  3. The GET request is the third step from an external system to OPERA Cloud to either collect the bulk data or confirm the post of data was successful. Use the ID in the location header URL returned by the HEAD response in step 2. The GET response provides the requested data or log specifics, particularly if you have added data, and indicates any potential failures.

    Figure 9-1 Scenario 1: Customer/Partner obtains the intended result


    This image shows a diagram for Scenario 1 – Customer/Partner obtains the intended result.

    Figure 9-2 Scenario 2: Invalid request


    This image shows a diagram for Scenario 2 – Invalid request.