Skip to content
Last updated

Onboarding Users

A user, generally representing a real human, is the central resources in the ev.energy system to which other resources, such as Vehicles and EVSEs are attached.

How to onboard a User

Requirements

To begin you will need:

  • A valid Authorization token (see this page for instructions).

Onboard a User

To onboard a user, you must post the following request:

curl --request POST \
     --url https://app.ev.energy/api/v2/users/ \
     --header 'accept: application/json' \
     --header 'authorization: Bearer example' \
     --header 'content-type: application/json' \
     --data '
{
  "email": "example@mail.com",  # Optional: Users without an email will have a username auto-created
  "default_location": # Optional: {
    "address_1": "1 Main Street",
    "address_2": "Apt 1",
    "postal_code": "12345",
    "country_code": "GB", # ISO 3166-1 2 letter Country Code
    "city": "New York",
    "state": "NY"
    "coordinates": {
        "latitude": 40.9,
        "longitude": -73.2,
    },
    "tariff" "https://api.ev.energy/v2/tariffs/tari01HN2NV5DY9C262PQKG75GHN8K" # This can be found from the /tariffs endpoint
  }
}

If you wish to attach a tariff to a users address, the URL for the tariff can be found from the /tariffs endpoint.