Token API

Welcome to the EVC-net Token API! This API provides access to retrieve tokens from the EVC-net platform. With seamless integration capabilities, developers can efficiently access and manage token data programmatically. This documentation serves as a comprehensive guide to help you navigate the functionalities and endpoints available through this API.

Acceptance Endpoint: https://evc-a.evc-net.com/

Production Endpoint: https://evc-net.com/

Authentication

To access the API endpoints, authentication via API keys is required. Please refer to the authentication section for details on how to authenticate your requests.

Rate Limits

Requests to the API are subject to rate limits to ensure system stability and reliability. Details on rate limits can be found in the Rate Limiting section.

Getting Started

Begin exploring the API functionalities by reviewing the available endpoints and their respective parameters. Detailed explanations and usage examples are provided for each endpoint to facilitate integration into your application.

We’re excited to see how you leverage the EVC-net Token API to streamline token retrieval within your application. If you have any questions or need assistance, please refer to the contact support@lastmilesolutions.com.

Let’s get started!

Authentication

Accessing the EVC-net API endpoints requires authentication using an API token generated for a system user account. Follow these steps to generate an authentication token:

Creating a System User Account

  1. Contact Last Mile Solutions: LMS will create a System User Account dedicated to the token API access.
  2. Generate Authentication Token: Under the newly created system user account we will generate an authentication token. This token will serve as the key for API authentication.

Authentication Format

To authenticate your requests to the EVC-net API, use the following format in the HTTP header:

Authorization: token {authentication_token}

  • Replace {authentication_token} with the authentication token generated for the system user account.
  • Include this header in your API requests to authenticate and gain access to the endpoints.

Example:

  • GET /api/rest/customer HTTP/1.1
  • Host: evc-a.evc-net.com
  • Authorization: token your_authentication_token_here

Security Note

Keep your authentication token secure and avoid sharing it in publicly accessible areas. Treat the token as sensitive information to prevent unauthorized access to your account and data.

Interface & Endpoint

Example endpoint structure:

  • /api/rest/token
  • /api/rest/token/{TokenId}
MethodDescription
GETRetrieve list or details with /{tokenId} from a Token
POSTCreate a new token attached to a customer
PUTCreate a new token using /{tokenId}
PATCHUpdate a token using /{tokenId}

Example headers structure (identical for both):

KeyValue
acceptapplication/json
X-Request-ID(int) Generated ID example, 12345
x-api-version1.1.1
AuthorizationToken { authentication_token }

Example response on get all tokens – GET to URL: https://evc-net.com/api/rest/token

FieldValueData Type
id1555888899Integer
usergroupId999Integer
typeRfidString
internalId044597896String
externalId044597896String
emi3Id NLLMSC2044597896String
tokenIssuerId01Integer
creationDate2022-07-15T08:30:00ZString
lastUpdateDate2023-11-28T14:45:00ZString
expiryDate2024-12-31T23:59:59ZString
roamingtrueBoolean
statusActiveString
ownerPerson(object)Object

Example response on get token detail – GET to URL: https://evc-net.com/api/rest/token/{tokenId}

FieldValueData Type
id1555888899Integer
usergroupId999Integer
typeRfidString
internalId044597896String
externalId044597896String
emi3Id NLLMSC2044597896String
tokenIssuerId01Integer
creationDate2022-07-15T08:30:00ZString
lastUpdateDate2023-11-28T14:45:00ZString
expiryDate2024-12-31T23:59:59ZString
roamingtrueBoolean
statusActiveString
ownerPerson(object)Object

Example on creating a token- POST to URL: https://evc-net.com/api/rest/token/

{
"id": 66568,
"ownerPerson": {
"id": 123
},
"usergroupId": 1,
"tokenIssuerId": 1,
"expiryDate": null,
"externalId": "NL-XXX-C000000000-X0",
"internalId": "00X00C0A4D4X000",
"info": "????",
"status": "Active",
"roaming": true,
"payerTransactions": true,
"payerSubscriptions": true,
"reference": "xxxxx",
"remotePassword": "xxxxxx",
"type": "Rfid",
"global": true,
"contractId": "NLLMSC123456789"
}

Example on creating a token- PUT to URL: https://evc-net.com/api/rest/token/{tokenId}

{
"expiryDate": "17-02-2022",
"info": "????",
"roaming": true,
"reference": "xxxxx",
"status": "Active",
"externalId": "NL-XXX-C000000000-X0",
"usergroupId": 121
}

Example on creating a token- PATCH to URL: https://evc-net.com/api/rest/token/{tokenId}

{
"status": "Active"
}

Status codes & error messages

Status CodeMessage
200Success response
400Generic error (check response data field)
403Incorrect API key
Updated on April 10, 2024

Was this article helpful?

Related Articles