Info

Created 07-12-2020 by Lavinia Gheghea

Revision



Description

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

Endpoints


GET:  /journallinebreaks


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/journallinebreaks?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 journallinebreaks

Response body

{ "ID": 27073, "JournalLineID": 1477, "PauseStart": "2019-08-22T12:00:00", "Length": "1900-01-01T00:30:00", "Paid": false, "Relative": false, "BreakTime": "1900-01-01T00:30:00" } ]

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} : /journallinebreaks/{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 journallinebreak
 Integer
Curl example

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

Response

200 (OK) : the journallinebreak

Response Body

 { "ID": 27073, "JournalLineID": 1477, "PauseStart": "2019-08-22T12:00:00", "Length": "1900-01-01T00:30:00", "Paid": false, "Relative": false, "BreakTime": "1900-01-01T00:30:00" }
]

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: /journallinebreaks?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
{
 "dtPauseStart": "string",
  "dtLength": "string",
  "bPaid": true,
  "bRelative": true
}

Curl example
curl -X POST "https://smartapi.smarttid.dk/journallinebreaks?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 "{\"dtPauseStart\":\"string\",\"sdtLength\":\"string\",\"bPaid\":true,\"bRelative\":true}"

Response

200 (OK) : The ID of the new journallinebreak

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}: /journallinebreaks/{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 journallinebreak
 Integer

Request body
{ 
 "dtPauseStart": "string", 
"dtLength": "string", 
"bPaid": true, 
"bRelative": true 
}

Curl example

curl -X PUT "https://smartapi.smarttid.dk/journallinebreaks/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 "{\"dtPauseStart\":\"string\",\"sdtLength\":\"string\",\"bPaid\":true,\"bRelative\":true}"

Response

200 (OK) : success

400 (ERROR) : Error message

Response Body
Error message


DELETE{id}: /journallinebreaks/{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 journallinebreak
 Integer

Curl example

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

JournalLineBreak
 Name
 Description
 Type
dtPauseStart
 Pause Start
 String
dtLength
 Length(minutes)
 String
 bPaid
 Paid
 Bool
 bRelative
 Relative
 Bool