Info

Created 08-12-2020 by Lavinia Gheghea

Revision



Description

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

Endpoints


GET:  /journallinejobs


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

Response body

{ "ID": 5049, "JournalLineID": 1469, "JobCode": "101+", "JobDescription": "Test", "JobOperationLineNumber": 10, "OperationCode": "ARBEJDE", "OperationDescription": "Arbejde", "ActivityCode": "", "ActivityDescription": null, "TaskID": null, "ShortDescription": null, "StartTime": "2019-08-23T08:00:00", "EndTime": "2019-08-23T15:00:00", "Time": "1900-01-01T07:00:00", "Remarks": "", "DimensionCode1": "", "DimensionCode2": "", "DimensionCode3": null, "DimensionCode4": null, "DimensionCode5": null, "DimensionCode6": null, "DimensionCode7": null, "DimensionCode8": null, "DimensionCode9": null, "DimensionCode10": 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} : /journallinejobs/{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 journallinejob
 Integer
Curl example

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

Response

200 (OK) : the journallinejob

Response Body
{ "ID": 5049, "JournalLineID": 1469, "JobCode": "101+", "JobDescription": "Test", "JobOperationLineNumber": 10, "OperationCode": "ARBEJDE", "OperationDescription": "Arbejde", "ActivityCode": "", "ActivityDescription": null, "TaskID": null, "ShortDescription": null, "StartTime": "2019-08-23T08:00:00", "EndTime": "2019-08-23T15:00:00", "Time": "1900-01-01T07:00:00", "Remarks": "", "DimensionCode1": "", "DimensionCode2": "", "DimensionCode3": null, "DimensionCode4": null, "DimensionCode5": null, "DimensionCode6": null, "DimensionCode7": null, "DimensionCode8": null, "DimensionCode9": null, "DimensionCode10": 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: /journallinejobs?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
{
"sJobCode": "string",
  "nJobOperationLineNumber": 0,
  "sOperationCode": "string",
  "sActivityCode": "string",
  "nTaskID": 0,
  "dtStartTime": "string",
  "dtEndTime": "string",
  "sRemarks": "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/journallinejobs?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 "{\"sJobCode\": \"string\",  \"nJobOperationLineNumber\": 0,  \"sOperationCode\": \"string\",  \"sActivityCode\": \"string\",  \"nTaskID\": 0,  \"dtStartTime\": \"string\",  \"dtEndTime\": \"string\",  \"sRemarks\": \"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 journallinejob

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}: /journallinejobs/{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 journallinejob
 Integer

Request body


{ 
 "sJobCode": "string",
 "nJobOperationLineNumber": 0,
 "sOperationCode": "string",
 "sActivityCode": "string",
 "nTaskID": 0,
 "dtStartTime": "string",
 "dtEndTime": "string",
 "sRemarks": "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/journallinejobs/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 "{\"sJobCode\": \"string\",  \"nJobOperationLineNumber\": 0,  \"sOperationCode\": \"string\",  \"sActivityCode\": \"string\",  \"nTaskID\": 0,  \"dtStartTime\": \"string\",  \"dtEndTime\": \"string\",  \"sRemarks\": \"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}: /journallinejobs/{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 journallinejob
 Integer

Curl example

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

JournalLineJob
 Name
 Description
 Type
sJobCode
Job Code
 String
nJobOperationLineNumber
Job Operation Line Number
 Double
 sOperationCode
 Operation Code
 String
 sActivityCode
 Activity Code
 String
 nTaskID
 Task ID
 Integer
 dtStartTime
 Start Time
 String
 dtEndTime
 End Time
 String
 sRemarks
 Remarks
 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