DataShift Direct Print API · v0.3.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, each with its full list of reported printers. Use the `id` of the desired device as `deviceId` when calling `POST /print-jobs`. Optionally use one of that device's `printers[].id` as `printerId` to override which physical printer on the device receives the job — omit it to use the device's preferred printer (the one with `isPreferred: true`). 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. A device that hasn't reported its printer list yet (older print-client versions) has an empty `printers` array. Requires the `devices:read` scope.
Responses
200Active print devices for this tenantDeviceListResponse
401Missing or invalid API keyError
403The API key is valid and active, but lacks the scope required for this operationForbiddenError
429Too many requests for this API key — see Retry-After headerRateLimitError
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. Requires the `print-jobs:write` scope.
Request body
PrintJobRequest
Responses
201Print job queued successfullyPrintJobCreated
400Invalid request — validation failedError
401Missing or invalid API keyError
403The API key is valid and active, but lacks the scope required for this operationForbiddenError
404Device not found or revokedError
429Too many requests for this API key — see Retry-After headerRateLimitError
Schemas
Error
{
message: string
code?: string
}ForbiddenError
{
success: false
error: string
code?: string
}RateLimitError
{
error: string
code: RATE_LIMIT_EXCEEDED
retryAfter: integer // Seconds until the rate limit resets
}Device
{
id: string // Use as `deviceId` in print-job requests
label: string // Human-readable name for the device (set during registration)
printerName?: string,null // Deprecated — the device's preferred printer name, kept for backward compatibility. Prefer `printers[]`.
lastUsedAt?: string,null // When this device last received a print job
createdAt: string
printers: Printer[] // Every printer this device has reported. Empty for a device running a pre-multi-printer print-client version.
}Printer
{
id: string // Use as `printerId` in print-job requests to override the device's preferred printer
name: string // OS printer name as reported by the print client
isPreferred: boolean // Whether this is the printer the device currently defaults to when no `printerId` override is given
isOnline?: boolean,null // Best-effort online status as of the last device sync — may be stale
lastSeenAt?: string // When the device last reported this printer
}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.75 MB of raw PDF).
printerId?: string // Optional id of a specific printer on the target device; defaults to the device's preferred printer when omitted.
}PrintJobCreated
{
jobId: string // Direct Print job ID
status: DELIVERED // Always DELIVERED on a 201 — means handed to the delivery queue, not confirmed printed
}