Tags for period

ACTIVATE TAG

Method is used for activation of tag. All new trips that will be received from a virtual device, will be marked with this tag until its deactivation.

URL: https://mobilesdk.telematicssdk.com/mobilesdk/incoming/tags/activate HTTP METHOD: POST HEADERS: DeviceToken: 194df5b4-5322-43f5-bea7-16d85debfd00 REQUEST BODY: Tag: tag name. String. All symbols and spaces allowed. Value is required. Type: type of tag. Now only “SDK” and “UserApp” are supported. Value is required. Source: ID of tag activation source. String. Optional value. ActivationTime: ISO 8601 with time-zone. Optional value. If empty, the server value will be used.

Example request body

{
"Tag": "Sample Tag 1",
"Type": "SDK",
"Source": "",
"ActivationTime": "2019-11-22T14:19:36+03:00"
}

RESPONSE: Success

{
"Result": {
"Code": 200
}
}

Error

{
"Error": {
"Code": 400
}
}

NOTE: If you try to activate the previously activated tag, the error will be returned. Activation of already active tag is not allowed.

DEACTIVATE TAG

Method is used for deactivation of tag, that is used for marking the trips received from a virtual device.

URL: https://mobilesdk.telematicssdk.com/mobilesdk/incoming/tags/deactivate HTTP METHOD: POST HEADERS: DeviceToken: 194df5b4-5322-43f5-bea7-16d85debfd00 REQUEST BODY: Tag: tag name. String. All symbols and spaces allowed. Value is required. Type: type of tag. Now only “SDK” and “UserApp” are supported. Value is required. Source: ID of tag activation source. String. Optional value. DeactivationTime: ISO 8601 with time-zone. Optional value. If empty, the server value will be used.

Example request body

{
"Tag": "Sample Tag 1",
"Type": "SDK",
"Source": "",
"DeactivationTime": "2019-11-22T14:19:36+03:00"
}

RESPONSE: Success

{
"Result": {
"Code": 200
}
}

Error

{
"Error": {
"Code": 400
}
}

NOTE: If you try to deactivate the non-active tag, the error will be returned.

GET ACTIVE TAGS

Method will be used for receiving the list of active tags on the specified date.

URL: https://mobilesdk.telematicssdk.com/mobilesdk/incoming/tags/get/{utc_unixtimestamp} HTTP METHOD: GET HEADERS: DeviceToken: 194df5b4-5322-43f5-bea7-16d85debfd00 REQUEST: {utc_unixtimestamp} - UTC in UNIX timestamp, when a moment of active tags. Optional. If not specified - the current time will be used. Example: 1574424517

RESPONSE: Success

{
"Result": {
[
{
"Tag": "Sample tag 1",
"Type": "SDK",
"Source": "",
"ActivationTime": "2019-11-22T14:19:36+03:00",
"IsServerActivationTime": true
},
{
"Tag": "Sample tag 2",
"Type": "SDK",
"Source": "",
"ActivationTime": "2019-11-21T12:15:00-04:00",
"IsServerActivationTime": false
}
],
"Code": 200
}

Tag: tag name. String. All symbols and spaces allowed. Value is required. Type: type of tag. Now only “SDK” and “UserApp” are supported. Value is required. Source: ID of tag activation source. String. Optional value. ActivationTime: ISO 8601 with time-zone. Optional value. If empty, the server name will be used. IsServerActivationTime: logic value. True - if the server value was used. False - if the user value was used.

Error

{
"Error": {
"Code": 400
}
}