Info

Created 12-03-2021 by Lavinia Gheghea

Revision



Description

The API allows you to create, delete, and update  time sheet journal. You can retrieve individual time sheet journal as well as a list of all time sheet journals

Endpoints


GET:  /timesheetjournals?nTimeSheetID=xxxx


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
 nTimeSheetID- required
 Time Sheet ID
 Number(integer)

Curl example

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

Response

200 (OK) :  array of time sheet journals

Response body
[  { "ID": 27, "TimeSheetID": 8, "JobCode": null, "JobDescription": null, "JobOperationLineNumber": 0, "OperationCode": null, "OperationDescription": null, "ActivityCode": null, "ActivityDescription": null, "TaskID": 0, "TaskDescription": null, "WorkTypeCode": "NORMALF", "DimensionCode1": null, "DimensionCode2": null, "DimensionCode3": null, "DimensionCode4": null, "DimensionCode5": null, "DimensionCode6": null, "DimensionCode7": null, "DimensionCode8": null, "DimensionCode9": null, "DimensionCode10": null, "Mon": 2, "Tue": 0, "Wed": 0, "Thu": 0, "Fri": 0, "Sat": 0, "Sun": 0, "TransferToNextWeek": 0, "RemarkMon": "", "RemarkTue": "", "RemarkWed": "", "RemarkThu": "", "RemarkFri": "", "RemarkSat": "", "RemarkSun": "" }, { "ID": 92, "TimeSheetID": 8, "JobCode": "100", "JobDescription": "SmartTID testjob", "JobOperationLineNumber": 10, "OperationCode": "ARBEJDE", "OperationDescription": "Arbejde", "ActivityCode": "FAKTURERBAR", "ActivityDescription": "Fakturerbart", "TaskID": 101, "TaskDescription": "Testopgave", "WorkTypeCode": "NORMALF", "DimensionCode1": null, "DimensionCode2": null, "DimensionCode3": null, "DimensionCode4": null, "DimensionCode5": null, "DimensionCode6": null, "DimensionCode7": null, "DimensionCode8": null, "DimensionCode9": null, "DimensionCode10": null, "Mon": 0, "Tue": 0, "Wed": 0, "Thu": 0, "Fri": 0, "Sat": 0, "Sun": 0, "TransferToNextWeek": 0, "RemarkMon": "", "RemarkTue": "", "RemarkWed": "", "RemarkThu": "", "RemarkFri": "", "RemarkSat": "", "RemarkSun": "" }, { "ID": 93, "TimeSheetID": 8, "JobCode": null, "JobDescription": null, "JobOperationLineNumber": 0, "OperationCode": null, "OperationDescription": null, "ActivityCode": null, "ActivityDescription": null, "TaskID": 0, "TaskDescription": null, "WorkTypeCode": "NORMALF", "DimensionCode1": null, "DimensionCode2": null, "DimensionCode3": null, "DimensionCode4": null, "DimensionCode5": null, "DimensionCode6": null, "DimensionCode7": null, "DimensionCode8": null, "DimensionCode9": null, "DimensionCode10": null, "Mon": 0, "Tue": 0, "Wed": 0, "Thu": 0, "Fri": 0, "Sat": 0, "Sun": 0, "TransferToNextWeek": 0, "RemarkMon": "", "RemarkTue": "", "RemarkWed": "", "RemarkThu": "", "RemarkFri": "", "RemarkSat": "", "RemarkSun": "" }, ]


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} : /timesheetjournals/{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 time sheet journal
 Integer
Curl example

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

Response

200 (OK) : the time sheet journal

Response Body

 { "ID": 93, "TimeSheetID": 8, "JobCode": null, "JobDescription": null, "JobOperationLineNumber": 0, "OperationCode": null, "OperationDescription": null, "ActivityCode": null, "ActivityDescription": null, "TaskID": 0, "TaskDescription": null, "WorkTypeCode": "NORMALF", "DimensionCode1": null, "DimensionCode2": null, "DimensionCode3": null, "DimensionCode4": null, "DimensionCode5": null, "DimensionCode6": null, "DimensionCode7": null, "DimensionCode8": null, "DimensionCode9": null, "DimensionCode10": null, "Mon": 0, "Tue": 0, "Wed": 0, "Thu": 0, "Fri": 0, "Sat": 0, "Sun": 0, "TransferToNextWeek": 0, "RemarkMon": "", "RemarkTue": "", "RemarkWed": "", "RemarkThu": "", "RemarkFri": "", "RemarkSat": "", "RemarkSun": "" }
]

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: /timesheetjournals?nTimeSheetID=xxx


Parameters
 Name
 Description
 Type
 API-key - required
 Authorization Token 
 String(64)
 UID - required
 UID -how can be obtained
 String
 DEVICEID - required
  DEVICEID
 String
 nTimeSheetID - required
 Time Sheet ID
 Number(integer)

