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
- Contact Last Mile Solutions: LMS will create a System User Account dedicated to the token API access.
- 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}
Method | Description |
---|---|
GET | Retrieve list or details with /{tokenId} from a Token |
POST | Create a new token attached to a customer |
PUT | Create a new token using /{tokenId} |
PATCH | Update a token using /{tokenId} |
Example headers structure (identical for both):
Key | Value |
---|---|
accept | application/json |
X-Request-ID | (int) Generated ID example, 12345 |
x-api-version | 1.1.1 |
Authorization | Token { authentication_token } |
Example response on get all tokens – GET to URL: https://evc-net.com/api/rest/token
Field | Value | Data Type |
---|---|---|
id | 1555888899 | Integer |
usergroupId | 999 | Integer |
type | Rfid | String |
internalId | 044597896 | String |
externalId | 044597896 | String |
emi3Id | NLLMSC2044597896 | String |
tokenIssuerId | 01 | Integer |
creationDate | 2022-07-15T08:30:00Z | String |
lastUpdateDate | 2023-11-28T14:45:00Z | String |
expiryDate | 2024-12-31T23:59:59Z | String |
roaming | true | Boolean |
status | Active | String |
ownerPerson | (object) | Object |
Example response on get token detail – GET to URL: https://evc-net.com/api/rest/token/{tokenId}
Field | Value | Data Type |
---|---|---|
id | 1555888899 | Integer |
usergroupId | 999 | Integer |
type | Rfid | String |
internalId | 044597896 | String |
externalId | 044597896 | String |
emi3Id | NLLMSC2044597896 | String |
tokenIssuerId | 01 | Integer |
creationDate | 2022-07-15T08:30:00Z | String |
lastUpdateDate | 2023-11-28T14:45:00Z | String |
expiryDate | 2024-12-31T23:59:59Z | String |
roaming | true | Boolean |
status | Active | String |
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 Code | Message |
---|---|
200 | Success response |
400 | Generic error (check response data field) |
403 | Incorrect API key |