Language
Geostore Guide
  1. Order images
    1. Step 1: Authentication
    2. Step 2: Get Contract Information
    3. Step 3: Get the Available Product Types
    4. Step 4: Production Options
    5. Step 5: Search Images
    6. Step 6: Pricing
    7. Step 7: Ordering
    8. Example Code

Order Images

The Order API gives access to both archive images ordering and/or to satellites tasking for new acquisitions, from your own portal, or your own application. This guide shows step by step how to order an archive image. For more technical information refer to the online reference documentation


This scenario shows how to order a precise image of Toulouse (France). To do so a SPOT archive image will be ordered through the endpoint https://order.proxy.geoapi-airbusds.com.


This chapter ends with a downloadable script that collects and runs all the requests of this example.

Step 1: Authentication

Prerequisite: the first action of this tutorial deals with the token that was obtained during authentication in a previous chapter.

All following requests will use MY_TOKEN and MY_REFERER: they should be stored for further access. You should have received your referer from our technical support. Most of the time it is a character string in lowercase. i.e. SkyEye Scanner Corp could have ‘skyeyescan’ as referer.

export MY_TOKEN=<access_token>
export MY_REFERER=***your referer***

Step 2: Get Contract Information

The following curl command is optional if you already know your contractId. This command can be used to get the remaining credit on your contract(s). If you do not know your contractId, simply send a GET request on the endpoint /me/contracts to the server:

curl -X GET \
  https://order.proxy.geoapi-airbusds.com/api/v1/me/contracts \
  -H "Authorization: Bearer $MY_TOKEN" \
  -H "Content-Type: application/json" \
  -H "cache-control: no-cache" \
  -H "Referer: $MY_REFERER" > 02_myContracts.json
Not available
Not available

You will get a response similar to:

{
 "contracts": [
    {
 "contractId": "myContractID",
 "name": " myAccountName",
 "tradeAgreementUrl": "https://www.intelligence-airbusds.com/fr/4971-cgf",
 "creditRemaining": "100000.0",
 "currency": "EUR",
 "language": "fr"
 }
 ]
}

Then export your contractId:

FIRST_CONTRACT_ID=`cat 02_myContracts.json | jq '.contracts[0].contractId' | tr -d \"`
echo "FIRST_CONTRACT_ID = "$FIRST_CONTRACT_ID
Not available
Not available

Note: there might be several contracts returned. You have to choose one according to which product type you want to order.

Step 3: Get the Available Product Types

The following request is optional but PRODUCTTYPE_ID has to be set either by this request or manually. This request displays the possible order productTypes. Once one of them is chosen it can be set as productTypeId:

curl -X GET \
  https://order.proxy.geoapi-airbusds.com/api/v1/contracts/$FIRST_CONTRACT_ID/productTypes \
  -H "Authorization: Bearer $MY_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Referer: $MY_REFERER" \
  -H "cache-control: no-cache" > 03_firstContractProductTypes.json
Not available
Not available
{"productTypes": [
      {
      "productTypeId": "DMCArchive22",
      "technicalProduct":       {
         "id": "DMCArchive22",
         "label": "DMC",
         "source":          {
            "id": "archive",
            "label": "archive"
         },
         "sensor":          {
            "id": "dmc",
            "label": "DMC"
         },
         "target":          {
            "id": "standard22m",
            "label": "Standard"
         },
         "licences": null
      },
      "minimumOrderAreaApplied": 0,
      "descriptionUrl": "http://www.intelligence-airbusds.com/en/84-dmc-constellation"
   },
      {
      "productTypeId": "PleiadesArchiveMono",
      "technicalProduct":       {
         "id": "PleiadesArchiveMono",
         "label": "Pleiades 0.5-m",
         "source":          {
            "id": "archive",
            "label": "archive"
         },
         "sensor":          {
            "id": "pleiades",
            "label": "pleiades"
         },
         "target":          {
            "id": "mono",
            "label": "Mono"
         },
         "licences": null
      },
      "minimumOrderAreaApplied": 25,
      "descriptionUrl": "https://www.intelligence-airbusds.com/en/3027-pleiades-50-cm-resolution-products"
   }
]}

Select the product type you want to order (e.g. ‘PleiadesArchiveMono’):

PRODUCT_TYPE_ID=`cat 03_firstContractProductTypes.json | jq '.productTypes[0].productTypeId' | tr -d \"`
# or
PRODUCT_TYPE_ID=***INSERT THE productTypeId OF THE EXPECTED PRODUCT TYPE***
echo "PRODUCT_TYPE_ID = "$PRODUCT_TYPE_ID
Not available
Not available

Step 4: Production Options

This step is used to retrieve possible product options. Use the same coordinates as for the following search request:

