Data estimation

Estimate the price of geospatial data products using the API.


Introduction

To ensure full transparency, users can check in advance the number of UP42 credits that would be consumed for a specific product. This section explains how the price of the product is estimated before placing an order. Please note that the estimation can be done after you already performed a search using the API.

The factors considered in the final price calculation are: size of the Area of Interest, collection & data product type.

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 estimate the price of 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...

Estimate price

OneAtlas

  1. Before placing the order, define your workspace ID and estimate the credit costs:
workspace_id=77cad96e-bc01-4604-9846-6369bfc6df8a
curl -s -L -X POST -H "Authorization: Bearer $PTOKEN" \
-H 'Content-Type: application/json' \
https://api.up42.com/workspaces/$workspace_id/orders/estimate \
-d @OneAtlas_order_request.json | jq '.'
  1. The price will be displayed in UP42 credits:
{"data":{"credits":1061},"error":null}

Near Space Labs

  1. Before placing the order, define your workspace ID and estimate the credit costs:
workspace_id=77cad96e-bc01-4604-9846-6369bfc6df8a
curl -s -L -X POST -H "Authorization: Bearer $PTOKEN" \
-H 'Content-Type: application/json' \
https://api.up42.com/workspaces/$workspace_id/orders/estimate \
-d @NearSpaceLabs_order_request.json | jq '.'
  1. The price will be displayed in UP42 credits:
{"data":{"credits":2200},"error":null}

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

Estimate price (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. Estimate the price for all image IDs that were automatically included in multiple order request bodies (order_$id.json):
while read -r id; do curl -L -s -X POST \
https://api.up42.com/workspaces/$workspace_id/orders/estimate \
-H 'Content-Type: application/json' -H "Authorization: Bearer $PTOKEN" \
-d @order_$id.json | jq '.' > order_estimated_$id.json; done < OneAtlas_image_ids.json

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

To proceed with placing the order, go to Data ordering.