To authorize a private transaction, stations check whether the token used to start the session is active in the same account. In general, tokens used for private charging are physical RFID objects such as charge cards or key fobs that have followed the system's activation flow. This means they were imported into your tenant and subsequently activated in an account with a subscription.

With Tokens API, you can generate virtual tokens to remotely start a private session. These digitally generated RFIDs eliminate the need for physical RFID objects, meaning you don't need to purchase cards or key fobs to enable private charging in your app. In addition, creating a virtual token is the simplest way of adding a private charging token to your account. It's imported, activated, and ready to use in a single step, without needing a contract ID or subscription.

Get the account's unique identifier

To generate a virtual token, you first need the account's unique identifier.

  1. Log in to the platform.
  2. Go to Accounts.
  3. Select the account from the list.
  4. Copy the account's unique identifier from the URL.
    https://tenant.everon.io/accounts/<unique identifier>/overview.

If you also use the Station lifecycle API, you can retrieve the account's unique identifier by getting details for a station in the account.

Create a virtual token

Send a request to POST https://api.everon.io/tokens/v1/tokens:creation. Specify the token type as generic_virtual and provide your account's unique identifier.

{
  "tokenType": "generic_virtual",
  "tokenGenericVirtual": {
    "accountId": "d0130d61-511c-456f-98de-f94448c7b7f2"
  }
}
CODE
curl --location --request POST 'https://api.everon.io/tokens/v1/tokens:creation' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "tokenType": "generic_virtual",
  "tokenGenericVirtual": {
    "accountId": "d0130d61-511c-456f-98de-f94448c7b7f2"
  }
}'
CODE

This generates a virtual token in the account. The response contains a uid, which is the RFID you can use to start a charging session.

 View sample response
{
    "id": "87ac19ea-763f-474b-8664-ea3ff7bc7189",
    "legacyContractId": null,
    "reference": null,
    "status": "active",
    "accountName": "Account",
    "accountId": "d0130d61-511c-456f-98de-f94448c7b7f2",
    "visualNumber": null,
    "uid": "2WI8T6WEXPI3DDYW74BA",
    "publicChargingEnabled": false,
    "reimbursable": false,
    "deactivatedBy": null,
    "deactivationDate": null,
    "recurringDetailReference": null,
    "type": "generic_virtual",
    "changeHistory": {
        "createdBy": {
            "id": "17cef90d-69a2-4bca-8838-b626c5e874e0",
            "email": "email@example.com",
            "firstName": "Jane",
            "lastName": "Doe"
        },
        "createdAt": "2021-04-29T15:00:34.601468Z",
        "updatedBy": {
            "id": "17cef90d-69a2-4bca-8838-b6c6c5e874e0",
            "email": "email@example.com",
            "firstName": "Jane",
            "lastName": "Doe"
        },
        "updatedAt": "2021-04-29T15:00:34.601472Z"
    },
    "userActions": [
        "block",
        "deactivate",
        "suspend"
    ],
    "issuer": null,
    "activatedAt": "2021-04-29T15:00:34.601459Z"
}
CODE