Datashift Direct Print API · v0.1.0
API Reference
Push print jobs directly to your registered Datashift print devices.
https://datashift.com.au/api/direct-printAuth: Authorization: Bearer dsdp_<64-hex-chars>Devices
/deviceslistDevicesList print devices
Returns active (non-revoked) print devices registered for the tenant. Use the `id` of the desired device as `deviceId` when calling `POST /print-jobs`. Devices are registered from the Datashift portal (Settings → print devices). Each device runs the Datashift print-client software and listens for print jobs over Pub/Sub. Revoked devices are excluded from this list.
Responses
200Active print devices for this tenantDeviceListResponse
401Missing or invalid API keyError
403Direct Print access is not active for this tenant, or the key lacks the required scopeError
429Too many requests for this API key — see Retry-After headerError
Print Jobs
/print-jobscreatePrintJobSubmit a print job
Queues a PDF print job for delivery to a registered device. **Typical flow:** Call `GET /devices` once during setup, store each device's `id` in your system keyed by workstation, then pass the relevant `deviceId` in this request. **Handling `DEVICE_NOT_FOUND`:** If the response is 404 with `code: DEVICE_NOT_FOUND`, the stored device ID is stale (device was revoked or replaced). Re-fetch `GET /devices` and prompt the user to select a device before retrying.
Request body
PrintJobRequest
Responses
201Print job queued successfullyPrintJobCreated
400Invalid request — validation failedError
401Missing or invalid API keyError
403Direct Print access is not active for this tenant, or the key lacks the required scopeError
404Device not found or revokedError
429Too many requests for this API key — see Retry-After headerError
Schemas
Error
{
message: string
code?: string
}Device
{
id: string // Use as `deviceId` in print-job requests
label: string // Human-readable name for the device (set during registration)
printerName?: string | null // OS printer name reported by the device client, if available
lastUsedAt?: string | null // When this device last received a print job
createdAt: string
}DeviceListResponse
{
devices: Device[]
}PrintJobRequest
{
deviceId: string // ID of the print device to send the job to (from `GET /devices`)
pdfBase64: string // Base64-encoded PDF document to print. Maximum 9,000,000 base64 characters (~6.6 MB of raw PDF).
}PrintJobCreated
{
jobId: string // Direct Print job ID
status: DELIVERED // Always DELIVERED on a 201 — means handed to the delivery queue, not confirmed printed
}