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 |
---|---|
|
An ISO-4217 currency symbol, indicating the currency used for transactions. |
|
Amount spent on purchases (credits from ICEYE), in the contract’s currency minor units. |
|
Amount held but not charged for active tasks, in the contract’s currency minor units. |
|
(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}"
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."
}