Documentation




Open EV API Documentation

base_url = https://openev.delhitransport.in

For Data Providers

NOTE - Users can also share static data using the same API. The data would need to be transformed into the given format and submitted using the API provided.

Steps for Registration

  • Register as a Data Provider
  • Get API key - note it down
  • Once you receive the API approval email, you are ready to push data using data push API

EV add/ update API -

  • [PUT] - {base_url}/api/update-ev/?key=[YOUR-API-KEY] - will deprecate
  • New endpoint
    • [PUT] - {base_url}/api/update-stations/?key=[YOUR-API-KEY]
  • BODY
    [
      {
        "address": "Build parking ,New Delhi ",
        "available": 4,
        "charger_type": [
          {
            "available": 1,
            "capacity": "22 kW",
            "cost_per_unit": "₹13 per unit",
            "diagram": "connector_diagram/type2ac.png",
            "total": 3,
            "type": "T2"
          },
          {
            "available": 1,
            "capacity": "26 kW",
            "cost_per_unit": "₹26 per unit",
            "diagram": "connector_diagram/chademo.png",
            "total": 4,
            "type": "CHADEMO"
          },
          {
            "available": 2,
            "capacity": "22 kW",
            "cost_per_unit": "₹13 per unit",
            "diagram": "connector_diagram/type2ac.png",
            "total": 2,
            "type": "T2-COMBO"
          }
        ],
        "city": "New Delhi",
        "close": "23:59:59",
        "contact_numbers": [
          "999999999",
          "888888888"
        ],
        "coordinates": {
          "latitude": 28.59,
          "longitude": 77.18
        },
        "country": "India",
        "dtl_site": true,
        "id": "716",
        "logo": "eesl.png",
        "name": "EESL-DEL",
        "open": "00:00:00",
        "payment_modes": "E-wallet, cash",
        "postal_code": "110001",
        "staff": "Unstaffed",
        "total": "9",
        "vendor": "EESL"
      }
    ]
  • A detailed description of parameters can be below
  • logo
    • .png file preferred
    • the vendor can provide a URL to the logo file, else leave the field empty.
    • share the logo with us, we’ll add it
  • dtl_site - true or false
    • true if the station is a DTL site
    • false if the station is not a DTL site
  • diagram in “charger_type”
    • the vendor can provide a URL to the charger diagram file, else leave the field empty.
    • if applicable, we will add the diagram from our side otherwise

View my EV locations

  • URL - {base_url}/api/get-user-ev/?key=[YOUR-API-KEY] - will deprecate
  • New endpoint
    • URL - {base_url}/api/get-user-stations/?key=[YOUR-API-KEY]

Delete EV location/ station

  • [GET] - {base_url}/api/delete-station/?key=[YOUR-API-KEY]&id=[STATION-ID]
  • Response
    {
        "status": 200,
        "msg": "Successfully deleted station for station ID - S12"
    }

For Data Consumers

Steps for Registration

  • Register as a data consumer
  • Get API key - note it down
  • Once you receive the API approval email, you are ready to fetch data
  • Get EV Locations
    • [GET] {base_url}/api/get-ev/?key=[YOUR-API-KEY]
    • Response
      [
        {
          "data": [
            {
              "address": "Grid",
              "available": "NA",
              "charger_type": [
                {
                  "available": "NA",
                  "capacity": "15 kW",
                  "cost_per_unit": "NA",
                  "count": 2,
                  "diagram": "connector_diagram/gbt.png",
                  "total": "2.0",
                  "type": "BEVC DC 001"
                }
              ],
              "city": "Delhi",
              "close": "23:59:59",
              "contact_numbers": [
                "7042xxxxxx"
              ],
              "coordinates": {
                "latitude": 28.56,
                "longitude": 77.2
              },
              "cost_per_unit": "₹10 per unit",
              "country": "India",
              "id": "S12",
              "logo": "",
              "name": "Pvt. Ltd.",
              "open": "00:00:00",
              "payment_modes": "Card, E-Wallet, UPI",
              "postal_code": "110001",
              "staff": "Unstaffed",
              "total": "2",
              "vendor": "Pvt. Ltd."
            }
          ],
          "status": 1000,
          "status_message": "Success",
          "timestamp": "2022-03-28T12:53:49+0530"
        }
      ]

    • Status codes -
      • 1000 - success
      • 2000 - client-side error
      • 3000 - server-side error
  • A detailed description of parameters can be found below

API fields params:

Name description Type Format
address address of the charging station string
available total number of chargers available at the charging station integer count
charger_type - types of chargers at the charging station with their individual availability total + availability counts charger type format Charger Type Format For each type of connector present at the charging station, add a new entry as below
# charger type format
{ "available": 1, # number of connectors available
"capacity": "22 kW", # power capacity of the connector
"cost_per_unit": "₹13 per unit", # charging cost per unit
"diagram": "connector_diagram/type2ac.png",
"total": 3, # total number of connectors
"type": "T2" # type of connector
}
vendor vendor name string
total total number of chargers at the station integer count
staff indicates whether the charging station is staffed or unstaffed string Staffed/ Unstaffed
postal_code pin code of the charging station string
payment_modes payment modes accepted for charging at the charging station string
open time for when the charging station is open for operations string HH:MM:SS
name name of the charging station string
id charging station ID string or integer
country India
coordinates latitude, longitude points for the charging station float values
contact_numbers contact number(s) for the charging station/ vendor
close time for when the charging station is closed for operations string HH:MM:SS
city city in which the charging station is located string
station_type the type of station, whether the location is a ev charging station or a battery swapping station. Default value - “charging” string [”battery_swapping”, “charging”]