Methods in this section are related to Forguard and Tags solution.
The specificity of Forguard and Tags accounts lies in assigning a client plan upon creation, wherein service providers (dealers) determine the available account limits and control specific application features/modules when creating a client plan.
The client plan, in turn, is built upon partner plans offered by the GPS-Trace platform.
Client plans consist of two sections:
Quotas include limits on unit quantity per account, geofence quantity, and maximum data storage limit.
Forguard quotas:
"quotas": {
"unit": number,
"geofence": number,
"unit_storage": number
}
Tags quotas:
"quotas": {
"sensor": number,
"gateway": number,
"asset": number,
"geofence": number,
"unit_storage": number
}
Modules are specific features or functionalities within the Forguard and Tags applications that service providers can choose to enable or disable in a client plan for a client account at their discretion.
Available modules in Forguard:
Available modules in Tags:
Service providers use a partner plan to create a client plan, adjusting the limits based on the partner plan.
For instance, if a partner plan has a 10 units limit per account, the service provider can set a lower value but not exceed 10 units in the client plan.
Scheme for creating a Forguard account:
This API endpoint allows for the creation of a client plan, which is used in the process of creating Forguard or Tags accounts.
POST /provider/client-plans
The mandatory fields for this request:
GET /billing/managed-plans method.Available modules in Forguard:
Available modules in Tags:
Request body example:
curl -X 'POST' \
'https://api.gps-trace.com/provider/client-plans' \
-H 'accept: application/json' \
-H 'X-AccessToken: ' \
-H 'Content-Type: application/json' \
-d '{"name": "Client Plan",
"description": "Client plan description",
"quotas": {
"unit": 30,
"geofence": 50,
"unit_storage": 204800},
"modules": [
"command",
"google_maps",
"geofence",
"statistics",
"tools",
"extended_notification",
"unit_event",
"sharing",
"timeline",
"notification",
"maintenance",
"service_mode"
],
"managed_plan_id": "string",
"app_id": "b901da51-ce00-4af2-b978-8d0fca8ae1ea"
}'
Modules 'account', 'unit', and 'fuel' are always enabled by default in Forguard accounts. They can only be seen in the response to the request.
Modules 'account', 'unit', 'label', 'timeline' and 'unit_event' are always enabled by default in Tags accounts.
201 Response example:
{
"quotas": {
"unit": 30,
"geofence": 50,
"unit_storage": 204800
},
"creator_id": number,
"app_id": "b901da51-ce00-4af2-b978-8d0fca8ae1ea",
"updated_at": number,
"description": "Client plan description",
"managed_plan_id": "string",
"modules": [
"notification",
"command",
"account",
"geofence",
"service_mode",
"sharing",
"unit_event",
"timeline",
"statistics",
"extended_notification",
"maintenance",
"tools",
"unit",
"google_maps"
],
"client_payment_lifecycle": null,
"name": "Client Plan",
"created_at": number,
"id": "string"
}
This API endpoint allows for the set client billing automation for a client plan, which is used in the process of managed clients payments.
The client billing automation parameters can be obtained using the GET /billing/managed-plans
PATCH /provider/client-plans/{client plan id}/payment-lifecycle
The mandatory fields for this request:
Request body example:
curl -X 'POST' \
'https://api.gps-trace.com/provider/client-plans/xxxxxxx/payment-lifecycle' \
-H 'accept: application/json' \
-H 'X-AccessToken: ' \
-H 'Content-Type: application/json' \
-d '{
"payment_notify_offset": 5,
"block_offset": 5,
"payment_period": null
}
201 Response example:
{
"quotas": {
"unit": 30,
"geofence": 50,
"unit_storage": 204800
},
"creator_id": number,
"app_id": "b901da51-ce00-4af2-b978-8d0fca8ae1ea",
"updated_at": number,
"description": "Client plan description",
"managed_plan_id": "string",
"modules": [
"notification",
"command",
"account",
"geofence",
"service_mode",
"sharing",
"unit_event",
"timeline",
"statistics",
"extended_notification",
"maintenance",
"tools",
"unit",
"google_maps"
],
"name": "Client Plan",
"created_at": number,
"id": "string",
"client_payment_lifecycle": {
"payment_period": null,
"payment_notify_offset": 5,
"block_offset": 5
}
}
This API endpoint allows you to obtain a list of created client plans.
GET /provider/client-plans
200 Response example:
[
{
"id": "string",
"quotas": {
"unit": 20,
"geofence": 0,
"unit_storage": 10240
},
"name": "Test",
"creator_id": number,
"app_id": "b901da51-ce00-4af2-b978-8d0fca8ae1ea",
"managed_plan_id": "string",
"updated_at": number,
"description": null,
"created_at": number,
"modules": [
"service_mode",
"account",
"unit"
],
"client_payment_lifecycle": {
"payment_period": null,
"payment_notify_offset": 5,
"block_offset": 5
}
},
{
"id": "string",
"quotas": {
"unit": 10,
"unit_storage": 102400,
"geofence": 50
},
"name": "Test2",
"creator_id": number,
"app_id": "b901da51-ce00-4af2-b978-8d0fca8ae1ea",
"managed_plan_id": "string",
"updated_at": number,
"description": null,
"created_at": number,
"modules": [
"tools",
"unit_event",
"command",
"google_maps",
"statistics",
"unit",
"maintenance",
"service_mode",
"notification",
"account",
"extended_notification",
"sharing",
"timeline",
"fuel",
"geofence"
],
"client_payment_lifecycle": null
}
]
The response includes information about client plans available, with each plan represented by an object containing the following fields:
Available modules in Forguard:
Available modules in Tags:
This API endpoint allows you to get information about a specific client plan by its ID.
GET /provider/client-plans/{id}
200 Response example:
{
"id": "string",
"quotas": {
"unit": 20,
"geofence": 0,
"unit_storage": 10240
},
"name": "Test",
"creator_id": number,
"app_id": "b901da51-ce00-4af2-b978-8d0fca8ae1ea",
"managed_plan_id": "string",
"updated_at": number,
"description": null,
"created_at": number,
"modules": [
"service_mode",
"account",
"unit"
],
"client_payment_lifecycle": {
"payment_period": null,
"payment_notify_offset": 5,
"block_offset": 5
}
}
This API endpoint allows you to delete client plan by its ID.
DELETE /provider/client-plans/{id}
Upon successful deletion, a response with status code 200 will be returned, along with the ID of the client plan that was removed.
200 Response example:
"string"
This endpoint allows to retrieve information about the modules used in creating client plans.
GET /provider/client-plans/modules
Creating Forguard account requires assigning a client plan to it. Client plans are made based on partner plans provided by the GPS-Trace platform.
Partner plans consist of two main parts:
Example of limits:
"limits": {
"geofence": {
"default": 35,
"max": 70,
"min": 0,
"step": 1
},
"unit": {
"default": 35,
"max": 70,
"min": 1,
"step": 1
},
"unit_storage": {
"default": 102400,
"max": 204800,
"min": 10240,
"step": 10240
}
}
Available modules in Forguard:
Available modules in Tags:
Client plans based on partner plans and include specific quotas and modules. Quotas for geofences, units, and data storage volume are set during client plan creation, within the limits of the partner plan. Service providers can activate or deactivate modules available in the partner plan.
For instance, a service provider might select a partner plan allowing 70 units, create a client plan based on it, set a 50-unit limit, and apply this plan to a Forguard account for the client to track up to 50 units.
Modules 'account', 'unit', and 'fuel' are always enabled by default in Forguard accounts. They can only be seen in the response to the request. Modules 'account', 'unit', 'label', 'timeline' and 'unit_event' are always enabled by default in Tags accounts.
200 Response example:
[
{
"default_included": false,
"name": "tools",
"hidden": false,
"required": false,
"depended_on": [],
"default_access": 15,
"access_list": [ 15 ]
},
{
"default_included": false,
"name": "service_mode",
"hidden": false,
"required": false,
"depended_on": [],
"default_access": 15,
"access_list": [ 15 ]
},
...
]