The Print Server Webhooks is a way to receive events that happen on the Print Server, instead of continuously asking the Print Server for changes, the Print Server will notify the changes.

To subscribe to messages you have to send the parameter `Subscribe=true` when requesting the `printerInfo` action.

The notifications that the Print Server will send will be sent to the IP that makes the `printerInfo` request with the `subscribe` parameter, the port to which the notifications will be sent is currently fixed at `49373`

Example: 

http://192.168.8.121:49091/?action=printerInfo&subscribe=true&port=9080


Once subscribed you can delete your "subscription" through the app in Print Server > Settings > Log...> Web Hooks...

Once you are subscribed and an event happens in the Print Server, like someone moves a job, all the subscribers will receive a `POST` request with 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 sent along a body that will contain the new state of the Print Server. This body will have the same format as if a request to the Print Server was done with `action=printerInfo`, `action=jobInfo`, or `action=printerInfo` respectively.


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 Host: 127.0.0.1:9373 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"> 
<JobList> 
<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=""/> 
</JobList> 
<Schemes> 
<Scheme Name="197 - Carta_Pigment_i1_10012012"/> 
</Schemes> 
<Layouts> 
<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"/> 
</Layouts> 
</PrinterInfo>

Related articles:

Print Server WebAPI