curl -X POST \
  https://order.proxy.geoapi-airbusds.com/api/v1/productTypes/$PRODUCT_TYPE_ID/options \
  -H "Authorization: Bearer $MY_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Referer: $MY_REFERER" \
  -H "cache-control: no-cache" \
  -d '{
  "aoi": [
        {
            "polygonId":"1",
            "geometry": {
                "type": "Polygon",
                "coordinates": [          [
                    [
                      1.00409636794572,
                      43.7046518627418
                    ],
                    [
                      1.83963153029114,
                      43.6915345718161
                    ],
                    [
                      1.84076579791152,
                      43.3869345568225
                    ],
                    [
                      1.0028176461841,
                      43.4014298007982
                    ],
                    [
                      1.00409636794572,
                      43.7046518627418
                    ]
                  ]
                ]
              }
        }
    ]
}' > 04_firstContractProductOptions.json
Not available
Not available

You will retrieve a response similar to:

{"availableOptions": [
      {
      "category": "technical_product",
      "constraint": null,
      "label": "PROCESSING_LEVEL",
      "name": "processing_level",
      "type": "list",
      "values":       [
                  {
            "id": "ortho",
            "label": "Ortho"
         },
                  {
            "id": "projected",
            "label": "Projected"
         },
                  {
            "id": "primary",
            "label": "Primary"
         }
      ],
      "defaultValue": "ortho",
      "range": null,
      "format": null,
      "mandatory": "true"
   },
      {
      "category": "technical_product",
      "constraint":       {
         "reject": false,
         "filter": "processing_level:ortho"
      },
      "label": "ORTHORECTIFICATION_DEM_REFERENCE",
      "name": "dem",
      "type": "list",
      "values":       [
                  {
            "id": "best_available",
            "label": "Best Available"
         },
                  {
            "id": "srtm",
            "label": "SRTM"
         },
                  {
            "id": "globe",
            "label": "Globe"
         }
      ],
      "defaultValue": "best_available",
      "range": null,
      "format": null,
      "mandatory": "constraint"
   },
      {
      "category": "technical_product",
      "constraint":       {
         "reject": true,
         "filter": "processing_level:primary"
      },
      "label": "SPECTRAL_PROCESSING",
      "name": "spectral_processing",
      "type": "list",
      "values":       [
                  {
            "id": "pansharpened_natural_color",
            "label": "Pansharpened 50cm 3-band, Natural Color"
         },
                  {
            "id": "panchromatic",
            "label": "Panchromatic 50cm"
         },
                  {
            "id": "pansharpened",
            "label": "Pansharpened 50cm 4-band"
         },
                  {
            "id": "multispectral",
            "label": "Multispectral 2m 4-band"
         },
                  {
            "id": "pansharpened_false_color",
            "label": "Pansharpened 50cm 3-band, False Color"
         },
                  {
            "id": "bundle",
            "label": "Bundle: Panchromatic 50cm + Multispectral 2m 4-band"
         }
      ],
      "defaultValue": "pansharpened",
      "range": null,
      "format": null,
      "mandatory": "constraint"
   },
      {
      "category": "technical_product",
      "constraint":       {
         "reject": false,
         "filter": "processing_level:primary"
      },
      "label": "SPECTRAL_PROCESSING",
      "name": "spectral_processing_primary",
      "type": "list",
      "values":       [
                  {
            "id": "pansharpened_natural_color",
            "label": "Pansharpened 50cm 3-band, Natural Color"
         },
                  {
            "id": "panchromatic",
            "label": "Panchromatic 50cm"
         },
                  {
            "id": "pansharpened",
            "label": "Pansharpened 50cm 4-band"
         },
                  {
            "id": "multispectral",
            "label": "Multispectral 2m 4-band"
         },
                  {
            "id": "pansharpened_false_color",
            "label": "Pansharpened 50cm 3-band, False Color"
         },
                  {
            "id": "bundle",
            "label": "Bundle: Panchromatic 50cm + Multispectral 2m 4-band"
         }
      ],
      "defaultValue": "bundle",
      "range": null,
      "format": null,
      "mandatory": "constraint"
   },
      {
      "category": "technical_product",
      "constraint":       {
         "reject": false,
         "filter": "processing_level:primary"
      },
      "label": "FORMAT",
      "name": "image_format_primary",
      "type": "list",
      "values":       [
                  {
            "id": "dimap_jpeg2000_optimized",
            "label": "DIMAP - Optimized JPEG 2000 "
         },
                  {
            "id": "dimap_jpeg2000_regular",
            "label": "DIMAP - Regular JPEG 2000 "
         },
                  {
            "id": "dimap_geotiff",
            "label": "DIMAP - GeoTIFF"
         }
      ],
      "defaultValue": "dimap_jpeg2000_regular",
      "range": null,
      "format": null,
      "mandatory": "constraint"
   },
      {
      "category": "technical_product",
      "constraint":       {
         "reject": true,
         "filter": "processing_level:primary"
      },
      "label": "FORMAT",
      "name": "image_format",
      "type": "list",
      "values":       [
                  {
            "id": "dimap_jpeg2000_optimized",
            "label": "DIMAP - Optimized JPEG 2000 "
         },
                  {
            "id": "dimap_jpeg2000_regular",
            "label": "DIMAP - Regular JPEG 2000 "
         },
                  {
            "id": "dimap_geotiff",
            "label": "DIMAP - GeoTIFF"
         },
                  {
            "id": "nitf_jpeg2000_regular",
            "label": "NITF - Regular JPEG 2000 "
         },
                  {
            "id": "nitf_geotiff",
            "label": "NITF - GeoTIFF"
         }
      ],
      "defaultValue": "dimap_jpeg2000_regular",
      "range": null,
      "format": null,
      "mandatory": "constraint"
   },
      {
      "category": "technical_product",
      "constraint": null,
      "label": "PIXEL_CODING",
      "name": "pixel_coding",
      "type": "list",
      "values":       [
                  {
            "id": "8bits",
            "label": "8 bits (JPEG 2000 / GeoTIFF) "
         },
                  {
            "id": "12bits",
            "label": "12 bits (JPEG 2000) / 16 bits (GeoTIFF)"
         }
      ],
      "defaultValue": "12bits",
      "range": null,
      "format": null,
      "mandatory": "true"
   },
      {
      "category": "technical_product",
      "constraint": null,
      "label": "RADIOMETRIC_PROCESSING",
      "name": "radiometric_processing",
      "type": "list",
      "values":       [
                  {
            "id": "basic",
            "label": "Basic"
         },
                  {
            "id": "reflectance",
            "label": "Reflectance"
         },
                  {
            "id": "display",
            "label": "Display"
         }
      ],
      "defaultValue": "basic",
      "range": null,
      "format": null,
      "mandatory": "true"
   },
      {
      "category": "technical_product",
      "constraint":       {
         "reject": false,
         "filter": "processing_level:projected"
      },
      "label": "ELEVATION",
      "name": "elevation",
      "type": "double",
      "values": null,
      "defaultValue": " ",
      "range":       [
         -100,
         10000
      ],
      "format": null,
      "mandatory": "false"
   },
      {
      "category": "technical_product",
      "constraint": null,
      "label": "AREA_COMPUTE_MODEL",
      "name": "area_compute_model",
      "type": "list",
      "values":       [
                  {
            "id": "coverage",
            "label": "Coverage"
         },
                  {
            "id": "temporal_serie",
            "label": "TemporalSerie"
         }
      ],
      "defaultValue": "coverage",
      "range": null,
      "format": null,
      "mandatory": "false"
   },
      {
      "category": "technical_product",
      "constraint": null,
      "label": "PRIORITY",
      "name": "priority",
      "type": "list",
      "values":       [
                  {
            "id": "standard",
            "label": "Standard"
         },
                  {
            "id": "rush",
            "label": "Rush (Please select FTP delivery - No Quality Checking)"
         }
      ],
      "defaultValue": "standard",
      "range": null,
      "format": null,
      "mandatory": "true"
   },
      {
      "category": "technical_product",
      "constraint": null,
      "label": "LICENSE",
      "name": "license",
      "type": "list",
      "values":       [
                  {
            "id": "eula_5",
            "label": "EULA (up to 5 affiliated end users)"
         },
                  {
            "id": "eula_6_10",
            "label": "Multi (6 to 10 affiliated end users)"
         },
                  {
            "id": "eula_11_30",
            "label": "Multi (11 to 30 affiliated end users)"
         }
      ],
      "defaultValue": "eula_5",
      "range": null,
      "format": null,
      "mandatory": "true"
   },
      {
      "category": "technical_product",
      "constraint":       {
         "reject": true,
         "filter": "processing_level:primary"
      },
      "label": "Projection (GDLIB code)",
      "name": "projection_1",
      "type": "list",
      "values":       [
                  {
            "id": "2154",
            "label": "2154 RGF93/Lambert-93 (FR.) - PROJECTED"
         },
                  {
            "id": "23032",
            "label": "23032 ED50/UTM 32N (EU. - 6E to 12E) - PROJECTED"
         },
                  {
            "id": "25832",
            "label": "25832 ETRS89/UTM 32N (EUR. - 6E to 12E) - PROJECTED"
         },
                  {
            "id": "27564",
            "label": "27564 NTF (Paris)/Lambert Corse (FR. - Corsica) - PROJECTED"
         },
                  {
            "id": "27574",
            "label": "27574 NTF (Paris)/Lambert zone IV (FR. - Corsica) - PROJECTED"
         },
                  {
            "id": "3003",
            "label": "3003 Monte Mario/Italy 1 (IT. - W. of 12E) - PROJECTED"
         },
                  {
            "id": "3035",
            "label": "3035 ETRS89/LAEA Europe (EUR.) - PROJECTED"
         },
                  {
            "id": "32232",
            "label": "32232 WGS72/UTM 32N (N. hemisphere - 6E to 12E) - PROJECTED"
         },
                  {
            "id": "32432",
            "label": "32432 WGS72BE/UTM 32N (N. hemisphere - 6E to 12E) - PROJECTED"
         },
                  {
            "id": "32631",
            "label": "32631 WGS84/UTM 31N (N. hemisphere - 0E to 6E) - PROJECTED"
         },
                  {
            "id": "32632",
            "label": "32632 WGS84/UTM 32N (N. hemisphere - 6E to 12E) - PROJECTED"
         },
                  {
            "id": "32633",
            "label": "32633 WGS84/UTM 33N (N. hemisphere - 12E to 18E) - PROJECTED"
         },
                  {
            "id": "3349",
            "label": "3349 WGS84/PDC Mercator (Pacific Ocean 99E. to 70W.) - PROJECTED"
         },
                  {
            "id": "3395",
            "label": "3395 WGS84/World Mercator (World - between 80S. and 84N.) - PROJECTED"
         },
                  {
            "id": "3857",
            "label": "3857 WGS84/Web Mercator (World - between 85S. and 85N.) - PROJECTED"
         },
                  {
            "id": "4326",
            "label": "4326 WGS 1984 - GEOGRAPHIC"
         }
      ],
      "defaultValue": "32632",
      "range": null,
      "format": null,
      "mandatory": "constraint"
   }
]}