Request body
{
"sJobCode": "string",
  "nJobOperationLineNumber": 0,
  "sActivityCode": "string",
  "nTaskID": 0,
  "sWorkTypeCode": "string",
  "sDimensionCode1": "string",
  "sDimensionCode2": "string",
  "sDimensionCode3": "string",
  "sDimensionCode4": "string",
  "sDimensionCode5": "string",
  "sDimensionCode6": "string",
  "sDimensionCode7": "string",
  "sDimensionCode8": "string",
  "sDimensionCode9": "string",
  "sDimensionCode10": "string",
  "nMon": 0,
  "nTue": 0,
  "nWed": 0,
  "nThu": 0,
  "nFri": 0,
  "nSat": 0,
  "nSun": 0,
  "sRemarkMon": "string",
  "sRemarkTue": "string",
  "sRemarkWed": "string",
  "sRemarkThu": "string",
  "sRemarkFri": "string",
  "sRemarkSat": "string",
  "sRemarkSun": "string",
  "bTransferToNextWeek": true
}
Curl example
curl -X POST "https://smartapi.smarttid.dk/timesheetjournals?nTimeSheetID=xxxx" -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 "{\"sJobCode\": \"string\",  \"nJobOperationLineNumber\": 0,  \"sActivityCode\": \"string\",  \"nTaskID\": 0,  \"sWorkTypeCode\": \"string\",  \"sDimensionCode1\": \"string\",  \"sDimensionCode2\": \"string\",  \"sDimensionCode3\": \"string\",  \"sDimensionCode4\": \"string\",  \"sDimensionCode5\": \"string\",  \"sDimensionCode6\": \"string\",  \"sDimensionCode7\": \"string\",  \"sDimensionCode8\": \"string\",  \"sDimensionCode9\": \"string\",  \"sDimensionCode10\": \"string\",  \"nMon\": 0,  \"nTue\": 0,  \"nWed\": 0,  \"nThu\": 0,  \"nFri\": 0,  \"nSat\": 0,  \"nSun\": 0,  \"sRemarkMon\": \"string\",  \"sRemarkTue\": \"string\",  \"sRemarkWed\": \"string\",  \"sRemarkThu\": \"string\",  \"sRemarkFri\": \"string\",  \"sRemarkSat\": \"string\",  \"sRemarkSun\": \"string\",  \"bTransferToNextWeek\": true}"

Response

200 (OK) : The ID of the new time sheet journal

Response Body
[
 {
  "ID": 14
  }
]
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}: /timesheetjournals/{id}?nTimeSheetID=xxxx


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 time sheet journal
 Integer
 nTimeSheetID
 Time Sheet ID
 Integer

Request body
{
"sJobCode": "string",
  "nJobOperationLineNumber": 0,
  "sActivityCode": "string",
  "nTaskID": 0,
  "sWorkTypeCode": "string",
  "sDimensionCode1": "string",
  "sDimensionCode2": "string",
  "sDimensionCode3": "string",
  "sDimensionCode4": "string",
  "sDimensionCode5": "string",
  "sDimensionCode6": "string",
  "sDimensionCode7": "string",
  "sDimensionCode8": "string",
  "sDimensionCode9": "string",
  "sDimensionCode10": "string",
  "nMon": 0,
  "nTue": 0,
  "nWed": 0,
  "nThu": 0,
  "nFri": 0,
  "nSat": 0,
  "nSun": 0,
  "sRemarkMon": "string",
  "sRemarkTue": "string",
  "sRemarkWed": "string",
  "sRemarkThu": "string",
  "sRemarkFri": "string",
  "sRemarkSat": "string",
  "sRemarkSun": "string",
  "bTransferToNextWeek": true
}
Curl example

curl -X PUT "https://smartapi.smarttid.dk/timesheetjournals/id?nTimeSheetID=xxxx" -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 "{\"sJobCode\": \"string\",  \"nJobOperationLineNumber\": 0,  \"sActivityCode\": \"string\",  \"nTaskID\": 0,  \"sWorkTypeCode\": \"string\",  \"sDimensionCode1\": \"string\",  \"sDimensionCode2\": \"string\",  \"sDimensionCode3\": \"string\",  \"sDimensionCode4\": \"string\",  \"sDimensionCode5\": \"string\",  \"sDimensionCode6\": \"string\",  \"sDimensionCode7\": \"string\",  \"sDimensionCode8\": \"string\",  \"sDimensionCode9\": \"string\",  \"sDimensionCode10\": \"string\",  \"nMon\": 0,  \"nTue\": 0,  \"nWed\": 0,  \"nThu\": 0,  \"nFri\": 0,  \"nSat\": 0,  \"nSun\": 0,  \"sRemarkMon\": \"string\",  \"sRemarkTue\": \"string\",  \"sRemarkWed\": \"string\",  \"sRemarkThu\": \"string\",  \"sRemarkFri\": \"string\",  \"sRemarkSat\": \"string\",  \"sRemarkSun\": \"string\",  \"bTransferToNextWeek\": true}"

Response

200 (OK) : success

400 (ERROR) : Error message

Response Body
Error message


DELETE{id}: /timesheetjournals/{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 time sheet journal
 Integer

Curl example

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

Time Sheet Journal 
 Name
 Description
 Type
sJobCode
 Job Code
 String
nJobOperationLineNumber
 Job Operation Line Number
 Number (double)
 sActivityCode
 Activity Code
 String
nTaskID
 Task ID
Number (integer)
 sWorkTypeCode
 Work Type 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
 sDimensionCode6 
Dimension Code 6
String 
 sDimensionCode7 
Dimension Code 7 
String 
 sDimensionCode8 
Dimension Code 8 
 String
 sDimensionCode9 
Dimension Code 9 
 String
 sDimensionCode10 
Dimension Code 10 
String 
 nMon
 Monday
 Number(double)
 nTue
 Tuesday
 Number(double)
 nWed
 Wednesday
 Number(double)
 nThu
Thursday 
Number(double) 
 nFri
Friday 
Number(double) 
 nSat
 Saturday
Number(double) 
 nSun
Sunday 
Number(double) 
 sRemarkMon
 Remark Monday
 String
 sRemarkTue
 Remark Tuesday
 String
 sRemarkWed
 Remark Wednesday
 String
 sRemarkThu
 Remark Thursday
 String
 sRemarkFri
 Remark Friday
 String
 sRemarkSat
 Remark Saturday
 String
 sRemarkSun
 Remark Sunday
 String
 bTransferToNextWeek
 Transfer to  next week
 Bool