---
title: "Create a print job from an existing backend data source (backend generates PDF)"
method: POST
path: "/api/print-jobs/from-source"
tags: ["PrintJobs"]
---

# Create a print job from an existing backend data source (backend generates PDF)

`POST /api/print-jobs/from-source`

## Request

- Base URL: `https://api.clinicos.vet/backend/business`
- URL: `https://api.clinicos.vet/backend/business/api/print-jobs/from-source`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/docs/api/print-jobs/from-source/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- CreatePrintJobFromSourceRequest: A print job rendered from a source, plus — for `patient-record` only — the export options the user picked in the export dialog (sections, visit, newest/oldest first; ITE-1333). The server renders the record itself, so a large record never has to be uploaded as a PDF; null prints the default full record, as before.
  - `patientRecordOptions` PatientRecordExportOptions: Options controlling which sections to include in the patient record export
    - `appointmentId` string, nullable: Optional appointment ID to filter export to a specific visit. When null, exports the full patient record across all appointments.
    - `order` integer
    - `includeMedicalHistory` boolean: Include medical history and warnings section
    - `includeSoapNotes` boolean: Include SOAP notes section
    - `includeMedications` boolean: Include medications section
    - `includeRdvmRecords` boolean: Include RDVM records/referrals
    - `includeTransactionHistory` boolean: Include transaction/payment history
    - `includeDischargeRecords` boolean: Include discharge records
    - `includeLabResults` boolean: Include lab results with original PDFs
    - `includeVaccinations` boolean: Include vaccination history
    - `includeReminders` boolean: Include reminders (full-record exports only)
    - `includeAnesthesiaRecords` boolean: Include the anesthesia record of each surgical visit (ITE-1332): the chart, a five-minute vitals table and the drug and event log. Only with the `AnesthesiaChart` flag on.
  - `sourceType` string
  - `sourceId` string
  - `printerName` string
  - `type` string

## Response `201`

Created

- PrintJobResultDto
  - `printJobId` string
  - `status` string

## Other responses

- `400`: Bad Request

## Changes

- **2026-10-28** `099cf36186e0`: 3 info
  - added the new optional request property `patientRecordOptions/oneOf[#/components/schemas/PatientRecordExportOptions]/includeAnesthesiaRecords` (media type: application/json)
  - added the new optional request property `patientRecordOptions/oneOf[#/components/schemas/PatientRecordExportOptions]/includeAnesthesiaRecords` (media type: text/json)
  - added the new optional request property `patientRecordOptions/oneOf[#/components/schemas/PatientRecordExportOptions]/includeAnesthesiaRecords` (media type: application/*+json)
- **2026-10-21** `85ee96c0bb96`: 3 info
  - added the new optional request property `patientRecordOptions` (media type: application/json)
  - added the new optional request property `patientRecordOptions` (media type: text/json)
  - added the new optional request property `patientRecordOptions` (media type: application/*+json)

[Operation history](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/changes/api/print-jobs/from-source/post.md)

---

[API](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1.md) - [All operations](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/revisions/099cf36186e0?raw)
