Info

Created 12-03-2021 by Lavinia Gheghea

Revision



Description

The API allows you to get time sheet period for employee

Endpoints


GET:  /timesheetperiod

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
 sEmployeeCode
 Employee Code
 String

Curl example

curl -X GET "https://smartapi.smarttid.dk/timesheetperiod?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  time sheet periods

Response body
[
{
    "StartDate": "2021-03-08T00:00:00",
    "Description": "{t}Week{/t}: 10 (08-03-2021 - 14-03-2021)",
    "WorkTypeCode": null,
    "ApprovedOnLevel": 0,
    "Section": 0,
    "RowNumber": 1
  },
  {
    "StartDate": "2021-03-01T00:00:00",
    "Description": "{t}Week{/t}: 9 (01-03-2021 - 07-03-2021)",
    "WorkTypeCode": null,
    "ApprovedOnLevel": 0,
    "Section": 0,
    "RowNumber": 2
  },
  {
    "StartDate": "2021-02-22T00:00:00",
    "Description": "{t}Week{/t}: 8 (22-02-2021 - 28-02-2021)",
    "WorkTypeCode": null,
    "ApprovedOnLevel": 0,
    "Section": 0,
    "RowNumber": 3
  },
  {
    "StartDate": "2021-02-15T00:00:00",
    "Description": "{t}Week{/t}: 7 (15-02-2021 - 21-02-2021)",
    "WorkTypeCode": null,
    "ApprovedOnLevel": 0,
    "Section": 0,
    "RowNumber": 4
  },
  {
    "StartDate": "2021-03-15T00:00:00",
    "Description": "{t}Week{/t}: 11 (15-03-2021 - 21-03-2021)",
    "WorkTypeCode": null,
    "ApprovedOnLevel": 0,
    "Section": 1,
    "RowNumber": 1
  },
  {
    "StartDate": "2021-03-22T00:00:00",
    "Description": "{t}Week{/t}: 12 (22-03-2021 - 28-03-2021)",
    "WorkTypeCode": null,
    "ApprovedOnLevel": 0,
    "Section": 1,
    "RowNumber": 2
  },
  {
    "StartDate": "2021-03-29T00:00:00",
    "Description": "{t}Week{/t}: 13 (29-03-2021 - 04-04-2021)",
    "WorkTypeCode": null,
    "ApprovedOnLevel": 0,
    "Section": 1,
    "RowNumber": 3
  },
  {
    "StartDate": "2021-04-05T00:00:00",
    "Description": "{t}Week{/t}: 14 (05-04-2021 - 11-04-2021)",
    "WorkTypeCode": null,
    "ApprovedOnLevel": 0,
    "Section": 1,
    "RowNumber": 4
  }

]

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