For each option, if the field named mandatory is “true”, it must be added to the order request as follows:

{
    "key": ***THE VALUE OF THE "NAME" FIELD OF THE EXPECTED OPTION***,
    "value": ***THE "id" OF THE EXPECTED VALUE***
}

These concatenated option values will be pasted in the optionsPerProductType options field of the order request.

Tip: If you are unsure about the value, choose the “defaultValue” field.

Step 5: Search Images

Once the expected productType is chosen, the next step is to retrieve the identifier of the archive Image to be produced form our catalog. This can be achieved through the Search API. Further information can be found here.


The Search API will return several properties of the images (identifier, footprint etc). More particularly, identifiers of the image are collected from this request and will be reused in further requests.

The following coordinates cover the city of Toulouse and represent the Area Of Interest (AOI). In this example the request uses SPOT satellites images and a random date was chosen so that only one image is retrieved.

Note: use WKT format to form polygons in the Search API.

curl -X POST \
  https://search.federated.geoapi-airbusds.com/api/v1/search \
  -H "Authorization: Bearer $MY_TOKEN" \
  -H "Cache-Control: no-cache" \
  -H "Content-Type: application/json" \
  -d '{
  "geometry": "POLYGON ((1.00409636794572 43.7046518627418, 1.83963153029114 43.6915345718161, 1.84076579791152 43.3869345568225, 1.0028176461841 43.4014298007982, 1.00409636794572 43.7046518627418))",
  "constellation": [
    "SPOT"
  ],
  "acquisitionDate": "[2016-07-29T10:38:17,2016-07-29T10:38:19]",
  "incidenceAngle": "20]",
  "cloudCover": "10]",
  "count": 10,
  "startPage": 1
}' > 05_searchImage.json
Not available
Not available

