patch

Archive a token

Archives a token by permanently setting isValid to false and isArchived to true
WARNING! This action is potentially dangerous and irreversible!

networkIdstring

required

The ID of the network for which authorization is requested

Responses

Request examples

{
  "networkId": "string"
}

Response examples

OK

{
  "data": {
    "id": "string",
    "network": "string",
    "isValid": true,
    "type": "AD_HOC_PAYMENT_TERMINAL",
    "whitelistType": "ALWAYS",
    "driver": "string",
    "paymentTerminal": "string",
    "name": "string",
    "expiresAt": "2023-06-07T17:32:28Z",
    "createdAt": "2023-06-07T17:32:28Z",
    "updatedAt": "2023-06-07T17:32:28Z"
  }
}
post

Authorize a token to start a charge on an asset

Use this route to check if a token in our system should be authorized to start a charge on a particular station. If the token is associated with a driver, it checks for valid billing status, if the station is free, and private charging access.

assetIdstring

required

The ID of the asset for which authorization is requested

networkIdstring

required

The ID of the network for which authorization is requested

Responses

Request examples

{
  "assetId": "string",
  "networkId": "string"
}

Response examples

The token is unauthorized.

{
  "data": {
    "authorized": true,
    "token": {
      "id": "string",
      "network": "string",
      "isValid": true,
      "type": "AD_HOC_PAYMENT_TERMINAL",
      "whitelistType": "ALWAYS",
      "driver": "string",
      "paymentTerminal": "string",
      "name": "string",
      "expiresAt": "2023-06-07T17:32:28Z",
      "createdAt": "2023-06-07T17:32:28Z",
      "updatedAt": "2023-06-07T17:32:28Z"
    }
  }
}
get

List all tokens

This endpoint retrieves a list of all tokens available to the authenticated user.

limitstring

The maximum number of tokens to return (default 20, maximum 100)

Pattern
^[0-9][0-9]?$|^100$
startingAfterstring

The ID of the last token in the previous page of results. Results will start after this token

driverIdstring

The ID of the driver to filter tokens by

Responses

Response examples

A list of tokens

{
  "data": {
    "hasMore": true,
    "items": [
      {
        "id": "string",
        "network": "string",
        "isValid": true,
        "type": "AD_HOC_PAYMENT_TERMINAL",
        "whitelistType": "ALWAYS",
        "driver": "string",
        "paymentTerminal": "string",
        "name": "string",
        "expiresAt": "2023-06-07T17:32:28Z",
        "createdAt": "2023-06-07T17:32:28Z",
        "updatedAt": "2023-06-07T17:32:28Z"
      }
    ]
  }
}
post

Create a new token

This endpoint creates a new token
This action is not enabled by default. You must request additional permissions to perform this action.

idstring

An ID can optionally be provided when created a token. For example to register a VEHICLE token you would create a token with the "id" being the VID. For example VID:A1B2C3D4

paymentTerminalIdstring
driverIdstring
isValidboolean

required

typestring

required

Enum
  • AD_HOC_USER
  • APP_USER
  • OTHER
  • PAYMENT_TERMINAL
  • AD_HOC_PAYMENT_TERMINAL
  • RFID
  • ROAMING_PARTNER
  • VEHICLE
whitelistTypestring

required

Enum
  • ALWAYS
  • ALLOWED
  • ALLOWED_OFFLINE
  • NEVER
networkstring
namestring
expiresAtstring

The ISO date time when the token will expire. If not provided, the token will not expire.

Format
date-time

Responses

Request examples

{
  "id": "string",
  "paymentTerminalId": "string",
  "driverId": "string",
  "isValid": true,
  "type": "AD_HOC_USER",
  "whitelistType": "ALWAYS",
  "network": "string",
  "name": "string",
  "expiresAt": "2023-06-07T17:32:28Z"
}

Response examples

OK

{
  "data": {
    "id": "string",
    "network": "string",
    "isValid": true,
    "type": "AD_HOC_PAYMENT_TERMINAL",
    "whitelistType": "ALWAYS",
    "driver": "string",
    "paymentTerminal": "string",
    "name": "string",
    "expiresAt": "2023-06-07T17:32:28Z",
    "createdAt": "2023-06-07T17:32:28Z",
    "updatedAt": "2023-06-07T17:32:28Z"
  }
}
patch

Update a token

This endpoint updates an existing token by its ID.
This action is not enabled by default. You must request additional permissions to perform this action.

networkstring

required

The network the token is associated with

isActiveboolean

required

Corresponds to the "isValid" field on the token

namestring or null

The name associated with the token

expiresAtstring or null

The ISO date time when the token will expire

Format
date-time

Responses

Request examples

{
  "network": "string",
  "isActive": true,
  "name": "string",
  "expiresAt": "2023-06-07T17:32:28Z"
}

Response examples

The updated token object.

{
  "data": {
    "id": "string",
    "network": "string",
    "isValid": true,
    "type": "AD_HOC_PAYMENT_TERMINAL",
    "whitelistType": "ALWAYS",
    "driver": "string",
    "paymentTerminal": "string",
    "name": "string",
    "expiresAt": "2023-06-07T17:32:28Z",
    "createdAt": "2023-06-07T17:32:28Z",
    "updatedAt": "2023-06-07T17:32:28Z"
  }
}

Was this page helpful?