Print Server Webhooks provide a method to receive real-time event notifications from the Print Server. Instead of constantly polling the Print Server for updates, it allows the Print Server to proactively notify you of any changes.

To subscribe to these notifications, you should include the parameter Subscribe=true when making a request to the printerInfo action. The notifications will be directed to the IP address that initiated the printerInfo request with the subscribe parameter. 

For example:
  • Print Server IP+port:
  • Subscribe: ?action=printerInfo&subscribe=true
  • neoControl Port: 49098

Once you've subscribed, you have the option to manage your subscription through the Print Server app by navigating to Print Server > Settings > Log system > Connections. From there, you can revoke your subscription as needed.

Once you are subscribed, in the event that an action occurs within the Print Server, such as a job being moved, all subscribers will receive a `POST` request in one of the following formats:

POST /app/updateQueue?printerUUID=xxxx

POST /app/updateJob?jobUUID=xxxx

POST /app/updatePrinter?printerUUID=xxxx

POST /app/updateAll

The first three "notification types" will be accompanied by a body containing the new state of the Print Server. This body will have the same format as if a request to the Print Server was made with `action=printerInfo`, `action=jobInfo`, or `action=printerInfo`, respectively.

Here's an example of a received notification:

POST /app/updatePrinter?printerUUID=63d54d14-4f29-4478-8c03-bf57640b86c3 HTTP/1.1 
Content-Type: application/xml 
User-Agent: neoStampa 9 
Content-Length: 1162

<?xml version="1.0" encoding="utf-8"?>
<PrinterInfo UUID="63d54d14-4f29-4478-8c03-bf57640b86c3" Printer="MS LaRio" Status="Idle" Active="No" ClusterID="" DefaultScheme="197 - Carta_Pigment_i1_10012012" MinWidth="28.35 pt" MaxWidth="9070.87 pt" MinLength="28.35 pt" MaxLength="14173228.35 pt" PendingSize="273155.999087" SelectedSize="0.000000" DoneSize="0.000000" Workstation="WINDOWS-PC" Version="9.0.1 x64">
    <Job UUID="90def64b-1c54-4dce-8d80-9d0a9b94b91b" Index="0" StatusID="-1" Status="Error" PrintStatus="0" Enabled="no" LastError="No scheme selected!"/>
    <Job UUID="3a7f2bcd-7514-468d-8d07-5fb7dce3b4e3" Index="1" StatusID="0" Status="Idle" PrintStatus="0" Enabled="no" LastError=""/>
    <Scheme Name="197 - Carta_Pigment_i1_10012012"/>
    <Layout Name="Color Printing.xml"/>
    <Layout Name="Rapport Printing.xml"/>
    <Layout Name="Inedit_FullRapport.xml"/>
    <Layout Name="Inedit_PrintRapport.xml"/>
    <Layout Name="Inedit_RapportWithColors.xml"/>
    <Layout Name="Inedit_RealSize.xml"/>
    <Layout Name="Inedit_RealSizeWithRepeatPreview.xml"/>

These notifications will provide real-time updates regarding the state of the Print Server, allowing subscribers to stay informed about any changes as they occur.

Related articles:

Print Server WebAPI