Get summary

The Company API enables you to track the costs associated with your ICEYE contract by querying the summary endpoint to retrieve a budget summary. The getSummary operation returns the following details:

Field Description

currency

An ISO-4217 currency symbol, indicating the currency used for transactions.

consolidatedSpent

Amount spent on purchases (credits from ICEYE), in the contract’s currency minor units.

onHold

Amount held but not charged for active tasks, in the contract’s currency minor units.

spendLimit

(Optional) Maximum amount that can be spent, in the contract’s currency minor units.

The getSummary operation is available, only if your contract is associated with a pricing plan.

Available funds

If a contract has a spendLimit, you can calculate your remaining funds with ICEYE. This can help you plan your next tasks (using the getTaskPrice operation) and decide if you want to increase, decrease, or mantain the current cadence of tasking. The formula for calculating your available funds is spendLimit - consolidatedSpent - onHold.

If the price of your task exceeds your available funds, your task will be rejected with an error.

{
    "code": "ERR_INSUFFICIENT_FUNDS",
    "message": "could not create task: insufficient funds"
}

To continue tasking, please reach out to your ICEYE Sales representative.

Example

Request

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

curl --location "${API_BASE_URL}/api/company/v1/contracts/${contractID}/summary" \
--header "Accept: application/json, application/problem+json" \
--header "Authorization: Bearer ${API_ACCESS_TOKEN}"

Response

On success, returns a 200 status code and a JSON object containing the details of the queried customer budget summary.

{
  "contractID": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX",
  "consolidatedSpent" : 900000,
  "currency" : "USD",
  "onHold" : 1000000,
  "spendLimit" : 2000000
}

Errors

This section describes common error conditions.

404 - not found

Indicates that the summary for the contract requested by the user was not found. This is usually because the contract does not have an associated pricing plan. Such contracts do not have a programmatic way to query pricing and budget information.

Example error when a contract without a pricing plan is used:

{
    "code": "not_found",
    "message": "Requested resource was not found."
}