Skip to content

NiceLabel PRINT through Webhooks

PRINT method can be launched through a Webhook in produuz.it. We have a payload designed for this integration as it is defined in https://help.nicelabel.com/hc/en-001/articles/7361208442001-Appendix-B-Cloud-trigger-API#print-method-1-5. A NiceLabel API V2 payload can be also selected.

Just create a new Webhook selecting:

  • event: Desired event, like constructible_start.
  • Auth Header: Select None.
  • URL: https://labelcloudapi.onnicelabel.com/Trigger/v1/CloudTrigger/Api-CloudIntegrationDemo-Print
  • Payload: Select nicelabel_print.
  • Custom Headers: Add Ocp-Apim-Subscription-Key with your NiceLabel Subscription Key for their API (This header may not be needed in your setup).

Once you select the nicelabel_print payload, you will get an extended form where you have to select:

  • Printer: Type the NiceLabel printer name you want to use, like ZEBRA R-402.
  • FilePath: Type the NiceLabel label path, like /panels/panel_label.nlbl.
  • API Version: API Version to use on the NiceLabel cloud, by default V2.

Your form should look like this:

webhook_form

Save it and you are ready. Nicelabel cloud will receive a payload similar to this for API V2:

json
{
  "event": "constructible_start",
  "deviceType": "CloudPrinter",
  "deviceId": {
    "printerName": "ZEBRA R-402"
  },
  "filePath": "/panels/panel_label.nlbl",
  "quantity": "1",
  "dataSources": [
    {
      "uuid": "e8f7e7f7-3b27-41e0-bb78-99eae64ba7cd",
      "design_uuid": "db0cb2a6-8fbf-46ac-81f5-ece6faca584e",
      "design_name": "ML-0B-5",
      "status": "waiting",
      "scheduled_prod_date": "2023-11-11",
      "client_order_id": "1030622",
      "batch_uuid": "e8986e12-4454-4ae5-a40d-4929d6a5b789",
      "batch_name": "Batch",
      "phase": "Phase_1",
      "client_meta": {
        "your_key_1": "XXXX",
        "your_key_2": 2
      }
    }
  ]
}
{
  "event": "constructible_start",
  "deviceType": "CloudPrinter",
  "deviceId": {
    "printerName": "ZEBRA R-402"
  },
  "filePath": "/panels/panel_label.nlbl",
  "quantity": "1",
  "dataSources": [
    {
      "uuid": "e8f7e7f7-3b27-41e0-bb78-99eae64ba7cd",
      "design_uuid": "db0cb2a6-8fbf-46ac-81f5-ece6faca584e",
      "design_name": "ML-0B-5",
      "status": "waiting",
      "scheduled_prod_date": "2023-11-11",
      "client_order_id": "1030622",
      "batch_uuid": "e8986e12-4454-4ae5-a40d-4929d6a5b789",
      "batch_name": "Batch",
      "phase": "Phase_1",
      "client_meta": {
        "your_key_1": "XXXX",
        "your_key_2": 2
      }
    }
  ]
}

Or this, for API V1:

json
{
  "event": "constructible_start",
  "FilePath": "/panels/panel_label.nlbl",
  "FileVersion": "",
  "Quantity": "1",
  "Printer": "ZEBRA R-402",
  "PrinterSettings": "",
  "PrintJobName": "",
  "Variables": [
    { "Name": "uuid", "Value": "e8f7e7f7-3b27-41e0-bb78-99eae64ba7cd" },
    { "Name": "design_uuid", "Value": "db0cb2a6-8fbf-46ac-81f5-ece6faca584e" },
    { "Name": "design_name", "Value": "ML-0B-5" },
    { "Name": "status", "Value": "waiting" },
    { "Name": "scheduled_prod_date", "Value": "2023-11-11" },
    { "Name": "client_order_id", "Value": "" },
    { "Name": "batch_uuid", "Value": "e8986e12-4454-4ae5-a40d-4929d6a5b789" },
    { "Name": "batch_name", "Value": "Batch 1" },
    { "Name": "phase", "Value": "Phase_1" }
  ]
}
{
  "event": "constructible_start",
  "FilePath": "/panels/panel_label.nlbl",
  "FileVersion": "",
  "Quantity": "1",
  "Printer": "ZEBRA R-402",
  "PrinterSettings": "",
  "PrintJobName": "",
  "Variables": [
    { "Name": "uuid", "Value": "e8f7e7f7-3b27-41e0-bb78-99eae64ba7cd" },
    { "Name": "design_uuid", "Value": "db0cb2a6-8fbf-46ac-81f5-ece6faca584e" },
    { "Name": "design_name", "Value": "ML-0B-5" },
    { "Name": "status", "Value": "waiting" },
    { "Name": "scheduled_prod_date", "Value": "2023-11-11" },
    { "Name": "client_order_id", "Value": "" },
    { "Name": "batch_uuid", "Value": "e8986e12-4454-4ae5-a40d-4929d6a5b789" },
    { "Name": "batch_name", "Value": "Batch 1" },
    { "Name": "phase", "Value": "Phase_1" }
  ]
}