Info

Created 29-03-2021 by Lavinia Gheghea

Revision



Description

The API allows you to create, delete, and update  TAG reader. You can retrieve individual TAG reader as well as a list of all TAG readers

Endpoints


GET:  /tagreaders


Parameters
Headers and Query
 Name
 Description
 Type
 API-key - required
 Authorization Token
 String(64)
 UID - required
 UID -how can be obtained
 String
 DEVICEID - required
  DEVICEID
 String
 offset
 starting record
 Integer
 limit
 how many records displayed on a page
 Integer
 OrderFieldName
 field name to order the recordset
 String
 OrderDirection
 ASC or DESC
 String
 Filter
 filter the recordset
 String

Curl example

curl -X GET "https://smartapi.smarttid.dk/tagreaders" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response

200 (OK) :  array of tag readers

Response body

{ "ID": 1, "DeviceID": "6cf6dd84bfcf200e", "Description": "Asbjørn Nexus tablet", "Type": "Tablet", "DistrictCode": null, "DepartmentCode": null, "EmployeeGroupCode": null, "DimensionCode1": null, "DimensionCode2": null, "DimensionCode3": null, "DimensionCode4": null, "DimensionCode5": null, "DimensionCode6": null, "DimensionCode7": null, "DimensionCode8": null, "DimensionCode9": null, "DimensionCode10": null, "TaskID": null, "TimeZoneDiffMin": 0, "JobCode": null, "JobGroupCode": null, "OperationCode": null, "OperationGroupCode": null, "ActivityCode": null, "DisplayOnlyFromThisUnit": false, "MenuButtonSize": "200,125", "MenuButtonIconSize": "60,60", "JournalCode": null, "LanguageCode": "DK", "UseOnlyTAG": null }, { "ID": 2, "DeviceID": "d693fa9bb9e32498", "Description": "poul", "Type": "Tablet", "DistrictCode": null, "DepartmentCode": null, "EmployeeGroupCode": null, "DimensionCode1": null, "DimensionCode2": null, "DimensionCode3": null, "DimensionCode4": null, "DimensionCode5": null, "DimensionCode6": null, "DimensionCode7": null, "DimensionCode8": null, "DimensionCode9": null, "DimensionCode10": null, "TaskID": null, "TimeZoneDiffMin": 0, "JobCode": null, "JobGroupCode": null, "OperationCode": null, "OperationGroupCode": null, "ActivityCode": null, "DisplayOnlyFromThisUnit": false, "MenuButtonSize": "200,125", "MenuButtonIconSize": "60,60", "JournalCode": null, "LanguageCode": "DK", "UseOnlyTAG": null } ]


Response headers:
content-encoding: gzip 
 content-length: 238 
 content-type: application/json; charset=utf-8 
 date: Mon, 24 Aug 2020 08:01:23 GMT 
 server: Microsoft-IIS/10.0 
 vary: Accept-Encoding 
 x-pagination: {"totalCount":4,"totalFiltered":4,"Offset":0,"Limit":4,"Returned":4} 
 x-powered-by: ASP.NET 

400 (ERROR) : Error message

Response Body
Error message


GET{id} : /tagreaders/{id}  


Parameters
 Name
 Description
 Type
 API-key - required
 Authorization Token
 String(64)
 UID - required
UID -how can be obtained
 String
 DEVICEID - required
  DEVICEID
 String
 id- required
 ID of tag reader
 Integer
Curl example

curl -X GET "https://smartapi.smarttid.dk/tagreaders/id" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response

200 (OK) : the TAG reader

Response Body
[   { "ID": 2, "DeviceID": "d693fa9bb9e32498", "Description": "poul", "Type": "Tablet", "DistrictCode": null, "DepartmentCode": null, "EmployeeGroupCode": null, "DimensionCode1": null, "DimensionCode2": null, "DimensionCode3": null, "DimensionCode4": null, "DimensionCode5": null, "DimensionCode6": null, "DimensionCode7": null, "DimensionCode8": null, "DimensionCode9": null, "DimensionCode10": null, "TaskID": null, "TimeZoneDiffMin": 0, "JobCode": null, "JobGroupCode": null, "OperationCode": null, "OperationGroupCode": null, "ActivityCode": null, "DisplayOnlyFromThisUnit": false, "MenuButtonSize": "200,125", "MenuButtonIconSize": "60,60", "JournalCode": null, "LanguageCode": "DK", "UseOnlyTAG": null }
]

