Info

Created 07-12-2020 by Lavinia Gheghea

Revision



Description

The API allows you to create, delete, and update  journal line entry. You can retrieve individual journal line entry as well as a list of all journal line entrys.

Endpoints


GET:  /journallineentrys


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
 nJournalLineID
 Journal Line ID
 Integer

Curl example

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

Response

200 (OK) :  array of journallineentrys

Response body

{ "ID": 1556, "JournalLineID": 1477, "WorkTypeCode": "FERIE", "StartTime": "2019-08-22T07:00:00", "EndTime": "2019-08-22T15:00:00", "CalculateBreak": true, "CalculateExtra": true, "LogStart": null, "LogEnd": null, "TotalTime": "1900-01-01T07:30:00", "BreakTime": "1900-01-01T00:30:00", "Remarks": "", "DepartmentCode": "DENMARK", "WorkFunctionCode": "", "DimensionCode1": "BMW", "DimensionCode2": "37", "DimensionCode3": "", "DimensionCode4": "", "DimensionCode5": "", "DimensionCode6": "", "DimensionCode7": "", "DimensionCode8": "", "DimensionCode9": null, "DimensionCode10": null, "KMStart": 12.23, "KMEnd": 23.25, "KMTotal": 35.36 } ]

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":x,"totalFiltered":x,"Offset":0,"Limit":x,"Returned":x} 
 x-powered-by: ASP.NET 

400 (ERROR) : Error message

Response Body
Error message


GET{id} : /journallineentrys/{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 journallineentry
 Integer
Curl example

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

Response

200 (OK) : the journallineentry

Response Body
{ "ID": 1556, "JournalLineID": 1477, "WorkTypeCode": "FERIE", "StartTime": "2019-08-22T07:00:00", "EndTime": "2019-08-22T15:00:00", "CalculateBreak": true, "CalculateExtra": true, "LogStart": null, "LogEnd": null, "TotalTime": "1900-01-01T07:30:00", "BreakTime": "1900-01-01T00:30:00", "Remarks": "", "DepartmentCode": "DENMARK", "WorkFunctionCode": "", "DimensionCode1": "BMW", "DimensionCode2": "37", "DimensionCode3": "", "DimensionCode4": "", "DimensionCode5": "", "DimensionCode6": "", "DimensionCode7": "", "DimensionCode8": "", "DimensionCode9": null, "DimensionCode10": null, "KMStart": 12.23, "KMEnd": 23.25, "KMTotal": 35.36 }
]

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: /journallineentrys?nJournalLineID=XXXX


Parameters
 Name
 Description
 Type
 API-key - required
 Authorization Token 
 String(64)
 UID - required
 UID -how can be obtained
 String
 DEVICEID - required
 DEVICEID
 String
 nJournalLineID-required
 Journal Line ID
 Integer

Request body
{
 "dtStartTime": "string",
  "dtEndTime": "string",
  "sWorkTypeCode": "string",
  "bCalculateBreak": true,
  "bCalculateExtra": true,
  "sRemarks": "string",
  "sDepartmentCode": "string",
  "sWorkFunctionCode": "string",
  "sDimensionCode1": "string",
  "sDimensionCode2": "string",
  "sDimensionCode3": "string",
  "sDimensionCode4": "string",
  "sDimensionCode5": "string",
  "sDimensionCode6": "string",
  "sDimensionCode7": "string",
  "sDimensionCode8": "string",
  "sDimensionCode9": "string",
  "sDimensionCode10": "string",
  "nKMStart": 0,
  "nKMEnd": 0,
  "nKMTotal": 0
}

Curl example
curl -X POST "https://smartapi.smarttid.dk/journallineentrys?nJournalLineID=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 "{ \"dtStartTime\": \"string\", \"dtEndTime\": \"string\", \"sWorkTypeCode\": \"string\", \"bCalculateBreak\": true, \"bCalculateExtra\": true, \"sRemarks\": "string", \"sDepartmentCode\": \"string\", \"sWorkFunctionCode\": \"string\", \"sDimensionCode1\": \"string\", \"sDimensionCode2\": \"string\", \"sDimensionCode3\": \"string\", \"sDimensionCode4\": \"string\", \"sDimensionCode5\": \"string\", \"sDimensionCode6\": \"string\", \"sDimensionCode7\": \"string\", \"sDimensionCode8\": \"string\", \"sDimensionCode9\": \"string\", \"sDimensionCode10\": \"string\", \"nKMStart\": 0, \"nKMEnd\": 0, \"nKMTotal\": 0 }"

Response

200 (OK) : The ID of the new journallineentry

Response Body
[
 {
  "ID": 25033
 }
]
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}: /journallineentrys/{id}?nJournalLineID=XXXX


Parameters
 Name
 Description
 Type
 API-key - required
 Authorization Token
 String(64)
 UID - required
UID -how can be obtained
 String
 DEVICEID - required
DEVICEID
 String
 nJournalLineID- required
 Journal Line ID
 Integer
 id- required
 ID of journallineentry
 Integer

Request body


{ 
 "dtStartTime": "string", 
"dtEndTime": "string", 
"sWorkTypeCode": "string", 
"bCalculateBreak": true, 
"bCalculateExtra": true, 
"sRemarks": "string", 
"sDepartmentCode": "string", 
"sWorkFunctionCode": "string", 
"sDimensionCode1": "string", 
"sDimensionCode2": "string", 
"sDimensionCode3": "string", 
"sDimensionCode4": "string", 
"sDimensionCode5": "string", 
"sDimensionCode6": "string", 
"sDimensionCode7": "string", 
"sDimensionCode8": "string", 
"sDimensionCode9": "string", 
"sDimensionCode10": "string", 
"nKMStart": 0, 
"nKMEnd": 0, 
"nKMTotal": 0 
}



Curl example

curl -X PUT "https://smartapi.smarttid.dk/journallineentrys/id?nJournalLineID=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 "{ \"dtStartTime\": \"string\", \"dtEndTime\": \"string\", \"sWorkTypeCode\": \"string\", \"bCalculateBreak\": true, \"bCalculateExtra\": true, \"sRemarks\": "string", \"sDepartmentCode\": \"string\", \"sWorkFunctionCode\": \"string\", \"sDimensionCode1\": \"string\", \"sDimensionCode2\": \"string\", \"sDimensionCode3\": \"string\", \"sDimensionCode4\": \"string\", \"sDimensionCode5\": \"string\", \"sDimensionCode6\": \"string\", \"sDimensionCode7\": \"string\", \"sDimensionCode8\": \"string\", \"sDimensionCode9\": \"string\", \"sDimensionCode10\": \"string\", \"nKMStart\": 0, \"nKMEnd\": 0, \"nKMTotal\": 0 }"

Response

200 (OK) : success

400 (ERROR) : Error message

Response Body
Error message


DELETE{id}: /journallineentrys/{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 journallineentry
 Integer

Curl example

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

JournalLineEntry
 Name
 Description
 Type
dtStartTime
Start Time
 String
dtEndTime
End Time
 String
 sWorkTypeCode
 WorkType Code
 String
 bCalculateBreak
 Calculate Break
 Bool
 bCalculateExtra
 Calculate Extra
 Bool
 sRemarks
 Remarks
 String
 sDepartmentCode
 DepartmentCode
 String
 sWorkFunctionCode
 WorkFunction 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
 nKMStart
 KM Start
 Double
 nKMEnd
 KM End
 Double
 nKMTotal
 KM Total
 Double