Info

Created 05-10-2020 by Lavinia Gheghea

Revision



Description

The API allows you to view counter totals for a date and also to calculate counter totals for an employee on a date

Endpoints


GET:  /countertotals


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
 dtDate
 Date
 String 

Curl example

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

Response

200 (OK) :  array of countertotals

Response body

{ "EmployeeCode": "02", "Name": "02", "DepartmentCode": "", "JournalCode": "FUNK", "Date": "2020-05-20T11:35:29.027", "Afspadsering": 0, "Feriedage": 0, "Feriefri timer": 0, "teste": 0 }, { "EmployeeCode": "021294", "Name": "Test", "DepartmentCode": "DENMARK", "JournalCode": "TIME", "Date": "2020-05-20T11:35:29.027", "Afspadsering": 0, "Feriedage": 0, "Feriefri timer": 0, "teste": 0 }, ]


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



POST: /countertotals?sEmployeeCode=xxxx&dtDate=xxxx


Parameters
 Name
 Description
 Type
 API-key - required
 Authorization Token 
 String(64)
 UID - required
 UID -how can be obtained
 String
 DEVICEID - required
  DEVICEID
 String
 sEmployeeCode
 Employee Code
 String
 dtDate
 Date
 string

Curl example
curl -X POST "https://smartapi.smarttid.dk/countertotals?sEmployeeCode=xxxx&dtDate=xxxx" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 
Response

200 (OK) :

Response Body
[
  {
    "Message": "OK"
  }
]
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