Tag Tracking API
Jan 1 2022 at 12:00 AM
This API processes and manages all RFID tag information by using the TagTracking service.
The TagTracking service is responsible for managing all RFID tag metadata and metadata history and processes tag data in real time as it is received from the RFID readers.
This service works in conjunction with EndpointData API, EntityTrigger API, EntityFunction API and Alarm API in order to execute actions based on the processed tag data.
A physical item in store will be tagged with an RFID tag of a certain state. This tag data is continually sent to the TagTracking service in order to process the tag information. If the tag state changes, this data will be updated within the TagTracking repository and actions could be executed based on the tag state.
For Example: An item might be tagged with a status of “in stock”, but once the item is purchased and scanned at the point of sale, the tag metadata is updated as “sold”, which allows it to then move past other readers without raising an alarm (as it would if it was stolen).
Prerequisites
- Create and set up a basic ad-hoc Tag Tracking service in Portal Service Management.
- Configure the input sources for the ad-hoc service by adding the collection endpoints on which tag data will be received.
APIs within Tag Tracking API
TagTracking
API Calls
GetTag
Permission
tags.tag:get
Accessible
Tenant only. See response and accessiblity information for more
URL
POST https://iotnxtinternal.commander.io/{accountId}/_apis/dapi/v1/TagTracking/GetTag
URL Params
partition={accountId}.{servicepartition}
e.g. .../TagTracking/GetTag?partition=b8fc75e6-5f23-4670-998a-70a5cc8cc3c2.ExampleParition
Data Params
- tagId: string
- timeStamp: DateTime (optional)
Example:
{
"tagId": "E280117001SS021501777B45",
"timeStamp": null
}
Success Response
{
"result": {
"TagId": "E280117001SS021501777B45",
"Timestamp": "2021-10-21T08:19:00.98Z",
"Metadata": {
"Order": "66"
},
"ExternalId": "TestExternalId"
},
"messageType": "OK",
"state": null,
"sourceMessageID": null
}
Refer to the API Response Types Success Response. See response and accessiblity information for more
Error Response
Response message with the following codes and HTMLs body formats. Refer to the API Response Types Error Response. See response and accessiblity information for more
Notes
None
GetTagHistory
Permission
ENTITIES_VIEWS_VIEW on viewId
Accessible
Tenant only. See response and accessiblity information for more
URL
POST https://iotnxtinternal.commander.io/{accountId}/_apis/dapi/v1/TagTracking/GetTagHistory
URL Params
partition={accountId}.{servicepartition}
e.g. .../TagTracking/GetTagHistory?partition=b8fc75e6-5f23-4670-998a-70a5cc8cc3c2.ExampleParition
Data Params
- tagId: string
- historyFrom: DateTime (optional)
- historyTo: DateTime (optional)
Example:
{
"tagId": "E280117001SS021501777B45",
"historyFrom": null,
"historyTo": null
}
Success Response
{
"result": [
{
"Timestamp": "2021-10-12T07:42:28Z",
"Metadata": {
"stockcode": "000APP-10S038497",
"description": "APP 20W USB PWR ADAP WHT",
"status": 3,
"imei": "",
"valuetrigger": 0,
"zoneid": "DEFAULT ZONE",
"boxid": "{1A759949-418E-44E5-8CBC-69592603D8BC}"
}
},
{
"Timestamp": "2021-10-21T08:19:00.98Z",
"Metadata": {
"Order": "66"
},
"ExternalId": "TestExternalId"
}
],
"messageType": "OK",
"state": null,
"sourceMessageID": null
}
Refer to the API Response Types Success Response. See response and accessiblity information for more
Error Response
Response message with the following codes and HTMLs body formats. Refer to the API Response Types Error Response. See response and accessiblity information for more
Notes
None
GetTagMetadataHistory
Permission
tags.metadata:get
Accessible
Tenant only. See response and accessiblity information for more
URL
POST https://iotnxtinternal.commander.io/{accountId}/_apis/dapi/v1/TagTracking/GetTagMetadataHistory
URL Params
partition={accountId}.{servicepartition}
e.g. .../TagTracking/GetTagMetadataHistory?partition=b8fc75e6-5f23-4670-998a-70a5cc8cc3c2.ExampleParition
Data Params
- tagId: string
- historyFrom: DateTime? (optional)
- historyTo: DateTime? (optional)
Example:
{
"tagId": "E280117001SS021501777B45",
"historyFrom": null,
"historyTo": null
}
Success Response
{
"result": [
{
"Id": "61653c67760441cbd4c0dee0",
"TagId": "E280117001SS021501777B45",
"Timestamp": "2021-10-12T07:42:28Z",
"Metadata": {
"stockcode": "000APP-S02S78497",
"description": "APP 20W USB PWR ADAP WHT",
"status": 3,
"imei": "",
"valuetrigger": 0,
"zoneid": "DEFAULT ZONE",
"boxid": "{1A759949-4144-44E5-8ADC-69592603D8BC}"
}
},
{
"Id": "61712274a744c34f09846272",
"TagId": "E280117001SS021501777B45",
"Timestamp": "2021-10-21T08:19:00.98Z",
"Metadata": {
"Order": "66"
},
"ExternalId": "TestExternalId"
}
],
"messageType": "OK",
"state": null,
"sourceMessageID": null
}
Refer to the API Response Types Success Response. See response and accessiblity information for more
Error Response
Response message with the following codes and HTMLs body formats. Refer to the API Response Types Error Response. See response and accessiblity information for more
Notes
None
GetTagMetadata
Permission
tags.metadata:get
Accessible
Tenant only. See response and accessiblity information for more
URL
POST https://iotnxtinternal.commander.io/{accountId}/_apis/dapi/v1/TagTracking/GetTagMetaData
URL Params
partition={accountId}.{servicepartition}
e.g. .../TagTracking/GetTagMetaData?partition=b8fc75e6-5f23-4670-998a-70a5cc8cc3c2.ExampleParition
Data Params
- tagId: string
- timeStamp: DateTime (optional)
Example:
{
"tagId": "E280117001SS021501777B45",
"timeStamp": null
}
Success Response
{
"result": {
"Order": "66"
},
"messageType": "OK",
"state": null,
"sourceMessageID": null
}
Refer to the API Response Types Success Response. See response and accessiblity information for more
Error Response
Response message with the following codes and HTMLs body formats. Refer to the API Response Types Error Response. See response and accessiblity information for more
Notes
None
GetTagsMetadata
Permission
tags.metadata:get
Accessible
Tenant only. See response and accessiblity information for more
URL
POST https://iotnxtinternal.commander.io/{accountId}/_apis/dapi/v1/TagTracking/GetTagsMetaData
URL Params
partition={accountId}.{servicepartition}
e.g. .../TagTracking/GetTagsMetaData?partition=b8fc75e6-5f23-4670-998a-70a5cc8cc3c2.ExampleParition
Data Params
- tagIds: string[]
- timeStamp: DateTime (optional)
Example:
{
"tagIds": ["E280117001SS021501777B45"],
"timeStamp": null
}
Success Response
{
"result": {
"E280117001SS021501777B45": {
"Order": "66"
}
},
"messageType": "OK",
"state": null,
"sourceMessageID": null
}
Refer to the API Response Types Success Response. See response and accessiblity information for more
Error Response
Response message with the following codes and HTMLs body formats. Refer to the API Response Types Error Response. See response and accessiblity information for more
Notes
None
GetTagMetadataByExternalId
Permission
tags.metadata:get
Accessible
Tenant only. See response and accessiblity information for more
URL
POST https://iotnxtinternal.commander.io/{accountId}/_apis/dapi/v1/TagTracking/GetTagMetadataByExternalId
URL Params
partition={accountId}.{servicepartition}
e.g. .../TagTracking/GetTagMetadataByExternalId?partition=b8fc75e6-5f23-4670-998a-70a5cc8cc3c2.ExampleParition
Data Params
- externalId: string
- timestamp: DateTime (optional)
- Defaults to current UTC time if not specified.
Example:
{
"externalId": "TestExternalId",
"timestamp": null
}
Success Response
{
"result": {
"Id": "617021972b5084282c86f4aa",
"TagId": "YourTagId",
"Timestamp": "2021-10-20T14:03:59Z",
"Metadata": {
"Order": "66"
},
"ExternalId": "TestExternalId"
},
"messageType": "OK",
"state": null,
"sourceMessageID": "5d37316188fa47d69bac896b4f4acece"
}
Refer to the API Response Types Success Response. See response and accessiblity information for more
Error Response
{
"result": null,
"messageType": "error",
"errorCode": 1,
"errorMessage": "",
"exceptionType": "",
"state": null,
"sourceMessageID": "063828e55f2c43189541787b6da2d856"
}
Refer to the API Response Types Error Response. See response and accessiblity information for more
Notes
Retrieves the tag’s latest metadata by its external identifier if no timestamp was specified (i.e. the timestamp parameter defaults to UTC now). If a timestamp was specified, the latest metadata older than the timestamp will be returned, if any.
SetTagMetadata
Permission
tags.metadata:add
Accessible
Tenant only. See response and accessiblity information for more
URL
POST https://iotnxtinternal.commander.io/{accountId}/_apis/dapi/v1/TagTracking/SetTagMetaData
URL Params
partition={accountId}.{servicepartition}
e.g. .../TagTracking/SetTagMetadata?partition=b8fc75e6-5f23-4670-998a-70a5cc8cc3c2.ExampleParition
Data Params
- tagId: string
- timestamp: DateTime (optional)
- Defaults to current UTC time if not specified.
- metadata: JObject
- externalId: string (optional)
Example:
{
"tagId": "E28011700000021501777B45",
"timestamp": null,
"metaData": {
"Order": "66"
},
"externalId": "TestExternalId",
}
Success Response
Response message with the following codes and JSON body formats. Refer to the API Response Types Success Response. See response and accessiblity information for more
Error Response
Response message with the following codes and HTMLs body formats. Refer to the API Response Types Error Response. See response and accessiblity information for more
Notes
None
SetTagsMetadata
Permission
tags.metadata:add
Accessible
Tenant only. See response and accessiblity information for more
URL
POST https://iotnxtinternal.commander.io/{accountId}/_apis/dapi/v1/TagTracking/SetTagsMetaData
URL Params
partition={accountId}.{servicepartition}
e.g. .../TagTracking/SetTagsMetadata?partition=b8fc75e6-5f23-4670-998a-70a5cc8cc3c2.ExampleParition
Data Params
- tagId: string
- timestamp: DateTime
- metaData: Dictionary<string, object>
- externalId: string (optional)
Example:
{
"tags": [
{
"tagId": "",
"timestamp": "2001-01-01T01:00:00.000Z",
"metaData": {
"Make": "Iphone",
"Model": "8",
"Serial Number": "SN-A8",
"Color": "Pink",
"ZONE_CATEGORY ": "Shop A1",
"Purchased": "false"
},
"externalId": "" // optional
}
]
}
Success Response
Response message with the following codes and JSON body formats. Refer to the API Response Types Success Response. See response and accessiblity information for more
Error Response
Response message with the following codes and HTMLs body formats. Refer to the API Response Types Error Response. See response and accessiblity information for more
Notes
None
GetAllTags
Permission
tags.tag:get
Accessible
Tenant only. See response and accessiblity information for more
URL
POST https://iotnxtinternal.commander.io/{accountId}/_apis/dapi/v1/TagTracking/GetAllTags
URL Params
None
Data Params
Example:
{
"timeStamp": "DateTime"
}
- timeStamp: DateTime (optional)
Success Response
Response message with the following codes and JSON body formats. Refer to the API Response Types Success Response. See response and accessiblity information for more
Error Response
Response message with the following codes and HTMLs body formats. Refer to the API Response Types Error Response. See response and accessiblity information for more
Notes
None
GetNextMetadata
Permission
tags.metadata:get
Accessible
Tenant only. See response and accessiblity information for more
URL
POST https://iotnxtinternal.commander.io/{accountId}/_apis/dapi/v1/TagTracking/GetNextMetadata
URL Params
partition={accountId}.{servicepartition}
e.g. .../TagTracking/GetNextMetadata?partition=b8fc75e6-5f23-4670-998a-70a5cc8cc3c2.ExampleParition
Data Params
objectId: string
limit: int
Example:
{
"objectId": "61653c67760441cbd4c0dee0",
"limit": 10
}
Success Response
{
"result": [
{
"Id": "61712274a744c34f09846272",
"TagId": "E280117001SS021501777B45",
"Timestamp": "2021-10-21T08:19:00.98Z",
"Metadata": {
"Order": "66"
},
"ExternalId": "TestExternalId"
}
],
"messageType": "OK",
"state": null,
"sourceMessageID": null
}
Refer to the API Response Types Success Response. See response and accessiblity information for more
Error Response
Response message with the following codes and HTMLs body formats. Refer to the API Response Types Error Response. See response and accessiblity information for more
Notes
None
GetNextTagMovements
Permission
tags.tag:get
Accessible
Tenant only. See response and accessiblity information for more
URL
POST https://iotnxtinternal.commander.io/{accountId}/_apis/dapi/v1/TagTracking/GetNextTagMovements
URL Params
None
Data Params
Example:
{
"reference": "string"
"limit":1000
}
reference: string
limit: int? (optional)
Success Response
Response message with the following codes and JSON body formats. Refer to the API Response Types Success Response. See response and accessiblity information for more
Error Response
Response message with the following codes and HTMLs body formats. Refer to the API Response Types Error Response. See response and accessiblity information for more
Notes
None