Info

Created 27-01-2021 by Lavinia Gheghea

Revision



Description

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

Endpoints


GET:  /joboperationactivities?sJobCode=xxxx&nJobOperationLineNumber=xxxx


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
 sJobCode
 Job Code
 String
nJobOperationLineNumber
 JobOperation Line Number
Number(double)

Curl example

curl -X GET "https://smartapi.smarttid.dk/joboperationactivities?sJobCode=xxxx&nJobOperationLineNumber=xxxx" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response

200 (OK) :  array of job operation activities

Response body

{ "ID": 642, "JobCode": "1TESTCBZQ", "JobOperationLineNumber": 1, "ActivityCode": "TESTAKTIVITET", "Description": "testaktivitet", "ERPReference": "", "Setup": false, "Completed": false, "StartDate": "2024-04-01T00:00:00", "EndDate": "2024-04-2T00:00:00", "ColorCode":"" }, { "ID": 654, "JobCode": "1TESTCBZQ", "JobOperationLineNumber": 1, "ActivityCode": "ABC", "Description": "ABC", "ERPReference": "", "Setup": false, "Completed": false, "StartDate": "2024-03-02T00:00:00", "EndDate": "2024-03-05T00:00:00", "ColorCode":"" } ]


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} : /joboperationactivities/{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 job operation activity
 Integer
Curl example

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

Response

200 (OK) : the job operation activity

Response Body
{ "ID": 654, "JobCode": "1TESTCBZQ", "JobOperationLineNumber": 1, "ActivityCode": "ABC", "Description": "ABC", "ERPReference": "", "Setup": false, "Completed": false, "StartDate": "2024-03-02T00:00:00", "EndDate": "2024-03-06T00:00:00", "ColorCode":"" }
]

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: /joboperationactivities?sJobCode=xxxx&nJobOperationLineNumber=xxxx


Parameters
 Name
 Description
 Type
 API-key - required
  Authorization Token 
 String(64)
 UID - required
 UID -how can be obtained
 String
 DEVICEID - required
 DEVICEID
 String
 sJobCode- required
 Job Code
 String
 nJobOperationLineNumber
 Job Operation Line Number 
 Number(double)

Request body
{
"sActivityCode": "string",
  "sDescription": "string",
  "sERPReference": "string",
  "bSetup": true,
  "bCompleted": true,
  "dtStartDate": "string",
  "dtEndDate": "string",
  "sColorCode": "string"
}

Curl example
curl -X POST "https://smartapi.smarttid.dk/joboperationactivities?sJobCode=xxxx&nJobOperationLineNumber=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 "{\"sActivityCode\": \"string\",  \"sDescription\": \"string\",  \"sERPReference\": \"string\",  \"bSetup\": true,  \"bCompleted\": true,  \"dtStartDate\": \"string\",  \"dtEndDate\": \"string\",  \"sColorCode\": \"string\"}"

Response

200 (OK) : The ID of the new job operation activity

Response Body
[
 {
  "ID": 370      
}
]
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}: /joboperations/{id}?sJobCode=xxxx&nJobOperationLineNumber=xxxx


Parameters
 Name
 Description
 Type
 API-key - required
  Authorization Token
 String(64)
 UID - required
UID -how can be obtained
 String
 DEVICEID - required
 DEVICEID
 String
 sJobCode - required
 Job Code
 String
 nJobOperationLineNumber- required
 Job Operation Line Number
 Number(double)
 id- required
 ID of job operation activity
 Integer

Request body
{
"sActivityCode": "string",
 "sDescription": "string",
 "sERPReference": "string",
 "bSetup": true,
 "bCompleted": true,
 "dtStartDate": "string",
 "dtEndDate": "string",
 "sColorCode": "string"
}


Curl example

curl -X PUT "https://smartapi.smarttid.dk/joboperationactivities/id?sJobCode=xxx&nJobOperationLineNumber=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 "{\"sActivityCode\": \"string\",  \"sDescription\": \"string\",  \"sERPReference\": \"string\",  \"bSetup\": true,  \"bCompleted\": true,  \"dtStartDate\": \"string\",  \"dtEndDate\": \"string\",  \"sColorCode\": \"string\"}"

Response

200 (OK) : success

400 (ERROR) : Error message

Response Body
Error message


DELETE{id}: /joboperationactivities/{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  job operation activity
 Integer

Curl example

curl -X DELETE "https://smartapi.smarttid.dk/joboperationactivities/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
sActivityCode
 Activity Code
 String
sDescription
 Description
 String
 sERPReference
 ERP Reference
 String
 bSetup
 Setup
 Bool
 bCompleted
  Completed
 Bool
dtStartDate
 Start Date
 String 
Input format: yyyy-mm-dd
 dtEndDate
End Date
 String
Input format: yyyy-mm-dd
 sColorCode
 Color Code
 String