Response Headers
content-encoding: gzip
  content-length: 175
  content-type: application/json; charset=utf-8 
 date: Mon, 24 Aug 2020 08:39:57 GMT 
 server: Microsoft-IIS/10.0 
 vary: Accept-Encoding  x-powered-by: ASP.NET 

400 (ERROR) : Error message

Response Body
Error message


POST: /tagreaders


Parameters
 Name
 Description
 Type
 API-key - required
 Authorization Token 
 String(64)
 UID - required
 UID -how can be obtained
 String
 DEVICEID - required
  DEVICEID
 String

Request body
{
"sDeviceID": "string",
  "sDescription": "string",
  "sType": "string",
  "sDistrictCode": "string",
  "sDepartmentCode": "string",
  "sEmployeeGroupCode": "string",
  "sDimensionCode1": "string",
  "sDimensionCode2": "string",
  "sDimensionCode3": "string",
  "sDimensionCode4": "string",
  "sDimensionCode5": "string",
  "sDimensionCode6": "string",
  "sDimensionCode7": "string",
  "sDimensionCode8": "string",
  "sDimensionCode9": "string",
  "sDimensionCode10": "string",
  "nTaskID": 0,
  "nTimeZoneDiffMin": 0,
  "sJobCode": "string",
  "sJobGroupCode": "string",
  "sOperationCode": "string",
  "sOperationGroupCode": "string",
  "sActivityCode": "string",
  "bDisplayOnlyFromThisUnit": true,
  "sMenuButtonSize": "string",
  "sMenuButtonIconSize": "string",
  "sJournalCode": "string",
  "sLanguageCode": "string",
  "bUseOnlyTAG": true
}
Curl example
curl -X POST "https://smartapi.smarttid.dk/tagreaders" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "Content-Type: application/json-patch+json" -d "{\"sDeviceID\": \"string\",  \"sDescription\": \"string\",  \"sType\": \"string\",  \"sDistrictCode\": \"string\",  \"sDepartmentCode\": \"string\",  \"sEmployeeGroupCode\": \"string\",  \"sDimensionCode1\": \"string\",  \"sDimensionCode2\": \"string\",  \"sDimensionCode3\": \"string\",  \"sDimensionCode4\": \"string\", \"sDimensionCode5\": \"string\",  \"sDimensionCode6\": \"string\",  \"sDimensionCode7\": \"string\",  \"sDimensionCode8\": \"string\",  \"sDimensionCode9\": \"string\",  \"sDimensionCode10\": \"string\",  \"nTaskID\": 0,  \"nTimeZoneDiffMin\": 0,  \"sJobCode\": \"string\",  \"sJobGroupCode\": \"string\",  \"sOperationCode\": \"string\",  \"sOperationGroupCode\": \"string\",  \"sActivityCode\": \"string\",  \"bDisplayOnlyFromThisUnit\": true,  \"sMenuButtonSize\": "string",  \"sMenuButtonIconSize\": \"string\",  \"sJournalCode\": \"string\", \"sLanguageCode\": \"string\",  \"bUseOnlyTAG\": true}"

Response

200 (OK) : The ID of the new tag reader

Response Body
[
 {
  "ID": 14
  }
]
Response Headers
content-encoding: gzip 
 content-length: 138 
 content-type: application/json; charset=utf-8 
 date: Mon, 24 Aug 2020 09:24:44 GMT 
 server: Microsoft-IIS/10.0 
 vary: Accept-Encoding  x-powered-by: ASP.NET

400 (ERROR) : Error message

Response Body
Error message


PUT{id}: /tagreaders/{id}


Parameters
 Name
 Description
 Type
 API-key - required
 Authorization Token  
 String(64)
 UID - required
 UID -how can be obtained
 String
 DEVICEID - required
  DEVICEID
 String
 id- required
 ID of tag reader
 Integer

Request body
{
"sDeviceID": "string",
  "sDescription": "string",
  "sType": "string",
  "sDistrictCode": "string",
  "sDepartmentCode": "string",
  "sEmployeeGroupCode": "string",
  "sDimensionCode1": "string",
  "sDimensionCode2": "string",
  "sDimensionCode3": "string",
  "sDimensionCode4": "string",
  "sDimensionCode5": "string",
  "sDimensionCode6": "string",
  "sDimensionCode7": "string",
  "sDimensionCode8": "string",
  "sDimensionCode9": "string",
  "sDimensionCode10": "string",
  "nTaskID": 0,
  "nTimeZoneDiffMin": 0,
  "sJobCode": "string",
  "sJobGroupCode": "string",
  "sOperationCode": "string",
  "sOperationGroupCode": "string",
  "sActivityCode": "string",
  "bDisplayOnlyFromThisUnit": true,
  "sMenuButtonSize": "string",
  "sMenuButtonIconSize": "string",
  "sJournalCode": "string",
  "sLanguageCode": "string",
  "bUseOnlyTAG": true
}
Curl example

