Info

Created 25-01-2021 by Lavinia Gheghea

Revision



Description

The API allows you to create employee.

Endpoints


POST: /createemployee


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
Request Body
{
"sEmployeeCode": "string",
  "sName": "string",
  "sAddress": "string",
  "sZipCode": "string",
  "sCity": "string",
  "sPhone": "string",
  "sCellPhone": "string",
  "sEmail": "string",
  "sCPRNo": "string",
  "sDepartmentCode": "string",
  "sDepartmentName": "string",
  "sWorkCalendarCode": "string",
  "sWorkFunctionCode": "string",
  "sWorkFunctionName": "string",
  "sPayrollTypeCode": "string",
  "sPayrollTypeName": "string",
  "sJournalCode": "string",
  "sJournalName": "string",
  "sEmployedStartDate": "string",
  "sEmployedEndDate": "string",
  "dtEmployedStartDate": "string",
  "dtEmployedEndDate": "string",
  "sTeamleaderCode": "string",
  "bActive": true,
  "sEmployeeCode2": "string",
  "sGroundsForTerminationCode": "string",
  "sDistrictCode": "string",
  "sEmployeeGroupCode": "string",
  "sProfileCode": "string",
  "sOldEmployeeCode": "string",
  "sSystemID": "string",
  "sTAG": "string",
  "sTemplateCode": "string",
  "sDimensionCode1": "string",
  "sDimensionCode2": "string",
  "sDimensionCode3": "string",
  "sDimensionCode4": "string",
  "sDimensionCode5": "string",
  "bTransferToPayroll": true
}
  

Curl example
curl -X POST "https://smartapi.smarttid.dk/createemployee" -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\",  \"sName\": \"string\",  \"sAddress\": \"string\",  \"sZipCode\": \"string\",  \"sCity\": \"string\",  \"sPhone\": \"string\",  \"sCellPhone\": \"string\",  \"sEmail\": \"string\",  \"sCPRNo\": \"string\",  \"sDepartmentCode\": \"string\",  \"sDepartmentName\": \"string\",  \"sWorkCalendarCode\": \"string\",  \"sWorkFunctionCode\": \"string\",  \"sWorkFunctionName\": \"string\",  \"sPayrollTypeCode\": \"string\",  \"sPayrollTypeName\": \"string\",  \"sJournalCode\": \"string\",  \"sJournalName\": \"string\",  \"sEmployedStartDate\": \"string\",  \"sEmployedEndDate\": \"string\",  \"dtEmployedStartDate\": \"string\",  \"dtEmployedEndDate\": \"string\",  \"sTeamleaderCode\": \"string\",  \"bActive\": true,  \"sEmployeeCode2\": \"string\",  \"sGroundsForTerminationCode\": \"string\",  \"sDistrictCode\": \"string\",  \"sEmployeeGroupCode\": \"string\",  \"sProfileCode\": \"string\",  \"sOldEmployeeCode\": \"string\",  \"sSystemID\": \"string\",  \"sTAG\": \"string\",  \"sTemplateCode\": \"string\",  \"sDimensionCode1\": \"string\",  \"sDimensionCode2\": \"string\",  \"sDimensionCode3\": \"string\",  \"sDimensionCode4\": \"string\",  \"sDimensionCode5\": \"string\",  \"bTransferToPayroll\": true}"

Response

200 (OK) : Success

400 (ERROR) : Error message

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


SQL Procedure 

sp_IntegrationCreateEmployee

Object


 Name
 Description
 Type
sEmployeeCode
Employee Code
String
sName
Name
String
sAddress
Address
String
sZipCode
Zip Code
String
 sCity
City
 String
 sPhone
Phone
 String
 sCellPhone
Cell Phone
 String
 sEmail
Email
 String
 sCPRNo
CPR No
String
sDepartmentCode
Department Code
String
 sDepartmentName
Department Name
 String
 sWorlCalendarCode
 Work Calendar Code
 String
 sWorkFunctionCode
 Work Function Code
 String
 sWorkFunctionName
 Work Function Name
 String
 sPayrollTypeCode
 Payroll Type Code
 String
 sPayrollTypeName
 Payroll Type Name
 String
 sJournalCode
 Journal Code
 String
 sJournalName
Journal Name
 String
 sEmployedStartDate
 Employed Start Date
 String
 sEmployedEndDate
 Employed End Date
 String
 dtEmployedStartDate
 Employed Start Date
 String
 dtEmployedEndDate
 Employed End Date
 String
 sTeamleaderCode
 Team Leader Code
String
 bActive
 Active
bool
 sEmployeeCode2
 Employee Code 2
String
 sGroundsForTerminationCode
Grounds For Termination Code
String
 sDistrictCode
District Code
String 
 sEmployeeGroupCode
Employee Group Code 
String 
 sProfileCode
Profile Code
String 
 sOldEmployeeCode
Old Employee Code 
 String
 sSystemID
System ID 
String 
 sTAG
TAG 
String 
 sTemplateCode
Template Code 
String 
 sDimensionCode1
Dimension Code 1 
String 
 sDimensionCode2
Dimension Code 2 
String 
 sDimensionCode3
Dimension Code 3 
String
sDimensionCode4 
Dimension Code 4 
String 
sDimensionCode5 
Dimension Code 5 
String 
bTransferToPayroll 
Transfer To Payroll
bool