Developers / Cloud API / Notifications

WebSocket Notifications

OVERVIEW

How the feed works

PrintFactory Cloud provides a WebSocket that streams job status notifications. Each status change delivers a small message carrying the job’s JobGUID: your cue to fetch that job over the REST API and read its current status. The same socket also carries cloud automation and device events.

Each message identifies what changed; you fetch the current detail over the REST API. This page documents the connection, every payload, and how to read job status from the job XML.

Endpoint
wss://notification.aurelon.com:27489
Authentication
MisKey request header
Message format
JSON
Connections
one per organisation
CONNECTION

Connect & authenticate

The endpoint is a standard WebSocket server; any conformant client works, with no subprotocol or custom framing.

Endpoint
wss://notification.aurelon.com:27489

Authentication

Send your organisation’s key in a MisKey header on the HTTP handshake that upgrades to the WebSocket. A connection without a valid key is rejected before upgrade. The same key authenticates REST calls. Find or regenerate it under Settings → External API.

Handshake header
MisKey: PRI-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
!

One connection per organisation

Only a single simultaneous socket is permitted per organisation; opening a second displaces the first. Run one long-lived consumer and distribute events internally.

MESSAGE MODEL

What a message contains

Every frame is a JSON object. The identifier it carries determines the stream:

Key presentStreamReact by
JobGUIDJob & automation eventsfetch /api/v2/job/{guid}
DeviceGUIDDevice telemetryread the payload directly
NestGUIDCloud Nester candidatecorrelate nest → resulting job

Some messages add hints such as Status, Event or EventDate. Use them as fast paths, not as the source of truth. In particular, only the first message for a job carries "Status":"Created"; later updates usually carry the JobGUID alone, which means “re-fetch and read the current status”.

