Info

Created 11-03-2021 by Lavinia Gheghea

Revision



Description

The API allows you to create, delete, and update  team employee. You can retrieve individual team employee as well as a list of all tem employees.

Endpoints


GET:  /teamemployees

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
 sAction
 Action
 String
 sTeamCode
 Team Code
 String
 sType
 Type
 String
 dtStartDate
 Start Date
 String
 dtEndDate
 End Date
 String

Curl example

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

Response

200 (OK) :  array of team employees

Response body
[
 {
    "ID": 103,
    "TeamCode": "0001",
    "EmployeeCode": "9999",
    "Initials": "",
    "StartDate": "2020-08-06T00:00:00",
    "EndDate": "2021-04-05T00:01:00",
    "Remark": "New",
    "Description": "0001 Team SmartTID",
    "Color": "#1b893d",
    "Type": "Employee",
    "BookingTypeCode": null,
    "Name": "SmartTID Testmedarbejder",
    "ColorCode": "ORANGE"
  },
  {
    "ID": 301,
    "TeamCode": "0001",
    "EmployeeCode": "021294",
    "Initials": "ACC",
    "StartDate": "2021-02-03T00:00:00",
    "EndDate": "2021-02-06T00:01:00",
    "Remark": "",
    "Description": "0001 Team SmartTID",
    "Color": "#228fce",
    "Type": "Employee",
    "BookingTypeCode": null,
    "Name": "Anna Christensen",
    "ColorCode": "ORANGE"
  },
  {
    "ID": 274,
    "TeamCode": "0004",
    "EmployeeCode": "1007",
    "Initials": "",
    "StartDate": "2020-11-09T00:00:00",
    "EndDate": "2021-03-31T00:01:00",
    "Remark": "",
    "Description": "0004 test",
    "Color": null,
    "Type": "Employee",
    "BookingTypeCode": null,
    "Name": "Bjørn Kortegaard Fuglsang",
    "ColorCode": ""
  },
  {
    "ID": 275,
    "TeamCode": "0004",
    "EmployeeCode": "5050",
    "Initials": "",
    "StartDate": "2020-11-09T00:00:00",
    "EndDate": "2021-03-31T00:01:00",
    "Remark": "",
    "Description": "0004 test",
    "Color": null,
    "Type": "Employee",
    "BookingTypeCode": null,
    "Name": "Flemming Pedersen",
    "ColorCode": ""
  },
]

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} : /teamemployees/{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 team employee
 Integer
 sType
 Type
 String
Curl example

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

Response

200 (OK) : the team employee

Response Body
[
    { 
"ID": 275, 
"TeamCode": "0004",
 "EmployeeCode": "5050", 
"Initials": "", 
"StartDate": "2020-11-09T00:00:00", 
"EndDate": "2021-03-31T00:01:00", 
"Remark": "", 
"Description": "0004 test", 
"Color": null, 
"Type": "Employee", 
"BookingTypeCode": null, 
"Name": "Flemming Pedersen", 
"ColorCode": "" 
},
]


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: /teamemployees


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
{
"nID": 0,
  "sTeamCode": "string",
  "sEmployeeCode": "string",
  "sInitials": "string",
  "dtStartDate": "string",
  "dtEndDate": "string",
  "sRemark": "string",
  "sType": "string",
  "sBookingTypeCode": "string",
  "sColorCode": "string"
}

Curl example
curl -X POST "https://smartapi.smarttid.dk/teamemployees" -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 {\"nID\": 0,  \"sTeamCode\": \"string\",  \"sEmployeeCode\": \"string\",  \"sInitials\": \"string\",  \"dtStartDate\": \"string\",  \"dtEndDate\": \"string\",  \"sRemark\": \"string\",  \"sType\": \"string\",  \"sBookingTypeCode\": \"string\",  \"sColorCode\": \"string\" }"

Response

200 (OK) : The ID of the new team employee

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}: /teamemployees/{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 team employee
 Integer

Request body

{
"nID": 0, 
"sTeamCode": "string", 
"sEmployeeCode": "string", 
"sInitials": "string", 
"dtStartDate": "string", 
"dtEndDate": "string", 
"sRemark": "string", 
"sType": "string", 
"sBookingTypeCode": "string", 
"sColorCode": "string" 
}


Curl example

curl -X PUT "https://smartapi.smarttid.dk/teamemployees/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 {\"nID\": 0,  \"sTeamCode\": \"string\",  \"sEmployeeCode\": \"string\",  \"sInitials\": \"string\",  \"dtStartDate\": \"string\",  \"dtEndDate\": \"string\",  \"sRemark\": \"string\",  \"sType\": \"string\",  \"sBookingTypeCode\": \"string\",  \"sColorCode\": \"string\"}"

Response

200 (OK) : success

400 (ERROR) : Error message

Response Body
Error message


DELETE{id}: /teamemployees/{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 team employee
 Integer

Curl example

curl -X DELETE "https://smartapi.smarttid.dk/teamemployees/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


Object

Team Employee
 Name
 Description
 Type
nID
ID
Integer
 sTeamCode
Team Code
 String
sEmployeeCode
Employee Code
String
 sInitials
 Initials
 String
 dtStartDate
 Start Date
 String
 dtEndDate
 End Date
 String
 sRemark
 Remark
 String
 sType
 Type
 String
 sBookingTypeCode
 Booking Type Code
 String
 sColorCode
Color Code 
 String