Info

Created 25-01-2021 by Lavinia Gheghea

Revision



Description

The API allows you to create employee.

Endpoints


POST: /createoperation


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
Request Body
{
"sJobCode": "string",
  "nLineNumber": 0,
  "sOperationCode": "string",
  "sDescription": "string",
  "sPlannedTime": "string",
  "sERPReference": "string",
  "nPlannedQuantityPerHour": 0,
  "nQuantityPerUnit": 0,
  "nLength": 0,
  "nWidth": 0,
  "nHeight": 0,
  "bOperationCompleted": true,
  "bReportScrap": true,
  "bReportProduced": true,
  "sColorCode": "string",
  "nArea": 0,
  "sType": "string",
  "sQuality": "string"
}
  

Curl example
curl -X POST "https://smartapi.smarttid.dk/createoperation" -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\",  \"nLineNumber\": 0,  \"sOperationCode\": \"string\",  \"sDescription\": \"string\",  \"sPlannedTime\": \"string\",  \"sERPReference\": \"string\",  \"nPlannedQuantityPerHour\": 0,  \"nQuantityPerUnit\": 0,  \"nLength\": 0,  \"nWidth\": 0,  \"nHeight\": 0,  \"bOperationCompleted\": true,  \"bReportScrap\": true,  \"bReportProduced\": true,  \"sColorCode\": \"string\",  \"nArea\": 0,  \"sType\": \"string\",  \"sQuality\": \"string\"}"

Response

200 (OK) : Success

400 (ERROR) : Error message

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

SQL Procedure 

sp_IntegrationCreateOperation

Object


 Name
 Description
 Type
Example  Value
sJobCode
Job Code
String
 
nLineNumber
Line Number 
Number(double)
 1 or 1.2
sOperationCode
Operation Code
String
 
sDescription
Description
String
 
 sPlannedTime
Planned Time
 String.
 "1" or "1.2"
 sERPReference
ERP Reference
 String
 
 nPlannedQuantityPerHour
Planned Quantity Per Hour
 Number(double)
 
 nQuantityPerUnit
Quantity Per unit
 Number(double)
 
 nLength
Length
Number(double)
 
nWidth
Width
Number(double)
 
 nHeight
Height
 Number(double)
 
 bOperationCompleted
Operation Completed
bool
 
bReportScrap
Report Scrap
bool
 
bReportProduced
Report Produced
bool
 
 sColorCode
 Color Code
 String
 
nArea
Area
 Number(double)
 
 sType
 Type
 String
 
 sQuality
Quality
 String