With the /workflow endpoint user can send a job to machine.
POST
/api/workflow/SendToMachine
Send Job to Machine
Supports the following order types: laser-engraving-template
Model Request Example
api/Workflow/SendToMachine?job=jobName&printerDriver=printerDriverName
Response Example
If the operation is successful the response will be empty with status code 200
if there is any error, the response will have error messages with status code 409
POST
/api/Workflow/SendToPrinter
Send Job to Printer
Model Request Example for Kornit
{ "ProductSku": "string", "OutputFilePath": "string", "PlatenName": "string", "Quantity": 0, "PrinterName": "string" }
Model Request Example for Kornit when Job parameter is added
{ "Quantity": 0, "PrinterName": "string", "PlatenName": "string", "Job": "JobName" }
Model Request Example for Brother
{ "ProductSku": "string", "OutputFilePath": "string", "PrinterName": "string" }
Model Request Example for Brother when Job parameter is added
{ "PrinterName": "string", "Job": "JobName" }
Model Request Example for printers when submitting a Jig with orders
{ "PrinterName": string, "Company": string, "Jig": { "JigName": string, "JigFileName": string, (Optional), "BatchNumber": string, "BatchUrl": string, "BatchComments": string "JigOrders": [ { "Job": string, "//TransformField": "Supported option is mirror", "Transform":string, "//MirrorTypeField": "Supported options are horizontal, vertical or both. Default is horizontal if the Transform is mirror.", "MirrorType":string, "//ScaleJob": "Supported options are true or false. Default is true.", "ScaleJob":bool } ] } }
Response Example
Possible errors: 1036 - Output file does not exist 1504 - Printer is not configured 1505 - Printer profile is not configured 1506 - Platen is not configured 1507 - File Not Found 1026 - Invalid Job 5005 - Product SKU was not found If the operation is successful the response will be empty with status code 200 if there is any error, the response will have error messages with status code 409
POST
/api/workflow/PrintWorksheet
Send Worksheet to the Printer
Model Request Example
{ "Company": "string", "PrinterName": "string", "BatchIdentifier": "string", "BatchWorksheetTemplate": "string", "Jobs": [{ "Job": "string" } ] }
Response Example
Possible errors: 1504 - Printer is not configured If the operation is successful the response will be empty with status code 200 if there is any error, the response will have error messages with status code 409
POST
/api/Workflow/SendToEngraver
Send Jig to Engraver
Model Request Example for engravers when submitting a Jig with orders
{ "Company": string, "MachineName": string, "Jig": { "JigName": string, "JigFileName": string, (Optional) "BatchNumber": string, (Optional) "BatchUrl": string, (Optional) "BatchComments": string (Optional) "JigOrders": [ { "Job": string, "//TransformField": "Supported option is mirror", "Transform":string, "//MirrorTypeField": "Supported options are horizontal, vertical or both. Default is horizontal if the Transform is mirror.", "MirrorType":string, "//ScaleJob": "Supported options are true or false. Default is true.", "ScaleJob":bool } ] } }
Response Example
Possible errors: 1036 - Output file does not exist 1510 - Engraver is not configured 1507 - File Not Found 1026 - Invalid Job 5005 - Product SKU was not found If the operation is successful the response will be empty with status code 200 if there is any error, the response will have error messages with status code 409
GET
/api/Workflow/GetProductionFile
Get the bytes of a production file for a job that has been generated successfully.
Request Example
/api/WorkflowWorkflow/GetProductionFile/?job=1234&filetype=PXF The string value of the job that was created. - job is a required parameter. The file type that was saved on disk. - Examples: 1234.PXF is for an Embroidery order so filtype will be PXF or 5678.PNG is for a Print order so filetype will be PNG. - filetype is a required parameter.
Response Example
Response Example "UE1MUFhGMDEUAAAAHJQBAIgAAAABDABDcmVhdGVkIEJ5OgAeAFRhamltYSBERzE2IGJ5IFB1bHNlIDc4 (continued ...) ==" A Base64 String of encoded bytes. This must be decoded. C# example: System.Convert.FromBase64String(bytes) string fileName = "C:\\productionfiles\\somejob.pxf"; byte[] array = System.Convert.FromBase64String("UE1MUFhGMDEUAAAAHJQBAIgAAAABDABDcmVhdGVkIEJ5OgAeAFRhamltYSBERzE2IGJ5IFB1bHNlIDc4 (continued ...) =="); using (var writer = new BinaryWriter(File.OpenWrite(fileName))) { writer.Write(array); } If the operation is successful the response will have a status code 200 with the included bytes of the file. If there are any exceptions, the response will have a status code 409 with the included error message.