Example:

{
  "startIndex": 1,
  "itemsPerPage": 10,
  "totalResults": 1,
  "query": {
    "geometry": "POLYGON ((1.00409636794572 43.7046518627418, 1.83963153029114 43.6915345718161, 1.84076579791152 43.3869345568225, 1.0028176461841 43.4014298007982, 1.00409636794572 43.7046518627418))",
    "count": 10,
    "startPage": 1,
    "constellation": [
      "SPOT"
    ],
    "acquisitionDate": "[2016-07-29T10:38:17,2016-07-29T10:38:19]",
    "incidenceAngle": "20]",
    "cloudCover": "10]"
  },
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "viewingAngleAlongTrack": 17.8425,
        "sourceId": "DS_SPOT7_201607291038129_FR1_FR1_FR1_FR1_E001N44_01140",
        "acquisitionDate": "2016-07-29T10:38:18Z",
        "incidenceAngleAcrossTrack": -19.7065705480241,
        "viewingAngleAcrossTrack": -1.65638,
        "cloudCover": 1,
        "illuminationAzimuthAngle": 138.17620223374,
        "incidenceAngleAlongTrack": -3.73953069135453,
        "azimuthAngle": 180.023059999924,
        "creationDate": "2018-01-23T17:41:11.544961Z",
        "resolution": 1.5,
        "productName": "SPOT 1.5-m",
        "incidenceAngle": 19.9324257673857,
        "snowCover": 0,
        "constellation": "SPOT",
        "satellite": "SPOT7",
        "illuminationElevationAngle": 60.1137670969277,
        "productType": "SPOTArchive1.5Mono"
      },
      "geometry": {
        "type": "Polygon",
        "coordinates": [          [
            [
              1.00409636794572,
              43.7046518627418
            ],
            [
              1.83963153029114,
              43.6915345718161
            ],
            [
              1.84076579791152,
              43.3869345568225
            ],
            [
              1.0028176461841,
              43.4014298007982
            ],
            [
              1.00409636794572,
              43.7046518627418
            ]
          ]
        ]
      },
      "id": "ea1575c9-a4e5-4748-9e1b-fbc37d7286e9::c61979b2e47999cdfae98bdd154512fa",
      "bbox": [
        1.002817646184104,
        43.386934556822496,
        1.8407657979115166,
        43.704651862741805
      ],
      "thumbnail": "https://search.federated.geoapi-airbusds.com/api/v1/productTypes/SPOTArchive1.5Mono/products/DS_SPOT7_201607291038129_FR1_FR1_FR1_FR1_E001N44_01140?size=SMALL",
      "quicklooks": [
        {
          "size": "SMALL",
          "projection": null,
          "image": "https://search.federated.geoapi-airbusds.com/api/v1/productTypes/SPOTArchive1.5Mono/products/DS_SPOT7_201607291038129_FR1_FR1_FR1_FR1_E001N44_01140?size=SMALL"
        },
        {
          "size": "MEDIUM",
          "projection": "http://www.opengis.net/def/crs/EPSG/0/3857",
          "image": "https://search.federated.geoapi-airbusds.com/api/v1/productTypes/SPOTArchive1.5Mono/products/DS_SPOT7_201607291038129_FR1_FR1_FR1_FR1_E001N44_01140?projection=EPSG:3857&size=MEDIUM"
        },
        {
          "size": "MEDIUM",
          "projection": "http://www.opengis.net/def/crs/EPSG/0/4326",
          "image": "https://search.federated.geoapi-airbusds.com/api/v1/productTypes/SPOTArchive1.5Mono/products/DS_SPOT7_201607291038129_FR1_FR1_FR1_FR1_E001N44_01140?projection=EPSG:4326&size=MEDIUM"
        },
        {
          "size": "MEDIUM",
          "projection": null,
          "image": "https://search.federated.geoapi-airbusds.com/api/v1/productTypes/SPOTArchive1.5Mono/products/DS_SPOT7_201607291038129_FR1_FR1_FR1_FR1_E001N44_01140?size=MEDIUM"
        },
        {
          "size": "LARGE",
          "projection": null,
          "image": "https://search.federated.geoapi-airbusds.com/api/v1/productTypes/SPOTArchive1.5Mono/products/DS_SPOT7_201607291038129_FR1_FR1_FR1_FR1_E001N44_01140?size=LARGE"
        }
      ]
    }
  ]
}

