Data ordering

Place an order to purchase geospatial data products using the API.


Introduction

This section explains how the order is placed and the previously estimated credits are consumed from the UP42 account balance.

Ordering is performed under the conditions explained in the table below.

Ordering stepCondition
Order is placedIf the user has sufficient credits in the account balance, the order goes through and the credits are held.
Order is successfulThe credits are deducted from the account balance.
Order failsThe credits are returned to the account balance.

Create request body

  1. Before creating a request body, please note that each collection has its own pre-requirement. This means that some collections might need the AOI coordinates.

  2. In the steps below, we create request bodies to place orders for geospatial datasets provided by the following hosts: OneAtlas and Near Space Labs. OneAtlas provides access to very high resolution and high resolution satellite images (Pléiades and SPOT 6/7). Near Space Labs provides access to very high resolution images captured by the stratospheric balloons called Swifty. Depending on the data host, the variables of the request body slightly differ.

OneAtlas

The request body contains the data product ID, the ID of the image you would like to order and the AOI coordinates (see example below):

Loading...

Near Space Labs

The request body contains the data product ID and the ID of the image you would like to order (see example below):

Loading...

End User License Agreements

Before placing an order, it is necessary to agree with the End User License Agreement (EULA), to avoid receiving an error message through the API. To do this, see Account management and review an agreement before agreeing to those terms.

Place order

Warning!

Placing an order is irreversible, which means that the credit consumption can't be reverted.

OneAtlas

  1. After the price has been displayed during the order estimation step, place the order and save the newly-generated order ID in a new file:
curl -s -L -X POST -H "Authorization: Bearer $PTOKEN" \
-H 'Content-Type: application/json' \
https://api.up42.com/workspaces/$workspace_id/orders \
-d @OneAtlas_order_request.json | jq '.' > my_order_id.json

Near Space Labs

  1. After the price has been displayed during the order estimation step, place the order and save the newly-generated order ID in a new file:
curl -s -L -X POST -H "Authorization: Bearer $PTOKEN" \
-H 'Content-Type: application/json' \
https://api.up42.com/workspaces/$workspace_id/orders \
-d @NearSpaceLabs_order_request.json | jq '.' > my_order_id.json

To find your workspace ID, please follow the instructions from the article Workspaces.

Place order (bulk operation)

  1. Based on the request body from the previous step, create multiple order request bodies using the list of image IDs (OneAtlas_image_ids.json or NearSpaceLabs_image_ids.json):
while read -r id; do jq --arg id $id '.params.id=$id' OneAtlas_order_request.json \
> order_$id.json; done < OneAtlas_image_ids.json
  1. Place multiple orders for all image IDs that were included in the previously created request bodies:
while read -r id; do curl -L -s -X POST \
https://api.up42.com/workspaces/$workspace_id/orders
-H 'Content-Type: application/json' -H "Authorization: Bearer $PTOKEN" \
-d @order_$id.json | jq '.' > order_placed_$id.json; \
done < OneAtlas_image_ids.json

To proceed, go to Monitor orders.