first message: created
{
  "JobGUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "Status": "Created"
}
every later update
{
  "JobGUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
LIFECYCLE

Job lifecycle

A job progresses through RIP, print and, when configured, cut. Each visible state maps to a specific location in the job XML, so an accurate progress view can be built from the document alone.

01
Created
socket Status=Created
02
Ripped
PDFJob/Status=Ready · Journal RIP
03
Sent to printer
Journal Send
04
Printed
Journal Print × copies
05
Cut
cut job · Send → Print

The <Journal> records each process step. A Send entry marks the hand-off to the device; a Print entry marks a completed run, and one is appended per copy. The cut stage exists only when the job references a separate cut job, covered in Print & cut jobs.

JOB EVENTS

Job notifications

Each event identifies the job by JobGUID.

JobJob createda job enters the system▸
payload
{
  "JobGUID": "[job guid]",
  "Status": "Created"
}

The only job message guaranteed to include a Status. Register the job, then fetch its XML.

JobJob updated / status changedany change after creation▸
payload
{
  "JobGUID": "[job guid]"
}

Sent for updates and status transitions with no status field. Re-fetch the job XML and read the current RIP, print and Journal state.

JobJob copy addedManual Job Completion (Hub → Tracking)▸

Recorded when a copy is logged against a job. With no Journal entries yet, a single message carries coarse hints:

no journal entries
{
  "JobGUID": "[job guid]",
  "StatusRIP": "Ready",
  "StatusPrint": ""   // empty until printed
}

With Journal entries present, one message is sent per Journal entry:

per journal entry
{
  "JobGUID": "[job guid]",
  "StatusRIP": "Ready"
}
EventReprinta job is reprinted▸
payload
{
  "JobGUID": "[job guid]",
  "Event": "Reprint",
  "EventDate": "[ISO 8601 date]"
}

A reprint appends another Print entry to the job’s Journal under the same GUID. See Reprinting jobs.

EventRe-Routerouted to another device / queue▸
payload
{
  "JobGUID": "[job guid]",
  "Event": "ReRoute",
  "EventDate": "[ISO 8601 date]",
  "Status": "ReRoute"
}
EventRe-Submitre-sent to the printer▸
payload
{
  "JobGUID": "[job guid]",
  "Event": "ReSubmit",
  "EventDate": "[ISO 8601 date]"
}
EventRe-Sendre-sent, treated as a new creation▸
payload
{
  "JobGUID": "[job guid]",
  "Status": "Created"
}

Carries Status: Created, so a re-send can reuse the “new job” path.

JobDevice set / sent to RIPa device is assigned and the job goes to RIP▸
payload
{
  "JobGUID": "[job guid]"
}
AutomationNester · automation job addeda job is added to /api/v2/nester▸
payload
{
  "JobGUID": "[job guid]"
}
i

Here JobGUID is the automation job, not a print or cut job.

AutomationNester · documents processed (PES)an automation job’s documents finish processing▸
payload
{
  "JobGUID": "[job guid]"
}
AutomationNester · print/cut job createda submitted nest produces a job▸
payload
{
  "JobGUID": "[print/cut job guid]",
  "Status": "NestComplete",
  "NestGUID": "[nesting candidate guid]",
  "Event": "Creation",
  "EventDate": "[ISO 8601 date]"
}

Correlate NestGUID to your nesting candidate and JobGUID to the print/cut job produced.

STATUS

Reading status from the job XML

When you fetch /api/v2/job/{guid}, derive each state from these locations. Two status fields and the Journal together describe progress; values match case-insensitively.

Status fields

FieldValueMeaning
PDFJob/StatusWaitingnot yet ripped
PDFJob/StatusReadyripped
PrintJob/StatusWaitingripped, not yet sent to the printer
PrintJob/StatusReadysent and/or printed; read the Journal to tell which
PrintJob/Statusholdon hold

The <PrintJob> element only appears after RIP, so before ripping there is no print status at all. And because PrintJob/Status reads Ready both when a job is sent and when it has finished, the Journal, not this field, is what distinguishes those.

Journal entries

The <Journal> accumulates one entry per process step, each with a Date and (when complete) a Duration:

EntryAppears whenCarries
Creationjob is created and sent to RIPDate
RIPripping completesDate, Duration, RenderGUID
Sendsent to the device (printer or cutter)Date, Page
Printa run completes, one per copyDate, Duration, Page, Copies

Derived states

StateCondition
RippedPDFJob/Status = Ready (or a Journal RIP entry)
Sent to printera Journal Send entry exists
Printed / finished≥ 1 Journal Print entry: copies printed = entry count
On holdPrintJob/Status = hold
Warning / errornon-empty PrintJob/Warning or a Journal error
!

Not every job reports “printed”

The Print (finished) signal depends on the device reporting back. Many printers and cutters aren’t Industry 4.0-capable and provide PrintFactory no real-time completion feedback, so those jobs may show a Send entry but never a Print one. For such devices the printer’s Notify as printed when job is sent option records the job as printed the moment it’s dispatched, so production, ink and media data are still captured. See Notify as printed when job is sent.

Statistics vs Journal

Statistics/Summary describes the composition of the sheet, how many of each document are laid up, and does not change when the job is reprinted. The Journal describes what has happened to the sheet. Read Statistics for “what’s in the job”; read the Journal for live progress.

This sheet contains four documents in different quantities. Statistics totals each one for you, so you don’t have to count the imposition parts:

Statistics: composition (per document)
<Statistics><Summary><Contents>
  <Document GUID="c90ff87b…" TotalCopies="4"/>  <!-- BW_Boy -->
  <Document GUID="2f243155…" TotalCopies="3"/>  <!-- Catacombs -->
  <Document GUID="d962ce6c…" TotalCopies="2"/>  <!-- Bolts -->
  <Document GUID="bbd80f9f…" TotalCopies="1"/>  <!-- Clocks -->
</Contents></Summary></Statistics>

Statistics totals each document by its GUID, the same GUID that appears on the parts as Part/Document/@GUID. So TotalCopies="4" against c90ff87b… means that document is laid up four times across the sheet (its four parts).

Printing the sheet adds one Print entry to the Journal; reprinting it adds another. After printing the same sheet twice, the Journal holds two Print entries, and Statistics above is unchanged:

Journal: progress (printed twice)
<Journal>
  <Creation Process="Layout" Date="…08:38:49"/>
  <RIP Process="RIPEngine" Date="…08:38:50" Duration="PT0H0M13S"/>
  <Print Process="Spooler" Date="…08:38:55" Duration="PT0H0M10S">
    <Page>1</Page><Copies>1</Copies>
  </Print>
  <Print Process="Spooler" Date="…08:40:38" Duration="PT0H0M7S">
    <Page>1</Page><Copies>1</Copies>
  </Print>
</Journal>

So copies printed = number of Print entries (here 2), while Statistics still reports the sheet’s makeup as 4× BW_Boy, 3× Catacombs, 2× Bolts, 1× Clocks.

IMPOSITION

Imposition parts

The imposition is a list of parts: one <Part> per placement on the sheet, under Imposition/Parts. Each part is self-contained: it names the document it places, has its own part GUID, and carries its own metadata. Everything about a placement lives in that one part, so there is nothing to join from elsewhere.

Imposition/Parts/Part (one placement)
<Part>
  <!-- …geometry: Position, Side, crop marks… -->
  <Document GUID="c90ff87b-ec3b-434f-b473-73c428cb2a18" Page="0"/>   <!-- which document -->
  <GUID>1155dda5-287a-481d-9c26-031631bb9439</GUID>           <!-- this part's own GUID -->
  <UserData>                                          <!-- this part's metadata -->
    <FormGUID>6f93ab75-17cf-4670-8a8b-f4d84f20eaad</FormGUID>
    <laminated>false</laminated>
    <orderID>12345</orderID>
  </UserData>
</Part>

The three things you read from each part:

WhatXPath (per part)In the example
The part’s own GUID, the placement’s identityImposition/Parts/Part/GUID1155dda5-…
Which document is placedImposition/Parts/Part/Document/@GUIDc90ff87b-…
This placement’s metadataImposition/Parts/Part/UserData/*orderID = 12345

Because the part GUID, the document GUID and the UserData all sit inside the same <Part>, a placement’s metadata is already tied to its document, so nothing to join. In the example, orderID 12345 belongs to document c90ff87b… simply because they share part 1155dda5….

Metadata (UserData)

The UserData block is custom metadata, added with SmartForms in Layout or injected in the Workflow application. The keys are entirely yours: a field like orderID lets you tie a placement back to your own systems (order, customer, ticket, due date, anything you choose).

The same document can be placed many times, and each placement keeps its own metadata, so one piece of artwork may carry different orderIDs across the sheet:

Part/GUIDPart/Document/@GUIDPart/UserData/orderID
1155dda5-…c90ff87b-… (BW_Boy)12345
48c283ff-…d962ce6c-… (Bolts)54321
bf9f78d0-…bbd80f9f-… (Clocks)54321
344d4584-…nonenone
i

Not every part has a Document or UserData. Marker/label parts (like the last row above) carry neither, and parts can also arrive without metadata when SmartForms/automation aren’t used. Skip parts with no Document, and don’t assume an orderID is always present.

PRINT & CUT

Print & cut jobs

When a job is cut, the cut is a separate job with its own JobGUID. The print job and the cut job each hold a reference to the other, so you can move between them in either direction.

The print job points forward to its cut job:

print_job.xml
<JobGUID>78d1536d-e5d1-4c2f-8664-184d88e1735e</JobGUID>
<CutJobGUID>de194852-3656-49d7-81ab-9fcfdb18def3</CutJobGUID>  <!-- → the cut job -->

The cut job points back to its parent print job, and is marked as a cut:

corresponding_cut_job.xml
<JobGUID>de194852-3656-49d7-81ab-9fcfdb18def3</JobGUID>
<PrintJobGUID>78d1536d-e5d1-4c2f-8664-184d88e1735e</PrintJobGUID>  <!-- → the parent -->
<Cut>true</Cut>

So from a print job, CutJobGUID tells you which cut job to fetch; from a cut job, PrintJobGUID tells you the parent it belongs to. A cut job is identifiable by <Cut>true</Cut> (with <Print>false</Print> and a cutter PrinterDriver). It uses the same Journal vocabulary as a print job, so cut progress reads identically:

StateCondition (on the cut job)
Sent to cuttera Journal Send entry exists
Cut / finished≥ 1 Journal Print entry: passes = entry count

To resolve cut status, fetch the cut job referenced by CutJobGUID and read its Journal. The cut job also emits its own notifications under its own GUID; map those back to the parent using the cut job’s PrintJobGUID so cut progress updates the correct print job.

Document thumbnails

Render any document by GUID:

GET · octet-stream image
GET /api/v2/document/{documentGUID}/thumbnail/{pageNumber}
# pageNumber optional, default 1 · send the MisKey header
AUTOMATION

Cloud automation

The Cloud Nester emits three automation events, listed in Job notifications: an automation job being added, its documents finishing processing (PES), and a submitted nest producing a print/cut job (with NestGUID and Status: NestComplete). See Cloud Nester settings.

DEVICES

Device notifications

Device messages are self-contained telemetry keyed by DeviceGUID: no follow-up fetch needed.

device status change
{
  "DeviceGUID": "[device guid]",
  "Status": "Printing",          // enum below
  "Message": "string",
  "Temperature": 42,             // int, nullable
  "ConnectionState": "Online",   // Unknown | Online | Offline | Unstable
  "ConnectionMessage": "string",
  "RemainingInks": [
    { "InkIndex": 0, "InkName": "Cyan", "Level": 68, "MaxLevel": 100 }
  ],
  "QueueLength": [
    { "Type": "Length", "Value": 1200 }  // Unknown | Length | Area | Sheet
  ]
}
StatusMeaning
Idlepowered, no active work
Printingactively producing
Pause · Holdtemporarily halted
Sleepinglow-power state
Calibrating · Maintenanceservicing, unavailable
Abortingcancelling current work
Errorfault: see Message
Offline · NotUsedunreachable / not in use
REFERENCE

Field reference

FieldTypeNotes
JobGUIDguidjob, automation, print, or cut job by context
DeviceGUIDguiddevice messages only
NestGUIDguidnesting candidate
StatusstringCreated · ReRoute · NestComplete · device enum
StatusRIP / StatusPrintstringcopy-added hints; StatusPrint empty until printed
Event / EventDatestringReprint · ReRoute · ReSubmit · Creation · ISO 8601
CutJobGUIDguidon a print job → its cut job
PrintJobGUIDguidon a cut job → its parent print job
ConnectionStatestringUnknown · Online · Offline · Unstable
RemainingInks[]arrayInkIndex, InkName, Level, MaxLevel
QueueLength[]arrayType (Unknown·Length·Area·Sheet), Value