Chargeprice API Documentation

GET /v1/vehicles

Returns all supported electric vehicles.

If you want to get all details of vehicles, please use /v2/vehicles.

This API follows the https://jsonapi.org specification.

Headers

Authorization Group

ReadVehicles

Request

No parameters.

Response Body

A response contains 0 to many vehicles. The following table lists the available attributes:

Name Type Example Description
name String “Kona 64kWh (2019)” Name of the car including variant and release year, if available
brand String “Hyundai” Brand of the car
dc_charge_ports Array [“ccs”,”tesla_ccs”] All DC charge ports, that the car is capable to charge with. Possible values: ccs, chademo
manufacturer Relationship { id: “..”, type: “brand” } Manufacturer (Brand) of the car

Example

Request

GET http://example-base-url.com/v1/vehicles
Content-Type: application/json
Api-Key: my-secret-key

Response

200 Ok

Body:

{
  "data": [
    {
      "id": "1e49b853-36fc-47ed-9826-97828b5b2fdd",
      "type": "car",
      "attributes": {
        "name": "Kona 64kWh (2018)",
        "brand": "Hyundai",
        "dc_charge_ports": [
          "ccs"
        ]
      },
      "relationships": {
        "manufacturer": {
          "data": {
            "type": "brand",
            "id": "3e49b853-36fc-47ed-9826-97828b5b2fd1"
          }
        }
      }
    }
  ]
}



400 Bad Request

Client provided invalid request body.

{
  "errors": [
    {
      "status": "400",
      "title": "..."
    }
  ]
}
403 Forbidden
{
  "errors": [
    {
      "status": "403",
      "title": "api_key missing"
    }
  ]
}
500 Internal Server Error

An unexpected error happened.

{
  "errors": [
    {
      "status": "500",
      "title": "some error"
    }
  ]
}