GBDX

Place an Order with Callbacks

This tutorial shows how to place an order with call backs by making a direct API request.

Last Updated: April 11, 2019

Overview

The Ordering with Callbacks API allows users to place an order and get a callback notification when the order has been delivered or when it fails. The user submits an order with a URL in the JSON request. That url will receive the callback notification.

The callback notification is for the entire order.

JSON Request Example

To place an order with callbacks, a POST request is submitted to:

POST to https://geobigdata.io/orders/v2/ordercb

The request body includes a set of acquisition IDs (CatIDs) and the URL to send the call back to.

Example:

    { 
      "acquisitionIds": [ "CATID1", "CATID2" ],
      "callback": "http://domainname.tld/callbackHandler"
    }

Response Body:

When the order is submitted, the JSON response body will look like this:

     {
      "order_id": "01af5259-64d9-4e16-a161-d6d5e6f3e958",
      "acquisitions": [
        {
          "acquisition_id": "CATID1",
          "state": "submitted"
        },
        {
          "acquisition_id": "CATID2",
          "state": "submitted"
        }
      ],
      "callback": "http://domainname.tld/callbackHandler"
    }

States that trigger a callback notification

These states will deliver a callback notification for the entire order.

  • Delivered
  • Failed
    Keep track of your Order ID. You'll need it to check the order's status before the callback notification is sent.

Get Order Status

To see the status of an order placed to the OrderCB API,

Send a GET request to:

https://geobigdata.io/orders/v2/ordercb/<order_id>

Example 1: status = submitted

The Response body will like this, with an updated order state.


     {
      "order_id": "01af5259-64d9-4e16-a161-d6d5e6f3e958",
      "acquisitions": [
        {
          "acquisition_id": "CATID1",
          "state": "submitted"
        },
        {
          "acquisition_id": "CATID2",
          "state": "submitted"
        }
      ]
    }

Example 2: Status = "ordering"


        {
      "order_id": "69cbf97a-8f98-46ae-8102-aef4541cb9fd",
      "acquisitions": [
        {
          "acquisition_id": "10111111",
          "state": "ordering"
        },
        {
          "acquisition_id": "1022222",
          "state": "ordering"
        }
      ]
    }

Updated 2 years ago


What's Next

Learn how to get the S3 location for an ordered product

Get the S3 Location for a Product Tutorial

Place an Order with Callbacks


This tutorial shows how to place an order with call backs by making a direct API request.

Last Updated: April 11, 2019

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.