Info
Created 05-02-2021 by Lavinia
        Gheghea
Revision
Description
The API
                    allows you to create, delete,
                    and update  profile.
                    You can retrieve individual profile as well as a list
                    of all profiles.
Endpoints
GET:  /profiles
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/profiles" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Response
200 (OK) :  array of profiles
Response body
[{ "ID": 15, "ProfileCode": "12", "Description": "test12aaa", "IgnoreTooSoonLate": false, "SelectBreakPaid": false, "ChangeTimes": false, "ChangeJobTimes": false, "CheckOnNonWorkDay": false, "RestartLatestOperation": false, "RelativeWorkTime": false, "FilterWorkType": false, "PutPositiveNormTimeOnWorkTypeCode": "", "PutNegativeNormTimeOnWorkTypeCode": "", "CheckForMissingDates": false, "LoginLimitedToAssignedTablets": false, "MaxLengthWorkingDay": 0, "ForceGPSOnMobile": false, "AskForLoginTimeSheet": false, "TransferTimeSheetDirectlyToJournal": false, "ShowOnlyAtWorkFromOwnDepartment": false, "AskForKM": true, "NewJournalLinePerDate": true, "AllowedToAddJob": true, "AllowedToAddAbsence": true, "AllowedToAddTime": true, "AllowedToEditAbsence": true, "AllowedToStopJobTime": true, "ChooseCalendarEveryWeek": true, "AccessFromWiFiSSID": "dddd", "ShowExtraPunchOutButton": false, "AllowChangePunchOutTime": true, "ShowEvacuation": false, "VacationInHours": true, "AllowedToCreateTask": false, "AllowedOverlapTimeSheet": true }, { "ID": 13, "ProfileCode": "ABCD", "Description": "Test", "IgnoreTooSoonLate": false, "SelectBreakPaid": false, "ChangeTimes": false, "ChangeJobTimes": false, "CheckOnNonWorkDay": false, "RestartLatestOperation": false, "RelativeWorkTime": false, "FilterWorkType": false, "PutPositiveNormTimeOnWorkTypeCode": "BARSEL", "PutNegativeNormTimeOnWorkTypeCode": "SYG", "CheckForMissingDates": false, "LoginLimitedToAssignedTablets": false, "MaxLengthWorkingDay": 15, "ForceGPSOnMobile": false, "AskForLoginTimeSheet": false, "TransferTimeSheetDirectlyToJournal": false, "ShowOnlyAtWorkFromOwnDepartment": false, "AskForKM": false, "NewJournalLinePerDate": false, "AllowedToAddJob": false, "AllowedToAddAbsence": false, "AllowedToAddTime": false, "AllowedToEditAbsence": false, "AllowedToStopJobTime": false, "ChooseCalendarEveryWeek": false, "AccessFromWiFiSSID": null, "ShowExtraPunchOutButton": false, "AllowChangePunchOutTime": false, "ShowEvacuation": false, "VacationInHours": false, "AllowedToCreateTask": false, "AllowedOverlapTimeSheet": true }, ]
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} : /profiles/{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 profile | Integer | 
Curl example
curl -X GET "https://smartapi.smarttid.dk/profiles/id" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Response
200 (OK) : the profile
Response Body
[{ "ID": 13, "ProfileCode": "ABCD", "Description": "Test", "IgnoreTooSoonLate": false, "SelectBreakPaid": false, "ChangeTimes": false, "ChangeJobTimes": false, "CheckOnNonWorkDay": false, "RestartLatestOperation": false, "RelativeWorkTime": false, "FilterWorkType": false, "PutPositiveNormTimeOnWorkTypeCode": "BARSEL", "PutNegativeNormTimeOnWorkTypeCode": "SYG", "CheckForMissingDates": false, "LoginLimitedToAssignedTablets": false, "MaxLengthWorkingDay": 15, "ForceGPSOnMobile": false, "AskForLoginTimeSheet": false, "TransferTimeSheetDirectlyToJournal": false, "ShowOnlyAtWorkFromOwnDepartment": false, "AskForKM": false, "NewJournalLinePerDate": false, "AllowedToAddJob": false, "AllowedToAddAbsence": false, "AllowedToAddTime": false, "AllowedToEditAbsence": false, "AllowedToStopJobTime": false, "ChooseCalendarEveryWeek": false, "AccessFromWiFiSSID": null, "ShowExtraPunchOutButton": false, "AllowChangePunchOutTime": false, "ShowEvacuation": false, "VacationInHours": false, "AllowedToCreateTask": false, "AllowedOverlapTimeSheet": true }]
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: /profiles
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
{ "sProfileCode": "string", "sDescription": "string", "bIgnoreTooSoonLate": true, "bSelectBreakPaid": true, "bChangeTimes": true, "bChangeJobTimes": true, "bCheckOnNonWorkDay": true, "bRestartLatestOperation": true, "bRelativeWorkTime": true, "bFilterWorkType": true, "sPutPositiveNormTimeOnWorkTypeCode": "string", "sPutNegativeNormTimeOnWorkTypeCode": "string", "bCheckForMissingDates": true, "bLoginLimitedToAssignedTablets": true, "nMaxLengthWorkingDay": 0, "bForceGPSOnMobile": true, "bAskForLoginTimeSheet": true, "bTransferTimeSheetDirectlyToJournal": true, "bShowOnlyAtWorkFromOwnDepartment": true, "bAskForKM": true, "bNewJournalLinePerDate": true, "bAllowedToAddJob": true, "bAllowedToAddAbsence": true, "bAllowedToAddTime": true, "bAllowedToEditAbsence": true, "bAllowedToStopJobTime": true, "bChooseCalendarEveryWeek": true, "sAccessFromWiFiSSID": "string", "bShowExtraPunchOutButton": true, "bAllowChangePunchOutTime": true, "bShowEvacuation": true, "bVacationInHours": true, "bAllowedToCreateTask": true, "bAllowedOverlapTimeSheet": true }
Curl example
curl -X POST "https://smartapi.smarttid.dk/profiles" -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 {\"sProfileCode\": \"string\", \"sDescription\": \"string\", \"bIgnoreTooSoonLate\": true, \"bSelectBreakPaid\": true, \"bChangeTimes\": true, \"bChangeJobTimes\": true, \"bCheckOnNonWorkDay\": true, \"bRestartLatestOperation\": true, \"bRelativeWorkTime\": true, \"bFilterWorkType\": true, \"sPutPositiveNormTimeOnWorkTypeCode\": "string", \"sPutNegativeNormTimeOnWorkTypeCode\": \"string\", \"bCheckForMissingDates\": true, \"bLoginLimitedToAssignedTablets\": true, \"nMaxLengthWorkingDay\": 0, \"bForceGPSOnMobile\": true, \"bAskForLoginTimeSheet\": true, \"bTransferTimeSheetDirectlyToJournal\": true, \"bShowOnlyAtWorkFromOwnDepartment\": true, \"bAskForKM\": true, \"bNewJournalLinePerDate\": true, \"bAllowedToAddJob\": true, \"bAllowedToAddAbsence\": true, \"bAllowedToAddTime\": true, \"bAllowedToEditAbsence\": true, \"bAllowedToStopJobTime\": true, \"bChooseCalendarEveryWeek\": true, \"sAccessFromWiFiSSID\": \"string\", \"bShowExtraPunchOutButton\": true, \"bAllowChangePunchOutTime\": true, \"bShowEvacuation\": true, \"bVacationInHours\": true, \"bAllowedToCreateTask\": true, \"bAllowedOverlapTimeSheet\": true}"
Response
200 (OK) : The ID of the new profile
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}: /profiles/{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 profile | Integer | 
Request body
{ "sProfileCode": "string", "sDescription": "string", "bIgnoreTooSoonLate": true, "bSelectBreakPaid": true, "bChangeTimes": true, "bChangeJobTimes": true, "bCheckOnNonWorkDay": true, "bRestartLatestOperation": true, "bRelativeWorkTime": true, "bFilterWorkType": true, "sPutPositiveNormTimeOnWorkTypeCode": "string", "sPutNegativeNormTimeOnWorkTypeCode": "string", "bCheckForMissingDates": true, "bLoginLimitedToAssignedTablets": true, "nMaxLengthWorkingDay": 0, "bForceGPSOnMobile": true, "bAskForLoginTimeSheet": true, "bTransferTimeSheetDirectlyToJournal": true, "bShowOnlyAtWorkFromOwnDepartment": true, "bAskForKM": true, "bNewJournalLinePerDate": true, "bAllowedToAddJob": true, "bAllowedToAddAbsence": true, "bAllowedToAddTime": true, "bAllowedToEditAbsence": true, "bAllowedToStopJobTime": true, "bChooseCalendarEveryWeek": true, "sAccessFromWiFiSSID": "string", "bShowExtraPunchOutButton": true, "bAllowChangePunchOutTime": true, "bShowEvacuation": true, "bVacationInHours": true, "bAllowedToCreateTask": true, "bAllowedOverlapTimeSheet": true }
Curl example
curl -X PUT "https://smartapi.smarttid.dk/profiles/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 {\"sProfileCode\": \"string\", \"sDescription\": \"string\", \"bIgnoreTooSoonLate\": true, \"bSelectBreakPaid\": true, \"bChangeTimes\": true, \"bChangeJobTimes\": true, \"bCheckOnNonWorkDay\": true, \"bRestartLatestOperation\": true, \"bRelativeWorkTime\": true, \"bFilterWorkType\": true, \"sPutPositiveNormTimeOnWorkTypeCode\": "string", \"sPutNegativeNormTimeOnWorkTypeCode\": \"string\", \"bCheckForMissingDates\": true, \"bLoginLimitedToAssignedTablets\": true, \"nMaxLengthWorkingDay\": 0, \"bForceGPSOnMobile\": true, \"bAskForLoginTimeSheet\": true, \"bTransferTimeSheetDirectlyToJournal\": true, \"bShowOnlyAtWorkFromOwnDepartment\": true, \"bAskForKM\": true, \"bNewJournalLinePerDate\": true, \"bAllowedToAddJob\": true, \"bAllowedToAddAbsence\": true, \"bAllowedToAddTime\": true, \"bAllowedToEditAbsence\": true, \"bAllowedToStopJobTime\": true, \"bChooseCalendarEveryWeek\": true, \"sAccessFromWiFiSSID\": \"string\", \"bShowExtraPunchOutButton\": true, \"bAllowChangePunchOutTime\": true, \"bShowEvacuation\": true, \"bVacationInHours\": true, \"bAllowedToCreateTask\": true, \"bAllowedOverlapTimeSheet\": true}"
Response
200 (OK) : success
400 (ERROR) : Error message
Response Body
Error message
DELETE{id}: /profiles/{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 profile | Integer | 
Curl example
curl -X DELETE "https://smartapi.smarttid.dk/profiles/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
| Name | Description | Type | 
| sProfileCode | Code of profile | String | 
| sDescription | Description | String | 
| bIgnoreTooSoonLate | Ignore Too Soon Late | bool | 
| bSelectBreakPaid | Select Break Paid | bool | 
| bChangeTimes | Change Times | bool | 
| bChangeJobTimes | Change Job Times | bool | 
| bCheckOnNonWorkDay | Check On NonWork Day | bool | 
| bRestartLatestOperation | Restart Latest Operation | bool | 
| bRelativeWorkTime | Relative Work Time | bool | 
| bFilterWorkType | Filter Work Type | bool | 
| sPutPositiveNormTimeOnWorkTypeCode | PutPositiveNormTimeOnWorkTypeCode | string | 
| sPutNegativeNormTimeOnWorkTypeCode | PutNegativeNormTimeOnWorkTypeCode | string | 
| bCheckForMissingDates | Check For Missing Dates | bool | 
| bLoginLimitedToAssignedTablets | LoginLimitedToAssignedTablets | bool | 
| nMaxLengthWorkingDay | MaxLengthWorkingDay | Number(double) | 
| bForceGPSOnMobile | Force GPS On Mobile | bool | 
| bAskForLoginTimeSheet | Ask For Login TimeSheet | bool | 
| bTransferTimeSheetDirectlyToJournal | TransferTimeSheetDirectlyToJournal | bool | 
| bShowOnlyAtWorkFromOwnDepartment | ShowOnlyAtWorkFromOwnDepartment | bool | 
| bAskForKm | Ask For Km | bool | 
| bNewJournalLinePerDate | New JournalLine Per Date | bool | 
| bAllowedToAddJob | Allowed To Add Job | bool | 
| bAllowedToAddAbsence | Allowed To Add Absence | bool | 
| bAllowedToAddTime | Allowed To Add Time | bool | 
| bAllowedToEditAbsence | Allowed To Edit Absence | bool | 
| bAllowedToStopJobTime | Allowed To Stop Job Time | bool | 
| bChooseCalendarEveryWeek | Choose Calendar Every Week | bool | 
| sAccessFromWiFiSSID | Access From WiFi SSID | string | 
| bShowExtraPunchOutButton | Show Extra Punch Out Button | bool | 
| bAllowChangePunchOutTime | Allow Change Punch Out Time | bool | 
| bShowEvacuation | Show Evacuation | bool | 
| bVacationInHours | Vacation In Hours | bool | 
| bAllowedToCreateTask | Allowed To Create Task | bool | 
| bAllowedOverlapTimeSheet | Allowed Overlap TimeSheet | bool | 
