Skip to main content
POST
/
estimations
Create a cost estimation
curl --request POST \
  --url https://api.chargeapi.co/v1/estimations \
  --header 'Content-Type: application/json' \
  --data '{
  "charging_station": "<string>",
  "vehicle": "<string>",
  "soc_current": 50,
  "soc_target": 50,
  "currency": "<string>"
}'
{
  "id": null,
  "object": null,
  "battery_level": null,
  "battery_target_level": null,
  "cost_breakdown": [
    {
      "cost": null,
      "description": null,
      "quantity": null,
      "type": null,
      "unit": null,
      "unit_price": null,
      "tax_percent": null
    }
  ],
  "created": null,
  "currency": null,
  "estimated_duration": null,
  "estimated_energy_kwh": null,
  "estimated_total_cost": null,
  "charging_station": null,
  "valid_until": null,
  "vehicle": null
}

Body

application/json
charging_station
string
required

ID of the charging station being evaluated.

vehicle
string
required

ID of the vehicle to use for battery capacity and connector checks.

soc_current
integer
required

Current state-of-charge (percentage) of the vehicle battery.

Required range: 0 <= x <= 100
soc_target
integer
required

Desired target state-of-charge after charging completes.

Required range: 1 <= x <= 100
currency
string

Optional ISO 4217 currency code to override station default (e.g., usd). If omitted, uses station’s currency.

Response

Returns the newly created Estimation object containing the cost breakdown and duration prediction for the requested parameters.

id
string

Unique identifier for the estimation object.

Example:

null

object
string

String representing the object’s type. Always estimation.

Example:

null

battery_level
integer

Current battery level of the vehicle before charging, as a percentage (0–100).

Example:

null

battery_target_level
integer

Target battery level for this session, as a percentage (0–100).

Example:

null

cost_breakdown
object[]

Itemized list of costs included in the estimate, such as energy, session, and idle fees.

created
integer

Time at which the estimation was generated.

Example:

null

currency
string

ISO 4217 three-letter currency code (e.g., usd).

Example:

null

estimated_duration
integer

Estimated charging duration in seconds.

Example:

null

estimated_energy_kwh
number

Estimated energy needed to reach the target battery level, in kilowatt-hours (kWh).

Example:

null

estimated_total_cost
number

Total estimated cost for the session in currency units.

Example:

null

charging_station
string

ID of the charging station used for this estimation.

Example:

null

valid_until
integer

Expiration timestamp for this estimate. The values may change after this point.

Example:

null

vehicle
string

ID of the vehicle used for the estimation.

Example:

null