curl -X PUT "https://smartapi.smarttid.dk/tagreaders/id" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "Content-Type: application/json-patch+json" -d "{\"sDeviceID\": \"string\",  \"sDescription\": \"string\",  \"sType\": \"string\",  \"sDistrictCode\": \"string\",  \"sDepartmentCode\": \"string\",  \"sEmployeeGroupCode\": \"string\",  \"sDimensionCode1\": \"string\",  \"sDimensionCode2\": \"string\",  \"sDimensionCode3\": \"string\",  \"sDimensionCode4\": \"string\", \"sDimensionCode5\": \"string\",  \"sDimensionCode6\": \"string\",  \"sDimensionCode7\": \"string\",  \"sDimensionCode8\": \"string\",  \"sDimensionCode9\": \"string\",  \"sDimensionCode10\": \"string\",  \"nTaskID\": 0,  \"nTimeZoneDiffMin\": 0,  \"sJobCode\": \"string\",  \"sJobGroupCode\": \"string\",  \"sOperationCode\": \"string\",  \"sOperationGroupCode\": \"string\",  \"sActivityCode\": \"string\",  \"bDisplayOnlyFromThisUnit\": true,  \"sMenuButtonSize\": "string",  \"sMenuButtonIconSize\": \"string\",  \"sJournalCode\": \"string\", \"sLanguageCode\": \"string\",  \"bUseOnlyTAG\": true}"

Response

200 (OK) : success

400 (ERROR) : Error message

Response Body
Error message


DELETE{id}: /tagreaders/{id}


Parameters
 Name
 Description
 Type
 API-key - required
 Authorization Token  
 String(64)
 UID - required
 UID -how can be obtained
 String
 DEVICEID - required
  DEVICEID
 String
 id- required
 ID of tag reader
 Integer

Curl example

curl -X DELETE "https://smartapi.smarttid.dk/tagreaders/id" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 

Response
200 (OK) :Success


400 (ERROR) : Bad request

Response Body
Error message

Response headers

content-length: 84 
 content-type: text/plain; charset=utf-8 
 date: Tue, 25 Aug 2020 08:35:21 GMT 
 server: Microsoft-IIS/10.0 
 x-powered-by: ASP.NET


SQL Procedure 

sp_TAGReader

Object

TAG Reader
 Name
 Description
 Type
sDeviceID
 Device ID
 String
sDescription
 Description
 String
 sType
 Type
 String
 sDistrictCode
 District Code
String
 sDepartmentCode
 Department Code
 String
 sEmployeeGroupCode
 Employee Group Code
 String
 sDimensionCode1
 Dimension Code 1
 String
  sDimensionCode2
 Dimension Code 2
 String 
  sDimensionCode3
 Dimension Code 3
 String
  sDimensionCode4
 Dimension Code 4
 String 
  sDimensionCode5
 Dimension Code 5
 String 
  sDimensionCode6
 Dimension Code 6
 String 
  sDimensionCode7
 Dimension Code 7
 String 
  sDimensionCode8
 Dimension Code 8
 String 
  sDimensionCode9
 Dimension Code 9
 String 
  sDimensionCode10
 Dimension Code 10
 String
 nTaskID
 Task ID
 Number(integer)
 nTimeZoneDiffMin
 Time Zone Diff Min
 Number(integer)
 sJobCode
 Job Code
 string
 sJobGroupCode
 Job Group Code
 String
 sOperationCode
 Operation Code
 String
 sOperationGroupCode
 Operation Group Code
 String
 sActivityCode
 Activity Code
 String
 bDisplayOnlyFromThisUnit
 Display Only From This Unit
 Bool
 sMenuButtonSize
 Menu Button Size
 String
 sMenuButtonIconSize
 Menu Button Icon Size
 String
 sJournalCode
 Journal Code
 String
 sLanguageCode
 Language Code
 String
 bUseOnlyTAG
 Use Only TAG
 bool