Info

Created 05-10-2020 by Lavinia Gheghea

Revision



Description

The API allows you to retrieve individual employee time ledger entry as well as a list of all employee time ledger entries.

Endpoints


GET:  /employeetimeledgerentries?sEmployeeCode=xxxx


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
 sEmployeeCode- required
 Employee Code
 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/employeetimeledgerentries?sEmployeeCode=xxxx" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response

200 (OK) :  array of employee time ledger entries

Response body

{ "ID": 218, "EmployeeCode": "1009", "Name": "Test", "Day": "Ons", "Year": 2019, "Month": 9, "Date": "2019-09-04T00:00:00", "LogStart": null, "LogEnd": null, "BreakTime": null, "StartTime": null, "EndTime": null, "TotalTime": 12, "WorkTypeCode": "AFSPADSERINGOP", "Type": "Absence", "Transfered": false, "WorkCalendarCode": "FUNK", "Export": false, "Remark": "Oprettet fra korrektionskladden", "DepartmentCode": "ROMANIA", "DistrictCode": "", "EmployeeGroupCode": "", "WorkFunctionCode": "", "Relative": false, "JournalCode": "FUNK", "TeamLeaderCode": null, "SystemID": null, "Canceled": false, "DimensionCode1": "BMW", "DimensionCode2": "37", "DimensionCode3": null, "DimensionCode4": null, "DimensionCode5": null, "DimensionCode6": null, "DimensionCode7": null, "DimensionCode8": null, "DimensionCode9": null, "DimensionCode10": null, "KMStart": null, "KMEnd": null, "KMTotal": null, "JournalLineID": null, "AttachmentJournalLineExists": false, "JournalLineEntryGPSExists": false, "JournalLineEntryRemarkExists": 1, "SearchField": "Ons 2019 04-09-2019 AFSPADSERINGOP Absence FUNK Oprettet fra korrektionskladden ROMANIA FUNK" }, { "ID": 475, "EmployeeCode": "1009", "Name": "Test", "Day": "Tir", "Year": 2019, "Month": 6, "Date": "2019-06-25T00:00:00", "LogStart": null, "LogEnd": null, "BreakTime": "00:30:00", "StartTime": "09:00:00", "EndTime": "18:00:00", "TotalTime": 8.5, "WorkTypeCode": "NORMAL", "Type": "Normal", "Transfered": false, "WorkCalendarCode": "DAG1", "Export": false, "Remark": "", "DepartmentCode": "ROMANIA", "DistrictCode": "", "EmployeeGroupCode": "", "WorkFunctionCode": "", "Relative": false, "JournalCode": "STANDARD", "TeamLeaderCode": "CBZQ", "SystemID": null, "Canceled": false, "DimensionCode1": "BMW", "DimensionCode2": "37", "DimensionCode3": null, "DimensionCode4": null, "DimensionCode5": null, "DimensionCode6": null, "DimensionCode7": null, "DimensionCode8": null, "DimensionCode9": null, "DimensionCode10": null, "KMStart": null, "KMEnd": null, "KMTotal": null, "JournalLineID": 1458, "AttachmentJournalLineExists": false, "JournalLineEntryGPSExists": false, "JournalLineEntryRemarkExists": 0, "SearchField": "Tir 2019 25-06-2019 NORMAL Normal DAG1 ROMANIA STANDARD" }, ]


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} : /employeetimeledgerentries/{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 employee job ledger entry
 Integer
Curl example

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

Response

200 (OK) : the employee time ledger entry

Response Body

 { "ID": 475, "EmployeeCode": "1009", "Name": "Test", "Day": "Tir", "Year": 2019, "Month": 6, "Date": "2019-06-25T00:00:00", "LogStart": null, "LogEnd": null, "BreakTime": "00:30:00", "StartTime": "09:00:00", "EndTime": "18:00:00", "TotalTime": 8.5, "WorkTypeCode": "NORMAL", "Type": "Normal", "Transfered": false, "WorkCalendarCode": "DAG1", "Export": false, "Remark": "", "DepartmentCode": "ROMANIA", "DistrictCode": "", "EmployeeGroupCode": "", "WorkFunctionCode": "", "Relative": false, "JournalCode": "STANDARD", "TeamLeaderCode": "CBZQ", "SystemID": null, "Canceled": false, "DimensionCode1": "BMW", "DimensionCode2": "37", "DimensionCode3": null, "DimensionCode4": null, "DimensionCode5": null, "DimensionCode6": null, "DimensionCode7": null, "DimensionCode8": null, "DimensionCode9": null, "DimensionCode10": null, "KMStart": null, "KMEnd": null, "KMTotal": null, "JournalLineID": 1458, "AttachmentJournalLineExists": false, "JournalLineEntryGPSExists": false, "JournalLineEntryRemarkExists": 0, "SearchField": "Tir 2019 25-06-2019 NORMAL Normal DAG1 ROMANIA STANDARD" }
]

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