From the result of this request, the sourceId field will be reused later on as datastripId within the Order API.

DATASTRIP_ID=`cat 05_searchImage.json | jq '.features[0].properties.sourceId' | tr -d \"`
echo "DATASTRIP_ID = "$DATASTRIP_ID
Not available
Not available

Step 6: Pricing

Using the image properties returned by the Search API (Step 5), you can use the Order API to get the price of the image, using the following POST request.

Inject the datastripId from the previous request into the price request, as DATASTRIP_ID:

curl -X POST \
  https://order.proxy.geoapi-airbusds.com/api/v1/prices \
  -H "Authorization: Bearer $MY_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Referer: $MY_REFERER" \
  -H "cache-control: no-cache" \
  -d "{
   \"aoi\": [   {
      \"id\": 1,
      \"name\": \"CTS_Test_for_partners\",
      \"geometry\":       {
         \"type\": \"Polygon\",
                \"coordinates\": [
                    [
                        [
                          1.00409636794572,
                          43.7046518627418
                        ],
                        [
                          1.83963153029114,
                          43.6915345718161
                        ],
                        [
                          1.84076579791152,
                          43.3869345568225
                        ],
                        [
                          1.0028176461841,
                          43.4014298007982
                        ],
                        [
                          1.00409636794572,
                          43.7046518627418
                        ]
                    ]
                ]
      }
   }],
   \"voucherCodes\": [],
   \"secondaryMarket\": \"AGRI_ENV\",
   \"items\": [   {
      \"productTypeId\": \""$PRODUCT_TYPE_ID"\",
      \"aoiId\": 1,
      \"properties\": [],
      \"datastripIds\": [\""$DATASTRIP_ID"\"]
   }],
   \"contractId\": \""$FIRST_CONTRACT_ID"\",
   \"optionsPerProductType\": [   {
      \"licence\": \"eula_5\",
      \"options\":       [
        {
            \"key\": \"processing_level\",
            \"value\": \"ortho\"
        },
        {
            \"key\": \"dem\",
            \"value\": \"best_available\"
        },
        {
            \"key\": \"spectral_processing\",
            \"value\": \"pansharpened\"
        },
        {
            \"key\": \"image_format\",
            \"value\": \"dimap_jpeg2000_regular\"
        },
        {
            \"key\": \"pixel_coding\",
            \"value\": \"8bits\"
        },
        {
            \"key\": \"radiometric_processing\",
            \"value\": \"basic\"
        },
        {
            \"key\": \"priority\",
            \"value\": \"standard\"
        },
        {
            \"key\": \"license\",
            \"value\": \"eula_5\"
        },
        {
            \"key\": \"projection_1\",
            \"value\": \"32632\"
        }
      ],
      \"productTypeId\": \"PleiadesArchiveMono\"
   }],
   \"customerReference\": \"Test Price OrderAPI CTS\",
   \"primaryMarket\": \"AGRI\",
   \"options\": [   {
      \"value\": \"FTP\",
      \"key\": \"deliveryType\"
   }]
}" > 06_getPrice.json
Not available
Not available

