Info

Created 22-09-2020 by Lavinia Gheghea

Revision



Description

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

Endpoints


GET:  /changejournallines


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
 sJournalCode - required
 Journal code
 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

Curl example

curl -X GET "https://smartapi.smarttid.dk/changejournallines?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 changejournallines

Response body


{ "ID": 63, "Date": "2019-09-27T00:00:00", "EmployeeCode": "1000", "Name": "Poul Christensen", "WorkCalendarCode": "DAG1", "DepartmentCode": "DENMARK", "WorkTypeCode": "", "Hours": -0.01, "Remark": "", "DimensionCode1": "BMW", "DimensionCode2": "37", "DimensionCode3": null, "DimensionCode4": null, "DimensionCode5": null, "DimensionCode6": null, "DimensionCode7": null, "DimensionCode8": null, "DimensionCode9": null, "DimensionCode10": null, "Approved": false },
]


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} : /changejournallines/{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 changejournalline
 Integer
Curl example

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

Response

200 (OK) : the changejournalline

Response Body

 { "ID": 63, "Date": "2019-09-27T00:00:00", "EmployeeCode": "1000", "Name": "Poul Christensen", "WorkCalendarCode": "DAG1", "DepartmentCode": "DENMARK", "WorkTypeCode": "", "Hours": -0.01, "Remark": "", "DimensionCode1": "BMW", "DimensionCode2": "37", "DimensionCode3": null, "DimensionCode4": null, "DimensionCode5": null, "DimensionCode6": null, "DimensionCode7": null, "DimensionCode8": null, "DimensionCode9": null, "DimensionCode10": null, "Approved": false }
]

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


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

Request body

{ "bApproved": true, "dtDate": "string", "sEmployeeCode": "string", "sWorkCalendarCode": "string", "sDepartmentCode": "string", "sWorkTypeCode": "string", "nHours": 0, "sRemark": "string", "sDimensionCode1": "string", "sDimensionCode2": "string", "sDimensionCode3": "string", "sDimensionCode4": "string", "sDimensionCode5": "string", "sDimensionCode6": "string", "sDimensionCode7": "string", "sDimensionCode8": "string", "sDimensionCode9": "string", "sDimensionCode10": "string" }


Curl example
curl -X POST "https://smartapi.smarttid.dk/changejournallines?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\", \"sDepartmentCode\": \"string\", \"sWorkTypeCode\": \"string\", \"nHours\": 0, \"sRemark\": \"string\", \"sDimensionCode1\": \"string\", \"sDimensionCode2\": \"string\", \"sDimensionCode3\": \"string\", \"sDimensionCode4\": \"string\", \"sDimensionCode5\": \"string\", \"sDimensionCode6\": \"string\", \"sDimensionCode7\": \"string\", \"sDimensionCode8\": \"string\", \"sDimensionCode9\": \"string\", \"sDimensionCode10\": \"string\" }"

Response

200 (OK) : The ID of the new changejournalline

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

Request body
{
  "bApproved": true,
  "dtDate": "string",
  "sEmployeeCode": "string",
  "sWorkCalendarCode": "string",
  "sDepartmentCode": "string",
  "sWorkTypeCode": "string",
  "nHours": 0,
  "sRemark": "string",
  "sDimensionCode1": "string",
  "sDimensionCode2": "string",
  "sDimensionCode3": "string",
  "sDimensionCode4": "string",
  "sDimensionCode5": "string",
  "sDimensionCode6": "string",
  "sDimensionCode7": "string",
  "sDimensionCode8": "string",
  "sDimensionCode9": "string",
  "sDimensionCode10": "string"
}
Curl example

curl -X PUT "https://smartapi.smarttid.dk/changejournallines/id?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\", \"sDepartmentCode\": \"string\", \"sWorkTypeCode\": \"string\", \"nHours\": 0, \"sRemark\": \"string\", \"sDimensionCode1\": \"string\", \"sDimensionCode2\": \"string\", \"sDimensionCode3\": \"string\", \"sDimensionCode4\": \"string\", \"sDimensionCode5\": \"string\", \"sDimensionCode6\": \"string\", \"sDimensionCode7\": \"string\", \"sDimensionCode8\": \"string\", \"sDimensionCode9\": \"string\", \"sDimensionCode10\": \"string\" }"

Response

200 (OK) : success

400 (ERROR) : Error message

Response Body
Error message


DELETE{id}: /changejournallines/{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 changejournalline
 Integer

Curl example

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

Change Journal Line
 Name
 Description
 Type
bApproved
 Approved
 bool
dtDate
 Date
 String
 sEmployeeCode
 Employee Code
 String
 sWorkCalendarCode
 WorkCalendar Code
 String
 sDepartmentCode
 Department Code
 String
 sWorkTypeCode
 WorkType Code
 String
 nHours
 Hours
 double
 sRemark
 Remark
 String
 sDimensionCode1
 DimensionCode1
 String
 sDimensionCode2
 DimensionCode2
 String
 sDimensionCode3
 DimensionCode3
 String
 sDimensionCode4
 DimensionCode4
 String
 sDimensionCode5
 DimensionCode5
 String
 sDimensionCode6
 DimensionCode6
 String
 sDimensionCode7
 DimensionCode7
 String
 sDimensionCode8
 DimensionCode8
 String
 sDimensionCode9
 DimensionCode9
 String
 sDimensionCode10
 DimensionCode10
 String