First test

After you become a developer partner with SmartTID and get those info : secret token(Authorization Token) and Customer API Key , you can follow this to make a little test  with our REST API

Video
This video will show you how to:



Login

First have to make a login with the function API Login in order to get UID.
Example:

curl -X POST "https://smartapi.smarttid.dk/apilogin" -H "accept: application/json" -H "API-Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "Content-Type: multipart/form-data" -F "sAPIKey=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx"

where API-key is the Authorization Token and sAPIKey is the Customer API Key

The example return a Json string from which you take the UID:
{"UID":"a6969eed-bc27-419c-b15c-92c136f70e0a","LanguageCode":"EN","DatabaseVersion":"6.17.77"}

After obtaining those info from Login  you can execute any other functions from our REST API service like is described.

Get a list of employees:



You can get a list of employee with the function Employees .

Example :
curl -X GET "https://smartapi.smarttid.dk/employees" -H "accept: application/json" -H "UID: a6969eed-bc27-419c-b15c-92c136f70e0a" -H "DEVICEID: xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx" -H "API-Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
where API-key is the Authorization Token and DEVICEID is the Customer API Key and UID is obtained from 

Response:
[
  {
    "ID": 187,
    "EmployeeCode": "02",
    "Name": "02",
    "Address": "",
    "ZipCode": "",
    "City": "",
    "Phone": "",
    "CellPhone": "",
    "EMail": "",
    "CPRNo": null,
    "DepartmentCode": "TEST",
    "TeamLeaderCode": "1007",
    "Active": true,
    "UseTolerance": true,
    "TransferToPayroll": true,
    "WorkFunctionCode": "12345",
    "TAG": "",
    "SystemID": "",
    "PayrollTypeCode": "",
    "ProfileCode": "FUNK",
    "JournalCode": "FUNK",
    "TransferToOutlook": false,
    "SyncTasksWithExchange": false,
    "ExchangeUserAndCalendar": null,
    "DistrictCode": "",
    "EmployeeGroupCode": "",
    "LanguageCode": "DK",
    "Employed": true,
    "EmployeeCode2": "",
    "Initials": "",
    "HoursPerWeek": 0,
    "SocialWorkerCode": null,
    "ContactPerson": "",
    "Caregivers": "",
    "DimensionCode1": "BMW",
    "DimensionCode2": "",
    "DimensionCode3": "",
    "DimensionCode4": null,
    "DimensionCode5": null,
    "TemplateCode": "FUNK",
    "JobCode": null,
    "TaskID": 0,
    "Password": "",
    "UseSmartPhone": false,
    "Pin": "",
    "TAG2": null,
    "DimensionCode6": null,
    "DimensionCode7": null,
    "DimensionCode8": null,
    "DimensionCode9": null,
    "DimensionCode10": null,
    "WebAdmin": false,
    "DepartmentName": "ABC",
    "ProfileCode1": "FUNK",
    "ProfileDescription": "Funktionærer uden flex",
    "WorkCalendarCode": "NEW-9",
    "WorkCalendarDescription": "Funktionærer",
    "JournalDescription": "Funktionærer",
    "EmployeeGroupName": null,
    "SalaryEnclosureCode": "",
    "SalaryEnclosureDescription": null,
    "HtmlCardTitle": "",
    "HtmlCardContent": "",
    "IsTeamLeader": false,
    "HoursPerDay": 7.4,
    "AutoAddVacation": true,
    "VacationSetupCode": "DAGE"
  },
  {
    "ID": 172,
    "EmployeeCode": "5264",
    "Name": "Anita Mortensen",
    "Address": "Test",
    "ZipCode": "",
    "City": "",
    "Phone": "",
    "CellPhone": "",
    "EMail": "amtest@smarttid.dk",
    "CPRNo": null,
    "DepartmentCode": "DENMARK",
    "TeamLeaderCode": "1000",
    "Active": true,
    "UseTolerance": true,
    "TransferToPayroll": true,
    "WorkFunctionCode": "",
    "TAG": "",
    "SystemID": "am",
    "PayrollTypeCode": "",
    "ProfileCode": "FUNK",
    "JournalCode": "FUNK",
    "TransferToOutlook": false,
    "SyncTasksWithExchange": false,
    "ExchangeUserAndCalendar": null,
    "DistrictCode": "",
    "EmployeeGroupCode": "",
    "LanguageCode": "DK",
    "Employed": true,
    "EmployeeCode2": "",
    "Initials": "",
    "HoursPerWeek": 0,
    "SocialWorkerCode": null,
    "ContactPerson": "",
    "Caregivers": "",
    "DimensionCode1": "BMW",
    "DimensionCode2": "39",
    "DimensionCode3": "BLUE",
    "DimensionCode4": null,
    "DimensionCode5": null,
    "TemplateCode": "FUNK",
    "JobCode": null,
    "TaskID": 0,
    "Password": "1234",
    "UseSmartPhone": true,
    "Pin": "",
    "TAG2": null,
    "DimensionCode6": null,
    "DimensionCode7": null,
    "DimensionCode8": null,
    "DimensionCode9": null,
    "DimensionCode10": null,
    "WebAdmin": false,
    "DepartmentName": "Denmark2",
    "ProfileCode1": "FUNK",
    "ProfileDescription": "Funktionærer uden flex",
    "WorkCalendarCode": "FUNK",
    "WorkCalendarDescription": "Funktionærer",
    "JournalDescription": "Funktionærer",
    "EmployeeGroupName": null,
    "SalaryEnclosureCode": "",
    "SalaryEnclosureDescription": null,
    "HtmlCardTitle": "",
    "HtmlCardContent": "",
    "IsTeamLeader": false,
    "HoursPerDay": 7.4,
    "AutoAddVacation": true,
    "VacationSetupCode": "DAGE"
  },
  {
    "ID": 169,
    "EmployeeCode": "AMTEST",
    "Name": "anita2",
    "Address": "",
    "ZipCode": "",
    "City": "",
    "Phone": "",
    "CellPhone": "",
    "EMail": "",
    "CPRNo": null,
    "DepartmentCode": "TEST",
    "TeamLeaderCode": "",
    "Active": false,
    "UseTolerance": true,
    "TransferToPayroll": true,
    "WorkFunctionCode": "",
    "TAG": "",
    "SystemID": "",
    "PayrollTypeCode": "",
    "ProfileCode": "TIME_FLEX",
    "JournalCode": "TIME",
    "TransferToOutlook": false,
    "SyncTasksWithExchange": false,
    "ExchangeUserAndCalendar": null,
    "DistrictCode": "JYL",
    "EmployeeGroupCode": "1",
    "LanguageCode": "DK",
    "Employed": false,
    "EmployeeCode2": "",
    "Initials": "",
    "HoursPerWeek": 0,
    "SocialWorkerCode": null,
    "ContactPerson": "",
    "Caregivers": "",
    "DimensionCode1": "",
    "DimensionCode2": "",
    "DimensionCode3": "",
    "DimensionCode4": null,
    "DimensionCode5": null,
    "TemplateCode": "TIME_FLEX",
    "JobCode": null,
    "TaskID": 0,
    "Password": "",
    "UseSmartPhone": false,
    "Pin": "",
    "TAG2": null,
    "DimensionCode6": null,
    "DimensionCode7": null,
    "DimensionCode8": null,
    "DimensionCode9": null,
    "DimensionCode10": null,
    "WebAdmin": false,
    "DepartmentName": "ABC",
    "ProfileCode1": "TIME_FLEX",
    "ProfileDescription": "Timelønnede med flex",
    "WorkCalendarCode": "DAG1",
    "WorkCalendarDescription": "Daghold 7-15 med overtid og fast pause",
    "JournalDescription": "Timelønnede",
    "EmployeeGroupName": "Produktion",
    "SalaryEnclosureCode": "STANDARD",
    "SalaryEnclosureDescription": "Standard lønbilag",
    "HtmlCardTitle": "",
    "HtmlCardContent": "",
    "IsTeamLeader": false,
    "HoursPerDay": 7.4,
    "AutoAddVacation": true,
    "VacationSetupCode": null
  },
  {
    "ID": 177,
    "EmployeeCode": "1903",
    "Name": "anitatest1903",
    "Address": "",
    "ZipCode": "",
    "City": "",
    "Phone": "",
    "CellPhone": "",
    "EMail": "",
    "CPRNo": null,
    "DepartmentCode": "TEST",
    "TeamLeaderCode": "",
    "Active": false,
    "UseTolerance": true,
    "TransferToPayroll": true,
    "WorkFunctionCode": "",
    "TAG": "",
    "SystemID": "",
    "PayrollTypeCode": "",
    "ProfileCode": "FUNK",
    "JournalCode": "FUNK",
    "TransferToOutlook": false,
    "SyncTasksWithExchange": false,
    "ExchangeUserAndCalendar": null,
    "DistrictCode": "",
    "EmployeeGroupCode": "",
    "LanguageCode": "DK",
    "Employed": false,
    "EmployeeCode2": "",
    "Initials": "",
    "HoursPerWeek": 0,
    "SocialWorkerCode": null,
    "ContactPerson": "",
    "Caregivers": "",
    "DimensionCode1": "",
    "DimensionCode2": "",
    "DimensionCode3": "",
    "DimensionCode4": null,
    "DimensionCode5": null,
    "TemplateCode": "FUNK",
    "JobCode": null,
    "TaskID": 0,
    "Password": "",
    "UseSmartPhone": false,
    "Pin": "",
    "TAG2": null,
    "DimensionCode6": null,
    "DimensionCode7": null,
    "DimensionCode8": null,
    "DimensionCode9": null,
    "DimensionCode10": null,
    "WebAdmin": false,
    "DepartmentName": "ABC",
    "ProfileCode1": "FUNK",
    "ProfileDescription": "Funktionærer uden flex",
    "WorkCalendarCode": "FUNK",
    "WorkCalendarDescription": "Funktionærer",
    "JournalDescription": "Funktionærer",
    "EmployeeGroupName": null,
    "SalaryEnclosureCode": "",
    "SalaryEnclosureDescription": null,
    "HtmlCardTitle": "",
    "HtmlCardContent": "",
    "IsTeamLeader": false,
    "HoursPerDay": 7.4,
    "AutoAddVacation": true,
    "VacationSetupCode": null
  },  ]