Ensure that you set the coordinates and replace the productTypeId with your expected product type. The datastripId should be replaced with Search API’s sourceId from the previous request.


The optionsPerProductType must be filled with all the mandatory fields from the productTypes options. For instance, in the given productTypes options example, select the name (processing_level in this case) as key and the expected value id (“ortho” in this case) as the value.


If the request above is sent to the endpoint /prices, you will get a response containing the price of the image, similar to the following one:

{
  "contractId": "myContractID",
  "currency": "EUR",
  "discountPercentage": 0,
  "discountValue": 0,
  "productTypes": [
    {
      "amount": 490,
      "areaKm2": 49,
      "discountPercentage": 0,
      "discountValue": 0,
      "price": 490,
      "productTypeId": "PleiadesArchiveMono",
      "items": [
        {
          "datastripIds": [
            "DS_PHR1A_201701241037483_FR1_PX_E001N43_0615_01664"
          ]
        }
      ],
      "voucherCode": null
    }
  ],
  "totalAmount": 490
}

Here is another example for the case of a SPOT quotation price:

{
            "contractId": "myContractID",
            "currency": "EUR",
            "discountPercentage": 0.0,
            "discountValue": 0.0,
            "productTypes" : [{
              "amount": 200.0,
              "areaKm2" : 20.0,
              "discountPercentage": 0.0,
              "discountValue": 0.0,
              "price": 200.0,
              "productTypeId": "SPOTArchive10Color",
              "items": [
                { "dataStripIds": ["40582651209160926432R5"] }
              ]
            }],
            "totalAmountCurrency": 200.0            
}

If the amount for a productType equals -1 or is null, this is a request for quotation and the order will not be automatic. This may happen in the case of orders or prices for DMC archive, TerraSAR archive, WorldDEM archive, manual ONEPLAN and ONESERIES products. A technician will have to calculate your product price. This does not mean the cost is -1 euro. In the case of ONEPLAN and ONESERIES, you will receive a quotation after evaluation of a technician.

Step 7: Ordering

The final /orders request is a similar url to the /prices request. Just replace “prices” with “orders”.


You can now order the image using the same POST request:

curl -X POST \
  https://order.proxy.geoapi-airbusds.com/api/v1/orders \
  -H "Authorization: Bearer $MY_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Referer: $MY_REFERER" \
  -H "cache-control: no-cache" \
  -d "{
   \"aoi\": [   {
      \"id\": 1,
      \"name\": \"CTS_Test_for_partners\",
      \"geometry\":       {
         \"type\": \"Polygon\",
                \"coordinates\": [
                    [
                        [
                          1.00409636794572,
                          43.7046518627418
                        ],
                        [
                          1.83963153029114,
                          43.6915345718161
                        ],
                        [
                          1.84076579791152,
                          43.3869345568225
                        ],
                        [
                          1.0028176461841,
                          43.4014298007982
                        ],
                        [
                          1.00409636794572,
                          43.7046518627418
                        ]
                    ]
                ]
      }
   }],
   \"voucherCodes\": [],
   \"secondaryMarket\": \"AGRI_ENV\",
   \"items\": [   {
      \"productTypeId\": \""$PRODUCT_TYPE_ID"\",
      \"aoiId\": 1,
      \"properties\": [],
      \"datastripIds\": [\""$DATASTRIP_ID"\"]
   }],
   \"contractId\": \""$FIRST_CONTRACT_ID"\",
   \"optionsPerProductType\": [   {
      \"licence\": \"eula_5\",
      \"options\":       [
        {
            \"key\": \"processing_level\",
            \"value\": \"ortho\"
        },
        {
            \"key\": \"dem\",
            \"value\": \"best_available\"
        },
        {
            \"key\": \"spectral_processing\",
            \"value\": \"pansharpened\"
        },
        {
            \"key\": \"image_format\",
            \"value\": \"dimap_jpeg2000_regular\"
        },
        {
            \"key\": \"pixel_coding\",
            \"value\": \"8bits\"
        },
        {
            \"key\": \"radiometric_processing\",
            \"value\": \"basic\"
        },
        {
            \"key\": \"priority\",
            \"value\": \"standard\"
        },
        {
            \"key\": \"license\",
            \"value\": \"eula_5\"
        },
        {
            \"key\": \"projection_1\",
            \"value\": \"32632\"
        }
      ],
      \"productTypeId\": \"PleiadesArchiveMono\"
   }],
   \"customerReference\": \"Test Price OrderAPI CTS\",
   \"primaryMarket\": \"AGRI\",
   \"options\": [   {
      \"value\": \"FTP\",
      \"key\": \"deliveryType\"
   }]
}"
Not available
Not available

