Info

Created 22-01-2021 by Lavinia Gheghea

Revision



Description

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

Endpoints


GET:  /journallines


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
 sJournalCode - required
 Journal Code
 String

Curl example

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

Response

200 (OK) :  array of journal lines for journal 

Response body

{ "ID": 5490, "JournalCode": "STANDARD", "Approved": true, "Date": "2020-09-24T00:00:00", "Day": "Tor", "EmployeeCode": "9999", "Name": "SmartTID Testmedarbejder", "WorkCalendarCode": "TESTPOUL2", "TotalTime": "1900-01-01T00:00:00", "BreakTime": "1900-01-01T01:00:00", "ExtraTime": null, "ProductionTime": "1900-01-01T00:00:00", "JobJournal": null, "NormTime": "1900-01-01T07:00:00", "Extra": null, "Entry": "<table class=\"st-reset-table st-child-table\"><thead class=\"bg-green\"><tr><td>{t}Action{/t}</td><td>{t}Work type{/t}</td><td>{t}Start time{/t}</td><td>{t}End time{/t}</td><td>{t}Log start{/t}</td><td>{t}Log end{/t}</td><td>{t}Total time{/t}</td><td>{t}Break time{/t}</td><td>{t}Remarks{/t}</td><td>{t}Work function{/t}</td><td>{t}Department{/t}</td><td>{t}KM start{/t}</td><td>{t}KM end{/t}</td><td>{t}KM total{/t}</td></tr></thead><tr><td><a href=\"#\" data-journallineid=\"5490\" data-id=\"5694\" and onclick=\"EditJournalLineTime.call(this)\">{t}Edit{/t}</a></td><td>NORMAL</td><td>06:00</td><td>11:50</td><td></td><td></td><td></td><td></td><td></td><td></td><td>GERMANY</td><td>12.23</td><td>23.25</td><td>35.36</td><td>BMW</td><td>37</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td><a href=\"#\" data-journallineid=\"5490\" data-id=\"6615\" and onclick=\"EditJournalLineTime.call(this)\">{t}Edit{/t}</a></td><td>FERIEFRI</td><td>11:50</td><td>11:51</td><td></td><td></td><td></td><td></td><td></td><td></td><td>GERMANY</td><td>12.23</td><td>23.25</td><td>35.36</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></tr></table>", "Break": "<table class=\"st-reset-table st-child-table\"><thead class=\"bg-green\"><tr><td>{t}Action{/t}</td><td>{t}Break start{/t}</td><td>{t}Length{/t}</td><td>{t}Relative{/t}</td><td>{t}Paid{/t}</td><td>{t}Break time{/t}</td><td>{t}Remarks{/t}</td></td></tr></thead><tr><td><a href=\"#\" data-journallineid=\"5490\" data-id=\"24051\" and onclick=\"EditJournalLineBreak.call(this)\">{t}Edit{/t}</a></td><td>03:00</td><td>00:30</td><td><i class=\"fa fa-check st-blue\" ></i></td><td></td><td>00:30</td><td></td></tr><tr><td><a href=\"#\" data-journallineid=\"5490\" data-id=\"24053\" and onclick=\"EditJournalLineBreak.call(this)\">{t}Edit{/t}</a></td><td>03:30</td><td>00:10</td><td></td><td></td><td>00:00</td><td></td></tr><tr><td><a href=\"#\" data-journallineid=\"5490\" data-id=\"24052\" and onclick=\"EditJournalLineBreak.call(this)\">{t}Edit{/t}</a></td><td>05:00</td><td>00:30</td><td><i class=\"fa fa-check st-blue\" ></i></td><td></td><td>00:30</td><td></td></tr></table>", "NormalStartTime": "2020-09-24T06:00:00", "NormalEndTime": "2020-09-24T14:00:00", "AttachmentJournalLineExists": false, "AttachmentJobJournalExists": false, "JournalLineEntryRemarkExists": false, "JouralLineEntryRemark": null, "JobJournalRemarkExists": false, "JobJouralRemark": null, "JournalLineEntryGPSExists": false, "StatusCode": false, "Flex": -7, "StatusDescription": "", "HtmlCardContent": "", "PayrollPeriodName": null, "FilterToday": "2021-01-22T00:00:00", "FilterYesterDay": "2021-01-21T00:00:00", "Week": 39, "FilterWeek": 3, "FilterLastWeek": 2, "SearchField": "Tor 24-09-2020 TESTPOUL2 9999 SmartTID TestmedarbejderFERIEFRIGERMANY NORMALGERMANYBMW37" }, { "ID": 1477, "JournalCode": "STANDARD", "Approved": false, "Date": "2019-08-22T00:00:00", "Day": "Tor", "EmployeeCode": "KWS", "Name": "Kent Weel Sørensen", "WorkCalendarCode": "DAG1", "TotalTime": "1900-01-01T07:30:00", "BreakTime": "1900-01-01T00:30:00", "ExtraTime": "00:00", "ProductionTime": "1900-01-01T00:00:00", "JobJournal": null, "NormTime": "1900-01-01T07:30:00", "Extra": null, "Entry": "<table class=\"st-reset-table st-child-table\"><thead class=\"bg-green\"><tr><td>{t}Action{/t}</td><td>{t}Work type{/t}</td><td>{t}Start time{/t}</td><td>{t}End time{/t}</td><td>{t}Log start{/t}</td><td>{t}Log end{/t}</td><td>{t}Total time{/t}</td><td>{t}Break time{/t}</td><td>{t}Remarks{/t}</td><td>{t}Work function{/t}</td><td>{t}Department{/t}</td><td>{t}KM start{/t}</td><td>{t}KM end{/t}</td><td>{t}KM total{/t}</td></tr></thead><tr><td><a href=\"#\" data-journallineid=\"1477\" data-id=\"1556\" and onclick=\"EditJournalLineTime.call(this)\">{t}Edit{/t}</a></td><td>FERIE</td><td>07:00</td><td>15:00</td><td></td><td></td><td>07:30</td><td>00:30</td><td></td><td></td><td>DENMARK</td><td>12.23</td><td>23.25</td><td>35.36</td><td>BMW</td><td>37</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></tr></table>", "Break": "<table class=\"st-reset-table st-child-table\"><thead class=\"bg-green\"><tr><td>{t}Action{/t}</td><td>{t}Break start{/t}</td><td>{t}Length{/t}</td><td>{t}Relative{/t}</td><td>{t}Paid{/t}</td><td>{t}Break time{/t}</td><td>{t}Remarks{/t}</td></td></tr></thead><tr><td><a href=\"#\" data-journallineid=\"1477\" data-id=\"27073\" and onclick=\"EditJournalLineBreak.call(this)\">{t}Edit{/t}</a></td><td>12:00</td><td>00:30</td><td></td><td></td><td>00:30</td><td></td></tr></table>", "NormalStartTime": "2019-08-22T07:00:00", "NormalEndTime": "2019-08-22T15:00:00", "AttachmentJournalLineExists": false, "AttachmentJobJournalExists": false, "JournalLineEntryRemarkExists": false, "JouralLineEntryRemark": null, "JobJournalRemarkExists": false, "JobJouralRemark": null, "JournalLineEntryGPSExists": false, "StatusCode": true, "Flex": 0, "StatusDescription": "", "HtmlCardContent": "", "PayrollPeriodName": null, "FilterToday": "2021-01-22T00:00:00", "FilterYesterDay": "2021-01-21T00:00:00", "Week": 34, "FilterWeek": 3, "FilterLastWeek": 2, "SearchField": "Tor 22-08-2019 DAG1 KWS Kent Weel SørensenFERIEDENMARKBMW37" }, { "ID": 1478, "JournalCode": "STANDARD", "Approved": false, "Date": "2019-08-23T00:00:00", "Day": "Fre", "EmployeeCode": "KWS", "Name": "Kent Weel Sørensen", "WorkCalendarCode": "DAG1", "TotalTime": "1900-01-01T07:00:00", "BreakTime": "1900-01-01T00:30:00", "ExtraTime": "00:00", "ProductionTime": "1900-01-01T00:00:00", "JobJournal": null, "NormTime": "1900-01-01T07:00:00", "Extra": null, "Entry": "<table class=\"st-reset-table st-child-table\"><thead class=\"bg-green\"><tr><td>{t}Action{/t}</td><td>{t}Work type{/t}</td><td>{t}Start time{/t}</td><td>{t}End time{/t}</td><td>{t}Log start{/t}</td><td>{t}Log end{/t}</td><td>{t}Total time{/t}</td><td>{t}Break time{/t}</td><td>{t}Remarks{/t}</td><td>{t}Work function{/t}</td><td>{t}Department{/t}</td><td>{t}KM start{/t}</td><td>{t}KM end{/t}</td><td>{t}KM total{/t}</td></tr></thead><tr><td><a href=\"#\" data-journallineid=\"1478\" data-id=\"1557\" and onclick=\"EditJournalLineTime.call(this)\">{t}Edit{/t}</a></td><td>FERIE</td><td>07:00</td><td>14:30</td><td></td><td></td><td>07:00</td><td>00:30</td><td></td><td></td><td>DENMARK</td><td>12.23</td><td>23.25</td><td>35.36</td><td>BMW</td><td>37</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></tr></table>", "Break": "<table class=\"st-reset-table st-child-table\"><thead class=\"bg-green\"><tr><td>{t}Action{/t}</td><td>{t}Break start{/t}</td><td>{t}Length{/t}</td><td>{t}Relative{/t}</td><td>{t}Paid{/t}</td><td>{t}Break time{/t}</td><td>{t}Remarks{/t}</td></td></tr></thead><tr><td><a href=\"#\" data-journallineid=\"1478\" data-id=\"27076\" and onclick=\"EditJournalLineBreak.call(this)\">{t}Edit{/t}</a></td><td>12:00</td><td>00:30</td><td></td><td></td><td>00:30</td><td></td></tr></table>", "NormalStartTime": "2019-08-23T07:00:00", "NormalEndTime": "2019-08-23T14:30:00", "AttachmentJournalLineExists": false, "AttachmentJobJournalExists": false, "JournalLineEntryRemarkExists": false, "JouralLineEntryRemark": null, "JobJournalRemarkExists": false, "JobJouralRemark": null, "JournalLineEntryGPSExists": false, "StatusCode": true, "Flex": 0, "StatusDescription": "", "HtmlCardContent": "", "PayrollPeriodName": null, "FilterToday": "2021-01-22T00:00:00", "FilterYesterDay": "2021-01-21T00:00:00", "Week": 34, "FilterWeek": 3, "FilterLastWeek": 2, "SearchField": "Fre 23-08-2019 DAG1 KWS Kent Weel SørensenFERIEDENMARKBMW37" }, ]


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} : /journallines/{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 journalline
 Integer
Curl example

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

Response

200 (OK) : the journalline

Response Body
[  { "ID": 5490, "JournalCode": "STANDARD", "Approved": true, "Date": "2020-09-24T00:00:00", "Day": "Tor", "EmployeeCode": "9999", "Name": "SmartTID Testmedarbejder", "WorkCalendarCode": "TESTPOUL2", "TotalTime": "1900-01-01T00:00:00", "BreakTime": "1900-01-01T01:00:00", "ExtraTime": null, "ProductionTime": "1900-01-01T00:00:00", "JobJournal": null, "NormTime": "1900-01-01T07:00:00", "Extra": null, "Entry": "<table class=\"st-reset-table st-child-table\"><thead class=\"bg-green\"><tr><td>{t}Action{/t}</td><td>{t}Work type{/t}</td><td>{t}Start time{/t}</td><td>{t}End time{/t}</td><td>{t}Log start{/t}</td><td>{t}Log end{/t}</td><td>{t}Total time{/t}</td><td>{t}Break time{/t}</td><td>{t}Remarks{/t}</td><td>{t}Work function{/t}</td><td>{t}Department{/t}</td><td>{t}KM start{/t}</td><td>{t}KM end{/t}</td><td>{t}KM total{/t}</td></tr></thead><tr><td><a href=\"#\" data-journallineid=\"5490\" data-id=\"5694\" and onclick=\"EditJournalLineTime.call(this)\">{t}Edit{/t}</a></td><td>NORMAL</td><td>06:00</td><td>11:50</td><td></td><td></td><td></td><td></td><td></td><td></td><td>GERMANY</td><td>12.23</td><td>23.25</td><td>35.36</td><td>BMW</td><td>37</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td><a href=\"#\" data-journallineid=\"5490\" data-id=\"6615\" and onclick=\"EditJournalLineTime.call(this)\">{t}Edit{/t}</a></td><td>FERIEFRI</td><td>11:50</td><td>11:51</td><td></td><td></td><td></td><td></td><td></td><td></td><td>GERMANY</td><td>12.23</td><td>23.25</td><td>35.36</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></tr></table>", "Break": "<table class=\"st-reset-table st-child-table\"><thead class=\"bg-green\"><tr><td>{t}Action{/t}</td><td>{t}Break start{/t}</td><td>{t}Length{/t}</td><td>{t}Relative{/t}</td><td>{t}Paid{/t}</td><td>{t}Break time{/t}</td><td>{t}Remarks{/t}</td></td></tr></thead><tr><td><a href=\"#\" data-journallineid=\"5490\" data-id=\"24051\" and onclick=\"EditJournalLineBreak.call(this)\">{t}Edit{/t}</a></td><td>03:00</td><td>00:30</td><td><i class=\"fa fa-check st-blue\" ></i></td><td></td><td>00:30</td><td></td></tr><tr><td><a href=\"#\" data-journallineid=\"5490\" data-id=\"24053\" and onclick=\"EditJournalLineBreak.call(this)\">{t}Edit{/t}</a></td><td>03:30</td><td>00:10</td><td></td><td></td><td>00:00</td><td></td></tr><tr><td><a href=\"#\" data-journallineid=\"5490\" data-id=\"24052\" and onclick=\"EditJournalLineBreak.call(this)\">{t}Edit{/t}</a></td><td>05:00</td><td>00:30</td><td><i class=\"fa fa-check st-blue\" ></i></td><td></td><td>00:30</td><td></td></tr></table>", "NormalStartTime": "2020-09-24T06:00:00", "NormalEndTime": "2020-09-24T14:00:00", "AttachmentJournalLineExists": false, "AttachmentJobJournalExists": false, "JournalLineEntryRemarkExists": false, "JouralLineEntryRemark": null, "JobJournalRemarkExists": false, "JobJouralRemark": null, "JournalLineEntryGPSExists": false, "StatusCode": false, "Flex": -7, "StatusDescription": "", "HtmlCardContent": "", "PayrollPeriodName": null, "FilterToday": "2021-01-22T00:00:00", "FilterYesterDay": "2021-01-21T00:00:00", "Week": 39, "FilterWeek": 3, "FilterLastWeek": 2, "SearchField": "Tor 24-09-2020 TESTPOUL2 9999 SmartTID TestmedarbejderFERIEFRIGERMANY NORMALGERMANYBMW37" } ]


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: /journallines


Parameters
 Name
 Description
 Type
 API-key - required
  Authorization Token  
 String(64)
 UID - required
 UID -how can be obtained
 String
 DEVICEID - required
  DEVICEID
 String
 sJournalCode -required
 Journal Code
 String

Request body
{
"bApproved": true,
  "dtDate": "string",
  "sEmployeeCode": "string",
  "sWorkCalendarCode": "string"
}

Curl example
curl -X POST "https://smartapi.smarttid.dk/journallines?sJournalCode=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 {\"bApproved\": true, \"dtDate\": \"string\", \"sEmployeeCode\": \"string\", \"sWorkCalendarCode\": \"string\"}"

Response

200 (OK) : The ID of the new journalline

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}: /journallines/{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 journalline
 Integer
 sJournalCode - required
 Journal Code
 String

Request body

{ 
"bApproved": true, 
"dtDate": "string", 
"sEmployeeCode": "string", 
"sWorkCalendarCode": "string"
}


Curl example

curl -X PUT "https://smartapi.smarttid.dk/journallines/id?sJournalCode=XXXX/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 {\"bApproved\": true, \"dtDate\": \"string\", \"sEmployeeCode\": \"string\", \"sWorkCalendarCode\": \"string\"}"

Response

200 (OK) : success

400 (ERROR) : Error message

Response Body
Error message


DELETE{id}: /journallines/{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 journalline
 Integer

Curl example

curl -X DELETE "https://smartapi.smarttid.dk/journallines/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
bApproved
Approved
Bool
dtDate
Date
String
sEmployeeCode
 EmployeeCode
String
sWorkCalendarCode
 Work Calendar Code
String