Fleet - Auth

Login

Below APIs are used to generate token and get authentication with fleet portal

Use API to log in VisionMax fleet portal, email address and password are required.

Please be noticed, The access token of fleet and master account are separated

Therefor you can't access Master endpoints with Fleet access token, and vice versa.

When the user's email has access to two or more fleets, a list of available fleets will be returned.

Securityapi key
Request
Request Body schema:
email
required
string <email> non-empty
password
required
string >= 6 characters
type
required
string non-empty

Login type, fixed value: email

udid
string or null

A randomly generated string, preferably using UUIDv4 but not limited to UUIDv4.

This is UI-related. The system uses this unique string to track and store preferences; therefore, you can omit it or leave it empty if the client is not related to the UI.

Responses
200

OK

post/V2/auth
Request samples
{
  • "email": "user@example.com",
  • "password": "string",
  • "type": "email",
  • "udid": ""
}
Response samples
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}

Log out

Securityapi key and Authorization
Responses
200

OK

get/logout

Token verify

Securityapi key and Authorization
Responses
200

OK

get/V2/auth/token-verify

Token switch

This API uses the token from your login to exchange for the token of the specific fleet you want to obtain and gives you the ability to roam in fleets

The token used to exchange will revoked since it was used to obtain a new one.

If the fleet_id is empty or does not exist, the token will not be exchanged, and only the list of available fleets will be returned.

Securityapi key and Authorization
Request
Request Body schema: multipart/form-data
fleet_id
integer <int32>

ID of fleet.

Responses
200

OK

post/V2/auth/token-switch
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}