User entities are created simultaneously with the client's account. When the service provider creates accounts, they are initially created as inactive.
There are two ways to activate Forguard and Tags accounts:
The service provider can activate a Forguard or Tags account directly using the following method:
PUT /provider/accounts/{id}/activate
In this case the account is activated on the provider's side without additional actions from the client.
Alternatively, the service provider can send a special activation link to their client. The link format is the following:
https://login.gurtam.space/registration/acknowledgment?
client_id=00010000000000000500&login=test_user_name&login_key=1123456
Where:
Upon clicking the activation link, the client enters their unique email address (to be associated with the account) and a password. Then the client will receive a registration confirmation email at the provided address.
By following the link in the email, the client completes the registration process by entering the requested information in the form (which could include password, login key, etc.).
Once the account is activated (by either method), the activation date and time are recorded in the 'ack' field. After that, the client will be able to log in to the application using the email and password that they entered during registration.
Retrieves a list of all or filtered users associated with the service provider's account.
GET /provider/users
Example of success response:
[
{
"id": "string",
"account_id": number,
"name": "string",
"email": "string",
"description": "string",
"login_key": "string",
"lang": "string"
},
...
]
This method allows you to update the following user details:
Also it is important to notice that changes to user data are not available for activated Ruhavik accounts.
PATCH /provider/users/{id}
Request example:
curl -X 'PATCH' \
'https://api.gps-trace.com/provider/users/1a2b3c4d567890' \
-H 'accept: application/json' \
-H 'X-AccessToken: ' \
-H 'Content-Type: application/json' \
-d '{
"name": "Test_user",
"description": "test description",
"login_key": "123456",
"lang": "es"
}'
Example of success response:
{
"id": "1a2b3c4d567890",
"account_id":111111,
"name": "Test_user",
"description": "test description",
"login_key": null,
"lang": "es"
}
This endpoint enables a service provider to set or change the password of a client's Forguard or Tags account to a new one.
PUT /provider/users/{id}/password
Where
The mandatory fields for this request are the following:
Request example:
curl -X 'PUT' \
'https://api.gps-trace.com/provider/users/136e9ХХХХХХa4342a/password' \
-H 'accept: application/json' \
-H 'X-AccessToken: ' \
-H 'Content-Type: application/json' \
-d '{
"new_password": "12345678",
"repeat_password": "12345678"
}'
200 Response example:
{
"id": "136e9ХХХХХХa4342a",
"account_id": number,
"enabled": true,
"name": "string ",
"email": "string",
"description": "test description",
"login_key": null,
"lang": "es"
}
This endpoint is utilized for token generation and facilitates access to client's accounts in case of any issues.
For Forguard, Tags accounts, two types of tokens can be used for entering a client's account for maintenance work: service and service_as_user.
When using the service token, all hidden elements or features from the client are visible to the dealer for comprehensive account configuration and technical work.
The service_as_user token allows the service provider to see all application features just as the client does.
On the other hand, Ruhavik accounts have specific rules and limitations for service provider access.
For activated Ruhavik accounts, obtaining the service token (by default) is only possible when the service mode is enabled by the client. If the service mode is disabled by the client, the session will be terminated. The service_as_user token is not relevant for Ruhavik accounts.
Currently, obtaining a token for an inactive Ruhavik account is not possible.
PUT /provider/users/{id}/appToken/{app_id}
Where:
Request example:
curl -X 'GET' \
'https://api.gps-trace.com/provider/users/13XXXXXXX4342a/appToken/
b901da51-ce00-4af2-b978-8d0fca8ae1ea?token_type=service' \
-H 'accept: application/json' \
-H 'X-AccessToken: '
200 Response example:
{
"id": number,
"account_id": number,
"expire": 0,
"info": {
"prefix": "service",
"type": "fleet",
"user_id": "13XXXXXXX4342a",
"app_id": "b901da51-ce00-4af2-b978-8d0fca8ae1ea"
},
"key": "",
"ttl": 3600,
"url": "https://forguard.gurtam.space/auth/login/token/"
}