Info
Created 18-11-2020 by Lavinia
Gheghea
Revision
Description
The API
allows you to create, delete,
and update jobs.
You can retrieve individual job as well as a list
of all jobs.
Endpoints
GET: /jobs
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 |
sPageName | Page Name | String |
nRefID | Ref ID | Integer |
sStatus | Status of the job | String |
Curl example
curl -X GET "https://smartapi.smarttid.dk/jobs" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Response
200 (OK) : array of jobs
Response body
[{ "ID": 1127, "JobCode": "1TESTCBZQ", "JobDescription": "1testcbzq", "JobDescription2": "", "PlannedStartDate": null, "PlannedCompletionDate": null, "Status": "Template", "StartedDate": null, "CompletedDate": null, "StartedBy": null, "CompletedBy": null, "CreatedBy": "", "JobTemplate": "", "JobGroupCode": "TESTJOBGRUPPE", "PlannedNumber": null, "NumberPerContainer": null, "OrderCode": null, "Date": null, "PlannedDeliveryDate": null, "ActualDeliveryDate": null, "DepartmentCode": "TESTAFDELING", "ProductCode": "", "PrintID": null, "CustomerCode": null, "Reference": "", "Color": null, "ColorGroupCode": null, "Remark": "", "MaterialsRecieved": false, "ReadyToShip": false, "ExpectedMaterialDeliveryDate": null, "Invoiced": false, "IndirectTime": false, "DeliveryAddressCode": null, "Printed": false, "Drawing": null, "Quality": null, "ManagerCode": null, "DistrictCode": null }, { "ID": 1131, "JobCode": "2TESTCBZQ", "JobDescription": "2testcbzq", "JobDescription2": "", "PlannedStartDate": null, "PlannedCompletionDate": null, "Status": "Template", "StartedDate": "2020-09-03T00:00:00", "CompletedDate": null, "StartedBy": "smarttid", "CompletedBy": null, "CreatedBy": "", "JobTemplate": "", "JobGroupCode": "TESTJOBGRUPPE", "PlannedNumber": null, "NumberPerContainer": null, "OrderCode": null, "Date": null, "PlannedDeliveryDate": null, "ActualDeliveryDate": null, "DepartmentCode": "TESTAFDELING", "ProductCode": "", "PrintID": null, "CustomerCode": null, "Reference": "", "Color": null, "ColorGroupCode": null, "Remark": "", "MaterialsRecieved": false, "ReadyToShip": false, "ExpectedMaterialDeliveryDate": null, "Invoiced": false, "IndirectTime": false, "DeliveryAddressCode": null, "Printed": false, "Drawing": null, "Quality": null, "ManagerCode": null, "DistrictCode": null }, { "ID": 1116, "JobCode": "30042020CBZQ", "JobDescription": "30042020cbzq", "JobDescription2": "", "PlannedStartDate": null, "PlannedCompletionDate": null, "Status": "Started", "StartedDate": "2020-07-09T00:00:00", "CompletedDate": null, "StartedBy": "smarttid", "CompletedBy": null, "CreatedBy": "", "JobTemplate": "", "JobGroupCode": "1", "PlannedNumber": null, "NumberPerContainer": null, "OrderCode": null, "Date": null, "PlannedDeliveryDate": null, "ActualDeliveryDate": null, "DepartmentCode": "DENMARK", "ProductCode": "", "PrintID": null, "CustomerCode": null, "Reference": "", "Color": null, "ColorGroupCode": null, "Remark": "", "MaterialsRecieved": false, "ReadyToShip": false, "ExpectedMaterialDeliveryDate": null, "Invoiced": false, "IndirectTime": false, "DeliveryAddressCode": null, "Printed": false, "Drawing": null, "Quality": null, "ManagerCode": null, "DistrictCode": 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} : /jobs/{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 | Integer |
Curl example
curl -X GET "https://smartapi.smarttid.dk/jobs/id" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Response
200 (OK) : the xxx
Response Body
[ { "ID": 1116, "JobCode": "30042020CBZQ", "JobDescription": "30042020cbzq", "JobDescription2": "", "PlannedStartDate": null, "PlannedCompletionDate": null, "Status": "Started", "StartedDate": "2020-07-09T00:00:00", "CompletedDate": null, "StartedBy": "smarttid", "CompletedBy": null, "CreatedBy": "", "JobTemplate": "", "JobGroupCode": "1", "PlannedNumber": null, "NumberPerContainer": null, "OrderCode": null, "Date": null, "PlannedDeliveryDate": null, "ActualDeliveryDate": null, "DepartmentCode": "DENMARK", "ProductCode": "", "PrintID": null, "CustomerCode": null, "Reference": "", "Color": null, "ColorGroupCode": null, "Remark": "", "MaterialsRecieved": false, "ReadyToShip": false, "ExpectedMaterialDeliveryDate": null, "Invoiced": false, "IndirectTime": false, "DeliveryAddressCode": null, "Printed": false, "Drawing": null, "Quality": null, "ManagerCode": null, "DistrictCode": 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: /jobs
Parameters
Name | Description | Type |
API-key - required | Authorization Token | String(64) |
UID - required | UID -how can be obtained | String |
DEVICEID - required | DEVICEID | String |
Request body
{ "sJobCode": "string", "sJobDescription": "string", "sJobDescription2": "string", "dtPlannedStartDate": "string", "dtPlannedCompletionDate": "string", "sStatus": "string", "dtStartedDate": "string", "dtCompletedDate": "string", "sStartedBy": "string", "sCompletedBy": "string", "sCreatedBy": "string", "sJobTemplate": "string", "sJobGroupCode": "string", "nPlannedNumber": 0, "nNumberPerContainer": 0, "sOrderCode": "string", "dtDate": "string", "dtPlannedDeliveryDate": "string", "dtActualDeliveryDate": "string", "sDepartmentCode": "string", "sProductCode": "string", "sPrintID": "string", "sCustomerCode": "string", "sReference": "string", "sColor": "string", "sColorGroupCode": "string", "sRemark": "string", "bMaterialsRecieved": true, "bReadyToShip": true, "dtExpectedMaterialDeliveryDate": "string", "bInvoiced": true, "bIndirectTime": true, "sDeliveryAddressCode": "string", "bPrinted": true, "sDrawing": "string", "sQuality": "string", "sManagerCode": "string", "sDistrictCode": "string" }
Curl example
curl -X POST "https://smartapi.smarttid.dk/jobs" -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\", \"sJobDescription\": \"string\", \"sJobDescription2\": \"string\", \"dtPlannedStartDate\": \"string\", \"dtPlannedCompletionDate\": \"string\", \"sStatus\": \"string\",\"dtStartedDate\": \"string\", \"dtCompletedDate\": \"string\", \"sStartedBy\": \"string\",\"sCompletedBy\": \"string\", \"sCreatedBy\": \"string\", \"sJobTemplate\": \"string\", \"sJobGroupCode\": \"string\", \"nPlannedNumber\": 0, \"nNumberPerContainer\": 0, \"sOrderCode\": \"string\", \"dtDate\": \"string\", \"dtPlannedDeliveryDate\": \"string\", \"dtActualDeliveryDate\": \"string\", \"sDepartmentCode\": \"string\", \"sProductCode\": \"string\", \"sPrintID\": \"string\", \"sCustomerCode\": \"string\", \"sReference\": \"string\", \"sColor\": \"string\", \"sColorGroupCode\": \"string\", \"sRemark\": \"string\", \"bMaterialsRecieved\": true, \"bReadyToShip\": true, \"dtExpectedMaterialDeliveryDate\": \"string\", \"bInvoiced\": true, \"bIndirectTime\": true, \"sDeliveryAddressCode\": \"string\", \"bPrinted\": true, \"sDrawing\": \"string\", \"sQuality\": \"string\", \"sManagerCode\": \"string\", \"sDistrictCode\": \"string\"}"
Response
200 (OK) : The ID of the new job
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}: /jobs/{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 | Integer |
Request body
{ "sJobCode": "string", "sJobDescription": "string", "sJobDescription2": "string", "dtPlannedStartDate": "string", "dtPlannedCompletionDate": "string", "sStatus": "string", "dtStartedDate": "string", "dtCompletedDate": "string", "sStartedBy": "string", "sCompletedBy": "string", "sCreatedBy": "string", "sJobTemplate": "string", "sJobGroupCode": "string", "nPlannedNumber": 0, "nNumberPerContainer": 0, "sOrderCode": "string", "dtDate": "string", "dtPlannedDeliveryDate": "string", "dtActualDeliveryDate": "string", "sDepartmentCode": "string", "sProductCode": "string", "sPrintID": "string", "sCustomerCode": "string", "sReference": "string", "sColor": "string", "sColorGroupCode": "string", "sRemark": "string", "bMaterialsRecieved": true, "bReadyToShip": true, "dtExpectedMaterialDeliveryDate": "string", "bInvoiced": true, "bIndirectTime": true, "sDeliveryAddressCode": "string", "bPrinted": true, "sDrawing": "string", "sQuality": "string", "sManagerCode": "string", "sDistrictCode": "string" }
Curl example
curl -X PUT "https://smartapi.smarttid.dk/jobs/id" -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\", \"sJobDescription\": \"string\", \"sJobDescription2\": \"string\", \"dtPlannedStartDate\": \"string\", \"dtPlannedCompletionDate\": \"string\", \"sStatus\": \"string\",\"dtStartedDate\": \"string\", \"dtCompletedDate\": \"string\", \"sStartedBy\": \"string\",\"sCompletedBy\": \"string\", \"sCreatedBy\": \"string\", \"sJobTemplate\": \"string\", \"sJobGroupCode\": \"string\", \"nPlannedNumber\": 0, \"nNumberPerContainer\": 0, \"sOrderCode\": \"string\", \"dtDate\": \"string\", \"dtPlannedDeliveryDate\": \"string\", \"dtActualDeliveryDate\": \"string\", \"sDepartmentCode\": \"string\", \"sProductCode\": \"string\", \"sPrintID\": \"string\", \"sCustomerCode\": \"string\", \"sReference\": \"string\", \"sColor\": \"string\", \"sColorGroupCode\": \"string\", \"sRemark\": \"string\", \"bMaterialsRecieved\": true, \"bReadyToShip\": true, \"dtExpectedMaterialDeliveryDate\": \"string\", \"bInvoiced\": true, \"bIndirectTime\": true, \"sDeliveryAddressCode\": \"string\", \"bPrinted\": true, \"sDrawing\": \"string\", \"sQuality\": \"string\", \"sManagerCode\": \"string\", \"sDistrictCode\": \"string\"}"
Response
200 (OK) : success
400 (ERROR) : Error message
Response Body
Error message
DELETE{id}: /jobs/{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 | Integer |
Curl example
curl -X DELETE "https://smartapi.smarttid.dk/jobs/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
Job
Name | Description | Type |
sJobCode | Code of job | String |
sJobDescription | Job Description | String |
sJobDescription2 | Job description 2 | String |
dtPlannedStartDate | Planned Start Date | String |
dtPlannedCompletionDate | Planned Completion Date | String |
sStatus | Status of job | String |
dtStartedDate | Started Date | String |
dtCompletedDate | Completed Date | String |
sStartedBy | Started By | String |
sCompletedBy | Completed By | String |
sCreatedBy | Created By | String |
sJobTemplate | Job Template | String |
sJobGroupCode | Job Group Code | String |
nPlannedNumber | Planned Number | Integer |
nNumberPerContainer | Number per Container | Integer |
sOrderCode | Order Code | String |
dtDate | Date | String |
dtPlannedDeliveryDate | Planned Delivery Date | String |
dtActualDeliveryDate | Actual Delivery Date | String |
sDeparmentCode | Department Code | String |
sProductCode | Product Code | String |
sPrintID | Print ID | String |
sCustomerCode | Customer Code | String |
sReference | Reference | String |
sColor | Color | String |
sColorGroupCode | Color Group Code | String |
sRemark | Remark | String |
bMaterialsRecieved | Materials Recieved | Boolean |
bReadyToShip | Ready to ship | Boolean |
dtExpectedMaterialDeliveryDate | Expected Material Delivery Date | String |
bInvoiced | Invoiced | Boolean |
bIndirectTime | IndirectTime | Boolean |
sDeliveryAddressCode | Delivery Address Code | String |
bPrinted | Printed | Boolean |
sDrawing | Drawing | String |
sQuality | Quality | String |
sManagerCode | Manager Code | String |
sDistrictCode | District Code | String |