User entities are created simultaneously with the client's account. When the partner creates accounts, they are initially created as inactive.
To activate the account, partner sends a special activation link to their client. The link format is as follows:
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 client will receive a registration confirmation email at the provided address. By following the link in the email, client completes the registration process by entering the requested information in the form (which could include password, login key, etc.).
Once the client confirms registration, their account is activated, and the activation date and time are recorded in the ack field. After that, they will be able to log into the application using the email and password that they entered during registration.
Retrieves a list of all or filtered users associated with the partner's account.
GET /partner/users
Example of success response:
{
"data": [
{
"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/Petovik accounts.
PATCH /partner/users/{id}
Request example:
curl -X 'PATCH' \ 'https://api.gps-trace.com/partner/users/1a2b3c4d567890' \
-H 'accept: application/json' \
-H 'X-AccessToken: <your token>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Test_user",
"description": "test description",
"login_key": "123456",
"lang": "es"
}'
Example of success response:
{
"data": {
"id": "1a2b3c4d567890",
"account_id":111111,
"name": "Test_user",
"description": "test description",
"login_key": null,
"lang": "es"
}
}
This endpoint enables a partner to change the password of a client's Forguard account to a new one.
PUT /partner/users/{id}/password
Where
The mandatory fields for this request are the following:
Request example:
curl -X 'PUT' \
'https://api.gps-trace.com/partner/users/136e9ХХХХХХa4342a/password' \
-H 'accept: application/json' \
-H 'X-AccessToken: <your token>' \
-H 'Content-Type: application/json' \
-d '{
"new_password": "12345678",
"repeat_password": "12345678"
}'
200 Response example:
{
"data": {
"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 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 partner for comprehensive account configuration and technical work.
The service_as_user token allows the partner to see all application features just as the client does.
On the other hand, Ruhavik and Petovik accounts have specific rules and limitations for partner access.
For activated Ruhavik/Petovik 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/Petovik accounts.
Currently, obtaining a token for an inactive Ruhavik/Petovik account is not possible.
PUT /partner/users/{id}/appToken/{app_id}
Where:
Request example:
curl -X 'GET' \ 'https://api.gps-trace.com/partner/users/13XXXXXXX4342a/appToken/b901da51-ce00-4af2-b978-8d0fca8ae1ea?token_type=service' \
-H 'accept: application/json' \
-H 'X-AccessToken: <your token>'
200 Response example:
{
"data": {
"id": number,
"account_id": number,
"expire": 0,
"info": {
"prefix": "service",
"type": "fleet",
"user_id": "13XXXXXXX4342a",
"app_id": "b901da51-ce00-4af2-b978-8d0fca8ae1ea"
},
"key": "<generated token>",
"ttl": 3600,
"url": "https://forguard.gurtam.space/auth/login/token/<generated token>"
}
}