Info

Created 08-12-2020 by Lavinia Gheghea

Revision



Description

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

Endpoints


GET:  /journallineextras


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

Response body

{ "ID": 6653, "JournalLineID": 2482, "StartTime": "2020-04-20T07:30:00", "EndTime": "2020-04-20T02:00:00", "Relative": true, "RelativeFrom": null, "RelativeTo": null, "WorkTypeCode": "OVERTID1", "ExtraTime": "00:30", "FixedValue": 0, "Remark": null } ]

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} : /journallineextras/{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 journallineextra
 Integer
Curl example

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

Response

200 (OK) : the journallineextra

Response Body
{ "ID": 6653, "JournalLineID": 2482, "StartTime": "2020-04-20T07:30:00", "EndTime": "2020-04-20T02:00:00", "Relative": true, "RelativeFrom": null, "RelativeTo": null, "WorkTypeCode": "OVERTID1", "ExtraTime": "00:30", "FixedValue": 0, "Remark": null }
]

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: /journallineextras?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",
  "bRelative": true,
  "sWorkTypeCode": "string",
  "dtRelativeFrom": "string",
  "dtRelativeTo": "string",
  "nFixedValue": 0,
  "sRemark": "string"
}

Curl example
curl -X POST "https://smartapi.smarttid.dk/journallineextras?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\", \"bRelative\": true, \"sWorkTypeCode\": \"string\", \"dtRelativeFrom\": \"string\", \"dtRelativeTo\": \"string\", \"nFixedValue\": 0, \"sRemark\": \"string\" }"

Response

200 (OK) : The ID of the new journallineextra

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}: /journallineextras/{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 journallineextra
 Integer

Request body


{ 
 "dtStartTime": "string", 
"dtEndTime": "string", 
"bRelative": true, 
"sWorkTypeCode": "string", 
"dtRelativeFrom": "string", 
"dtRelativeTo": "string", 
"nFixedValue": 0, 
"sRemark": "string"
}



Curl example

curl -X PUT "https://smartapi.smarttid.dk/journallineextras/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\", \"bRelative\": true, \"sWorkTypeCode\": \"string\", \"dtRelativeFrom\": \"string\", \"dtRelativeTo\": \"string\", \"nFixedValue\": 0, \"sRemark\": \"string\" }"

Response

200 (OK) : success

400 (ERROR) : Error message

Response Body
Error message


DELETE{id}: /journallineextras/{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 journallineextra
 Integer

Curl example

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

JournalLineExtra
 Name
 Description
 Type
dtStartTime
Start Time
 String
dtEndTime
End Time
 String
 bRelative
 Relative
 Bool
 sWorkTypeCode
 WorkType Code
 String
 dtRelativeFrom
 Relative From
 String
 dtRelativeTo
 Relative To
 String
 nFixedValue
 Fixed Value
 Double
 sRemarks
 Remarks
 String