The image will be produced and delivered through FTP. The request will return a response similar to the following one:

{
    "salesOrderId" : "ORDER_UNIQUE_IDENTIFIER"
}

Ordering an image implicitly includes accepting its licence (e.g.: “eula_5”). Licences are available at the endpoint /licences/{licenceName} (GET method). You will be emailed when your order reaches the following status: received, programmed (in case of tasking) and available.

Example Code

This example code runs through each of the steps within this chapter. Every request creates a JSON file as a result. The /prices endpoint request is NOT included in this script on purpose, to avoid an unwanted order. Keep in mind that the /orders request is the same as /prices with its name changed. They both have the same structure, same header and body.

#!/bin/sh

if [ "$#" -ne 2 ]; then
  echo "Usage: $0 YOUR_API_KEY YOUR_REFERER" >&2
  exit 1
fi

# Pass your API KEY as first parameter of the command line and your referer as second parameter
MY_API_KEY=$1
MY_REFERER=$2

# Authentication request that returns the Bearer token. This token will be used for further requests.
echo "Authentication request ---------------------------------------------------------------------------"
curl -X POST \
  https://authenticate.foundation.api.oneatlas.airbus.com/auth/realms/IDP/protocol/openid-connect/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -H "cache-control: no-cache" \
  -d "grant_type=api_key&client_id=IDP&apikey=$MY_API_KEY" \
  > 01_AuthenticationReturn.json

cat 01_AuthenticationReturn.json | jq '.' > 01_AuthenticationReturn_formatted.json

echo "01_AuthenticationReturn.json result file generated"

# Get the IDP Token out of the JSON Result
MY_TOKEN=`cat 01_AuthenticationReturn.json | jq '.access_token' | tr -d \"`
echo "MY_TOKEN = "$MY_TOKEN

# Search for contracts associated to the connected user
echo "My contracts request ------------------------------------------------------------------------------"
curl -X GET \
  https://order.proxy.geoapi-airbusds.com/api/v1/me/contracts \
  -H "Authorization: Bearer $MY_TOKEN" \
  -H "Content-Type: application/json" \
  -H "cache-control: no-cache" \
  -H "Referer: $MY_REFERER" > 02_myContracts.json

cat 02_myContracts.json | jq '.' > 02_myContracts_formatted.json
echo "02_myContracts.json result file generated"


# Search for ProductTypes about the first contract of the previous list

echo "Search for product Types associated with this contract ------------------------------------------"
curl -X GET \
  https://order.proxy.geoapi-airbusds.com/api/v1/contracts/$FIRST_CONTRACT_ID/productTypes \
  -H "Authorization: Bearer $MY_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Referer: $MY_REFERER" \
  -H "cache-control: no-cache" > 03_firstContractProductTypes.json

cat 03_firstContractProductTypes.json | jq '.' > 03_firstContractProductTypes_formatted.json
echo "03_firstContractProductTypes.json result file generated"


# Choose one productTypeId among the possibilities
PRODUCT_TYPE_ID=`cat 03_firstContractProductTypes.json | jq '.productTypes[0].productTypeId' | tr -d \"`
echo "PRODUCT_TYPE_ID = "$PRODUCT_TYPE_ID

# In this case, PleiadesArchiveMono is chosen:
PRODUCT_TYPE_ID="PleiadesArchiveMono"
echo "PRODUCT_TYPE_ID = "$PRODUCT_TYPE_ID


# Get the Production Options

