Purchase catalog items

After browsing the catalog and selecting the list of IDs for the catalog items you want to purchase, you can place an order for the items by invoking the purchaseCatalogItems operation. You must provide the following parameters in the purchase request:

  • itemIds — the list of item IDs for the STAC items you wish to purchase.

  • contractId — specifies the contract associated with this purchase.

Optional parameters

There is a legal requirement to identify the end user of the catalog imagery. By default, the end user is taken to be the company associated with the contract, but if you need to specify a different end user, you can specify the following parameters:

  • companyName — the name of the company that receives the imaging products.

  • contactPerson — the name of the contact person for this transaction.

  • reference — user-supplied string that can be used to identify a purchased item or a group of purchased items for easier tracking. The reference parameter accepts UTF-8 characters and has a maximum length of 256 characters.

Example

Request

Enter the following curl command, remembering to replace the ${VARNAME} variables with the appropriate values:

curl --location "${API_BASE_URL}/api/catalog/v1/purchases" \
--header "Content-Type: application/json" \
--header "Accept: application/json, application/problem+json" \
--header "Authorization: Bearer ${API_ACCESS_TOKEN}" \
--data '{
    "contractId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
    "companyName": "Test",
    "contactPerson": "Test",
    "itemIds": [
        "${ITEM_ID_1}",
        "${ITEM_ID_2}",
        "${ITEM_ID_3}"
    ]
}'

Response

On success, customers will receive a 202 status code (request is accepted, but processing is not finished yet) and a JSON object containing the purchase ID.

{
    "purchaseId": "XXXXXXXXXX"
}