I’m tried printing a label using the NiceLabel developer portal to a Zebra ZT411 printer defined in the Control Center. When I fetch the printers, it exists, but when I try to print to it, I get a 404.
GET https://labelcloudapi.onnicelabel.com/Print/v2/Printers
gives me
[
...
{
"deviceType": "PrintQueue",
"printerName": null,
"printQueueName": "ZEBRA ZT411-300dpi ZPL",
"workstationName": "ACME-3GF58D3.MYCOMPANY.COM",
"driverName": "ZEBRA ZT411-300dpi ZPL",
"deviceId": {
"printerName": "ZEBRA ZT411-300dpi ZPL",
"workstation": "<workstation-guid-3>"
}
}
...
]
Yet
POST https://mycompany.onnicelabel.com/Print/v2/Print
{
"deviceType": "Queue",
"deviceId": {
"printerName": "ZEBRA ZT411-300dpi ZPL",
"workstation": "<workstation-guid-3>"
},
"filePath": "/somefolder/hello-world.nlbl",
"fileRevision": "0.1",
"labelName": "hello-world.nlbl",
"quantity": "1"
}
Gives me a 400. I found the file in the API that lists folder contents. I tried changing the deviceType from the default “Queue” to “CloudPrinter” as some examples showed, and it gives a 404.
The file above is a template file with just a Hello World text box and no variables or anything in it.The Ocp-Apim-Subscription-Key was added as a Cloud Integration subscription to the acme account.
I hope to get a working example of a simple cloud API print request that prints a template. I will need variable substitution, but want to start simple. At this point, it’s not clear that it can’t find the template file, or it can’t find the printer.