Skip to content

Quickstart

This guide takes you from a new account to a printed label: you pair an agent, add a printer, create an API key and submit a job.

You need:

  • a Windows machine on the same network as the printer: Windows 10 or later, or Windows Server 2019 or later, x64, with a local administrator account and outbound HTTPS (port 443) to api.printsluis.nl;
  • a printer that machine can reach: a network label printer on TCP port 9100, or a printer installed in Windows;
  • curl, or a .NET 10 project for the SDK.
  1. Create an account.

    Go to app.printsluis.nl/sign-up and enter your work email address. Open the link in the email (it works for 24 hours), then choose a name for your organization and a password. You are the organization’s admin.

    If the page says signing up isn’t open yet, contact us and we’ll set up your organization.

  2. Pair an agent.

    In the portal, open Agents and choose Pair an agent. Give it a name you’ll recognize, such as the machine’s name, and choose Continue. The dialog shows a pairing code: it works once and expires after 15 minutes.

    On the Windows machine, download the installer from the dialog (or from https://api.printsluis.nl/downloads/agent/latest/win-x64), run it, and enter the pairing code when it asks. Leave the gateway URL empty. Or install it unattended from a PowerShell prompt opened with Run as administrator:

    Terminal window
    Invoke-WebRequest https://api.printsluis.nl/downloads/agent/latest/win-x64 -OutFile PrintsluisAgent.msi
    msiexec /i PrintsluisAgent.msi /qn PAIRINGCODE=ABCD-2345 /l*v install.log

    The agent shows as online in the portal within a minute. For proxies, firewalls and everything else IT wants to know, see Installing the agent.

  3. Add a printer.

    Open Printers and choose Add printer. Choose the agent, then the connection:

    • Network printer: the printer’s host name or IP address, and port 9100. No driver needed.
    • Windows printer: a printer installed on the agent’s machine, by USB or network.

    Choose the Printer type: Zebra label printer (ZPL) for this guide, Office printer (PDF) or Generic printer (raw data). Give it a name and save.

    Open the printer and use Test print to check that it prints. Then copy its Printer ID from the side panel: you need it below.

  4. Create an API key.

    Open API keys and choose Create API key. Name it after the application that uses it. Keep the default scopes (print:create, print:read and printers:read) and choose Create key.

    The key starts with pgw_ and is shown only once. Store it in a secret store, not in source code.

  5. Submit a job.

    The document is base64-encoded. This one is the ZPL label ^XA^FO50,50^A0N,40,40^FDHello from Printsluis^FS^XZ:

    Terminal window
    export PRINTSLUIS_API_KEY="pgw_..."
    export PRINTER_ID="0192f0c1-4a6b-7c3d-9e2f-1a2b3c4d5e6f"
    curl https://api.printsluis.nl/v1/print-jobs \
    -H "Authorization: Bearer $PRINTSLUIS_API_KEY" \
    -H "Content-Type: application/json" \
    -H "Idempotency-Key: quickstart-label-1" \
    -d '{
    "target": { "printerId": "'"$PRINTER_ID"'" },
    "document": {
    "format": "zpl",
    "content": "XlhBXkZPNTAsNTBeQTBOLDQwLDQwXkZESGVsbG8gZnJvbSBQcmludHNsdWlzXkZTXlha"
    },
    "copies": 1,
    "externalReference": "quickstart-1"
    }'

    The API answers 202 Accepted with the new job (abbreviated here):

    {
    "id": "0193a6f3-1b8d-7e55-8a9c-5d3e2f1a0b77",
    "status": "queued",
    "printerId": "0192f0c1-4a6b-7c3d-9e2f-1a2b3c4d5e6f",
    "resolvedVia": "printerId",
    "format": "zpl",
    "copies": 1,
    "externalReference": "quickstart-1",
    "attempt": 0,
    "maxAttempts": 3,
    "createdAt": "2026-11-24T09:14:03.512+00:00",
    "expiresAt": "2026-11-24T10:14:03.512+00:00",
    "encrypted": false
    }

    Sending the same request with the same Idempotency-Key again returns this job with 200 OK, and prints nothing new. See Idempotency keys.

  6. Follow its status.

    Terminal window
    curl https://api.printsluis.nl/v1/print-jobs/0193a6f3-1b8d-7e55-8a9c-5d3e2f1a0b77 \
    -H "Authorization: Bearer $PRINTSLUIS_API_KEY"

    A single job includes events: every status change with its time and, when something went wrong, a failure code. A label that printed goes queued → assigned → downloaded → submittedToPrinter → succeeded. The portal’s Jobs page shows the same timeline.

  • Store printer IDs as user preferences, and use aliases such as labels as defaults.
  • Learn what each job status means, and what to do when the outcome is unknown.
  • Receive a webhook when a job is finished, instead of polling.
  • Browse the API reference.