Rates allow you to set a price for charging sessions on a connector. By setting a Rate, eDRV will automatically calculate and report costs for an ongoing session via Webhook events in the session.cost property.

Rates are also used for eDRV's Charging Intelligence for e.g. if you want to set a cap on costs for a charging session.

Rates Object

{
  "_id": "615c9aa4d311c82bdc9422c3",
  "currency": "EUR",
  "price_components": [
    {
      "tax": 10,
      "type": "FLAT",
      "price": 5
    },
    {
      "type": "ENERGY",
      "price": 0.35,
      "tax": 19
    },
    {
      "tax": 0,
      "type": "TIME",
      "price": 2.5
    },
    {
      "type": "PARKING_TIME",
      "grace_period": 1.5,
      "price": 0.35,
      "tax": 19
    }
  ],
  "minimum_amount": "0.5",  
  "active": true,
  "createdAt": "2021-10-05T18:34:12.204Z",
  "updatedAt": "2021-10-05T18:34:12.204Z"
}

Attributes

_id string

The Id of this Rate

currency string

3 letter iso currency codes. See https://en.wikipedia.org/wiki/ISO_4217.

price_components Array of objects
Only one of each type is permitted. Combinations e.g FLAT + TIME are permitted.

type: string One of [FLAT, ENERGY, TIME, PARKING_TIME]

  • FLAT : A flat fee for this session
  • ENERGY : Per kWh
  • TIME : Per Hour
  • PARKING_TIME : Per Hour

price number
Price value

tax number
Tax rate in percent% (0-100) to be added to the cost calculation. For example:

The cost for 10kWh sold at a rate of $0.10/kWh + 10% tax = 10 x 0.10 x (1+10%) = $1.10

grace_period number

Grace period in hours. Only applicable for type = PARKING_TIME

minimum_amount number

Minimum amount for the rate

active boolean

Activate/Deactivate a rate

Advanced Rate Object

{
  "ok": true,
  "message": "Found",
  "result": {
    "_id": "6266d9f74ad1b53b91342dbe",
    "name": "All but Sunday",
    "description": "All but Sunday",
    "currency": "USD",
    "active": true,
    "layout": [
      {
        "target": {
          "day_of_week": [
            "SATURDAY"
          ],
          "start_time": "00:00",
          "end_time": "23:59"
        },
        "rate": {
          "_id": "6266be2ea9acac3c3a8f7595",
          "name": "Javi - All 2 USD",
          "description": "Javi - All 2 USD",
          "currency": "USD",
          "price_components": [
            {
              "tax": 0,
              "step_size": 1,
              "type": "FLAT",
              "price": 2,
              "grace_period": 0
            },
            {
              "tax": 0,
              "step_size": 1,
              "type": "ENERGY",
              "price": 2,
              "grace_period": 0
            },
            {
              "tax": 0,
              "step_size": 1,
              "type": "TIME",
              "price": 2,
              "grace_period": 0
            },
            {
              "tax": 0,
              "step_size": 1,
              "type": "PARKING_TIME",
              "price": 2,
              "grace_period": 0.1
            }
          ],
          "createdAt": "2022-04-25T15:28:46.872Z",
          "updatedAt": "2022-04-25T15:28:46.872Z"
        }
      },
      {
        "target": {
          "day_of_week": [
            "MONDAY",
            "TUESDAY",
            "WEDNESDAY",
            "THURSDAY",
            "FRIDAY"
          ],
          "start_time": "00:01",
          "end_time": "23:59"
        },
        "rate": {
          "_id": "6266be064ad1b53b9133d0c7",
          "name": "Javi - All 1 USD",
          "description": "Javi - All 1 USD",
          "currency": "USD",
          "price_components": [
            {
              "tax": 0,
              "step_size": 1,
              "type": "FLAT",
              "price": 1,
              "grace_period": 0
            },
            {
              "tax": 0,
              "step_size": 1,
              "type": "ENERGY",
              "price": 1,
              "grace_period": 0
            },
            {
              "tax": 0,
              "step_size": 1,
              "type": "TIME",
              "price": 1,
              "grace_period": 0
            },
            {
              "tax": 0,
              "step_size": 1,
              "type": "PARKING_TIME",
              "price": 1,
              "grace_period": 0.1
            }
          ],
          "createdAt": "2022-04-25T15:28:06.065Z",
          "updatedAt": "2022-04-25T15:28:06.065Z"
        }
      }
    ],
    "default_rate": {
      "_id": "6266be54d7cfed3b98a788ee",
      "name": "Javi - All 3 USD",
      "description": "Javi - All 3 USD",
      "currency": "USD",
      "price_components": [
        {
          "tax": 0,
          "step_size": 1,
          "type": "FLAT",
          "price": 3,
          "grace_period": 0
        },
        {
          "tax": 0,
          "step_size": 1,
          "type": "ENERGY",
          "price": 3,
          "grace_period": 0
        },
        {
          "tax": 0,
          "step_size": 1,
          "type": "TIME",
          "price": 3,
          "grace_period": 0
        },
        {
          "tax": 0,
          "step_size": 1,
          "type": "PARKING_TIME",
          "price": 3,
          "grace_period": 0.1
        }
      ],
      "createdAt": "2022-04-25T15:29:24.870Z",
      "updatedAt": "2022-04-25T15:29:24.870Z"
    },
    "createdAt": "2022-04-25T17:27:19.901Z",
    "updatedAt": "2022-04-25T17:27:19.901Z"
  }
}

Attributes

_id string

The Id of this Rate Schedule

name string

Name of the schedule rate

description string

Description of the rate

active boolean

Set the rate schedule as active / inactive. Put is possible only when active is set to false.

currency string

3 letter iso currency codes. See https://en.wikipedia.org/wiki/ISO_4217. If you do not see your currency listed, please contact support.

default_rate object

object of the default rate. (refer the rate object details shared above)

layout Array of objects

target: object

  • day_of_week: array of [MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY , SUNDAY]
  • start_time: datetime Start Time (00:00 to 23:59)
  • end_time: datetime End Time (00:00 to 23:59). end_time > start_time

rate: object
rate object. (refer the rate object details shared above)