DataShift Logo

Datashift Direct Print API · v0.1.0

API Reference

Push print jobs directly to your registered Datashift print devices.

Base URL: https://datashift.com.au/api/direct-printAuth: Authorization: Bearer dsdp_<64-hex-chars>

Devices

get/deviceslistDevices

List 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. Requires the `devices:read` scope.

Responses

200Active print devices for this tenant
DeviceListResponse
401Missing or invalid API key
Error
403The API key is valid and active, but lacks the scope required for this operation
ForbiddenError
429Too many requests for this API key — see Retry-After header
RateLimitError

Print Jobs

post/print-jobscreatePrintJob

Submit 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 successfully
PrintJobCreated
400Invalid request — validation failed
Error
401Missing or invalid API key
Error
403The API key is valid and active, but lacks the scope required for this operation
ForbiddenError
404Device not found or revoked
Error
429Too many requests for this API key — see Retry-After header
RateLimitError

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  // 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.75 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
}