echo "Search for Production options ------------------------------------------------------------------"
curl -X POST \
  https://order.proxy.geoapi-airbusds.com/api/v1/productTypes/$PRODUCT_TYPE_ID/options \
  -H "Authorization: Bearer $MY_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Referer: $MY_REFERER" \
  -H "cache-control: no-cache" \
  -d '{
  "aoi": [
        {
            "polygonId":"1",
            "geometry": {
                "coordinates": [
                    [
                        [63.742229373074423, 69.2808228299488],
                        [65.284920013680591, 69.277887035345188],
                        [65.308197969495467, 69.8222020464723],
                        [63.715653972431483, 69.827049108238825],
                        [63.742229373074423, 69.2808228299488]
                    ]
                ],
                "type": "Polygon"
            }
        }
    ]
}' > 04_firstContractProductOptions.json

cat 04_firstContractProductOptions.json | jq '.' > 04_firstContractProductOptions_formatted.json
echo "04_firstContractProductOptions.json result file generated"


# Then Search for an Image to get its sourceId=datastripId

# SEARCH REQUEST

echo "Search for the Catalog image to produce-------------------------------------------------------------"
curl -X POST \
  https://search.federated.geoapi-airbusds.com/api/v1/search \
  -H "Authorization: Bearer $MY_TOKEN" \
  -H "Cache-Control: no-cache" \
  -H "Content-Type: application/json" \
  -d '{
  "geometry": "POLYGON ((1.00409636794572 43.7046518627418, 1.83963153029114 43.6915345718161, 1.84076579791152 43.3869345568225, 1.0028176461841 43.4014298007982, 1.00409636794572 43.7046518627418))",
  "constellation": [
    "SPOT"
  ],
  "acquisitionDate": "[2016-07-01,2016-07-31T23:59:59]",
  "incidenceAngle": "20]",
  "cloudCover": "10]",
  "count": 10,
  "startPage": 1
}' > 05_searchImage.json

cat 05_searchImage.json | jq '.' > 05_searchImage_formatted.json
echo "05_searchImage.json result file generated"

DATASTRIP_ID=`cat 05_searchImage.json | jq '.features[0].properties.sourceId' | tr -d \"`
echo "DATASTRIP_ID = "$DATASTRIP_ID

# Get the Price of a Product
echo "Get the price of a Product ------------------------------------------------------------------"

curl -X POST \
  https://order.proxy.geoapi-airbusds.com/api/v1/prices \
  -H "Authorization: Bearer $MY_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Referer: $MY_REFERER" \
  -H "cache-control: no-cache" \
  -d "{
   \"aoi\": [   {
      \"id\": 1,
      \"name\": \"CTS_Test_for_partners\",
      \"geometry\":       {
         \"type\": \"Polygon\",
                \"coordinates\": [
                    [
                        [
                            0.88989945732399,
                            44.1638005731915
                        ],
                        [
                            1.67077369813617,
                            44.1618388246023
                        ],
                        [
                            1.6712322027951,
                            43.6812983876901
                        ],
                        [
                            0.890200740838538,
                            43.683891736675
                        ],
                        [
                            0.88989945732399,
                            44.1638005731915
                        ]
                    ]
                ]
      }
   }],
   \"voucherCodes\": [],
   \"secondaryMarket\": \"AGRI_ENV\",
   \"items\": [   {
      \"productTypeId\": \""$PRODUCT_TYPE_ID"\",
      \"aoiId\": 1,
      \"properties\": [],
      \"datastripIds\": [\""$DATASTRIP_ID"\"]
   }],
   \"contractId\": \""$FIRST_CONTRACT_ID"\",
   \"optionsPerProductType\": [   {
      \"licence\": \"eula_5\",
      \"options\":       [
        {
            \"key\": \"processing_level\",
            \"value\": \"ortho\"
        },
        {
            \"key\": \"dem\",
            \"value\": \"best_available\"
        },
        {
            \"key\": \"spectral_processing\",
            \"value\": \"pansharpened\"
        },
        {
            \"key\": \"image_format\",
            \"value\": \"dimap_jpeg2000_regular\"
        },
        {
            \"key\": \"pixel_coding\",
            \"value\": \"8bits\"
        },
        {
            \"key\": \"radiometric_processing\",
            \"value\": \"basic\"
        },
        {
            \"key\": \"priority\",
            \"value\": \"standard\"
        },
        {
            \"key\": \"license\",
            \"value\": \"eula_5\"
        },
        {
            \"key\": \"projection_1\",
            \"value\": \"32632\"
        }
      ],
      \"productTypeId\": \"PleiadesArchiveMono\"
   }],
   \"customerReference\": \"Test Price OrderAPI CTS\",
   \"primaryMarket\": \"AGRI\",
   \"options\": [   {
      \"value\": \"FTP\",
      \"key\": \"deliveryType\"
   }]
}" > 06_getPrice.json

cat 06_getPrice.json | jq '.' > 06_getPrice_formatted.json
echo "06_getPrice.json result file generated"


echo "normal ending of the program"
# This program does not include the Order, but it is the same request as the Price, with the order endpoint:
# in the last request, please replace 'prices' with 'orders'



Not yet available
Not yet available

Download in Shell