Info

Created 05-10-2020 by Lavinia Gheghea

Revision



Description

The API allows you to create, and update  delimitation. You can retrieve  a list of all delimitations.

Endpoints


GET:  /delimitations


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/delimitations" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response

200 (OK) :  array of delimitations

Response body

{ "EmployeeCode": null, "StartDate": "2020-09-01T00:00:00", "EndDate": "2020-09-30T00:00:00", "WorkTypeCode": null, "WorkTypeCode2": null, "WorkTypeCode3": null, "DistrictCode": null, "DepartmentCode": null, "EmployeeGroupCode": null, "WorkCalendarCode": null, "JournalCode": "STANDARD", "Hours": 10, "Hours2": 0, "JobCode": null, "OperationCode": null, "ActivityCode": 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


POST: /delimitations


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
{
  "sEmployeeCode": "string",
  "dtStartDate": "string",
  "dtEndDate": "string",
  "sWorkTypeCode": "string",
  "sWorkTypeCode2": "string",
  "sWorkTypeCode3": "string",
  "sDistrictCode": "string",
  "sDepartmentCode": "string",
  "sEmployeeGroupCode": "string",
  "sWorkCalendarCode": "string",
  "sJournalCode": "string",
  "nHours": 0,
  "nHours2": 0,
  "sJobCode": "string",
  "sOperationCode": "string",
  "sActivityCode": "string",
"sLongDescription":"string"
  }

Curl example
curl -X POST "https://smartapi.smarttid.dk/delimitations" -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 "{ /"sEmployeeCode/": /"string/", /"dtStartDate/": /"string/", /"dtEndDate/": /"string/", /"sWorkTypeCode/": /"string/", /"sWorkTypeCode2/": /"string/", /"sWorkTypeCode3/": /"string/", /"sDistrictCode/": /"string/", /"sDepartmentCode/": /"string/", /"sEmployeeGroupCode/": /"string/", /"sWorkCalendarCode/": /"string/", /"sJournalCode/": /"string/", /"nHours/": 0, /"nHours2/": 0, /"sJobCode/": /"string/", /"sOperationCode/": /"string/", /"sActivityCode/": /"string/",/"sLongDescription/":/"string/" }"

Response

200 (OK) : The ID of the new delimitation

Response Body
[
 {
  "ID": 3
  }
]
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}: /delimitations/{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 delimitation
 Integer

Request body
{
  "sEmployeeCode": "string",
  "dtStartDate": "string",
  "dtEndDate": "string",
  "sWorkTypeCode": "string",
  "sWorkTypeCode2": "string",
  "sWorkTypeCode3": "string",
  "sDistrictCode": "string",
  "sDepartmentCode": "string",
  "sEmployeeGroupCode": "string",
  "sWorkCalendarCode": "string",
  "sJournalCode": "string",
  "nHours": 0,
  "nHours2": 0,
  "sJobCode": "string",
  "sOperationCode": "string",
  "sActivityCode": "string",
"sLongDescription": "string"
 }

Curl example

curl -X PUT "https://smartapi.smarttid.dk/delimitations/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 "{ /"sEmployeeCode/": /"string/", /"dtStartDate/": /"string/", /"dtEndDate/": /"string/", /"sWorkTypeCode/": /"string/", /"sWorkTypeCode2/": /"string/", /"sWorkTypeCode3/": /"string/", /"sDistrictCode/": /"string/", /"sDepartmentCode/": /"string/", /"sEmployeeGroupCode/": /"string/", /"sWorkCalendarCode/": /"string/", /"sJournalCode/": /"string/", /"nHours/": 0, /"nHours2/": 0, /"sJobCode/": /"string/", /"sOperationCode/": /"string/", /"sActivityCode/": /"string/",/"sLongDescription/":/"string/"}"

Response

200 (OK) : success

400 (ERROR) : Error message

Response Body
Error message



Object

Delimitation
 Name
 Description
 Type
sEmployeeCode
 Employee Code
 String
dtStartDate
 Start Date
 String
 dtEndDate
 End Date
 String
 sWorkTypeCode
 WorkType Code
 String
 sWorkTypeCode2
 WorkType Code2
 String
 sWorkTypeCode3
 WorkType Code3
 String
 sDistrictCode
 District Code
String 
 sDepartmentCode
 Department Code
 String
 sEmployeeGroupCode
 Employee Group Code
 String
 sWorkCalendarCode
 Work Calendar Code
 String
 sJournalCode
 Journal Code
 String
 nHours
 Hours
 Double (number)
 nHours2
 Hours 2
 Double(number)
 sJobCode
 Job Code
 String
 sOperationCode
 Operation Code
 String
 sActivityCode
 Activity Code
 String
 sLongDescription Long Description String