---
title: "Update a patientFormPdfTemplate"
method: PUT
path: "/patientFormPdfTemplates/{patientFormPdfTemplateId}"
tags: ["patientFormPdfTemplates"]
---

# Update a patientFormPdfTemplate

`PUT /patientFormPdfTemplates/{patientFormPdfTemplateId}`

## Path parameters

- `patientFormPdfTemplateId` string, required

## Request body

- PatientFormPdfTemplateRequestUpdate
  - `name` string — name of the pdf form template
  - `fileUpload` string — ID of the uploaded source PDF this template's fields are positioned against
  - `pages` integer — number of pages in the source PDF
  - `fields` object[] — fields placed on the source PDF
    - `page` integer, required — 0-indexed page number within the source PDF this field is placed on
    - `type` 'text' | 'signature' | 'checkbox' | 'date' | 'number', required — type of the pdf form template field
    - `x` number, required — fraction (0-1) of the page width, measured from the left edge
    - `y` number, required — fraction (0-1) of the page height, measured from the top edge
    - `width` number, required — fraction (0-1) of the page width
    - `height` number, required — fraction (0-1) of the page height
    - `mappingField` string — when set, this field auto-fills from the matching PatientFormMappingFields concept instead of being filled in manually
    - `label` string — custom field label, used for manual fill when mappingField is not set
    - `placeholderText` string — patient-facing guidance text shown inside the field, distinct from the internal label
    - `defaultValue` string — default value pre-filled for this field, regardless of type
    - `minLength` integer — minimum number of characters accepted. Only meaningful when type is text
    - `maxLength` integer — maximum number of characters accepted. Only meaningful when type is text
    - `dateRange` 'any' | 'future' | 'past' — restricts which dates are accepted. Only meaningful when type is date

## Response `200`

PatientFormPdfTemplate

- PatientFormPdfTemplateResponse — A client-uploaded PDF template for the standalone PDF form-builder feature: a PDF is uploaded, fields are placed on it via drag-and-drop, and the result is saved so it can later be filled out to produce a completed PDF. Despite the similar name, this is unrelated to PatientFormTemplate, which drives the existing question-based patient intake forms.
  - `_id` string — Luma's internal ID of an object.
  - `user` string — The ID of the root account user.
  - `deleted` 0 | 1 — Flag for logical deletion where 1 means deleted.
  - `createdBy` string — The ID of the user who created this object.
  - `updatedBy` string — The ID of the user who updated this object.
  - `createdAt` string, date-time — The date/time when this object was created.
  - `updatedAt` string, date-time — The date/time when this object was updated.
  - `name` string — name of the pdf form template
  - `fileUpload` string — ID of the uploaded source PDF this template's fields are positioned against
  - `pages` integer — number of pages in the source PDF
  - `fields` object[] — fields placed on the source PDF
    - `page` integer, required — 0-indexed page number within the source PDF this field is placed on
    - `type` 'text' | 'signature' | 'checkbox' | 'date' | 'number', required — type of the pdf form template field
    - `x` number, required — fraction (0-1) of the page width, measured from the left edge
    - `y` number, required — fraction (0-1) of the page height, measured from the top edge
    - `width` number, required — fraction (0-1) of the page width
    - `height` number, required — fraction (0-1) of the page height
    - `mappingField` string — when set, this field auto-fills from the matching PatientFormMappingFields concept instead of being filled in manually
    - `label` string — custom field label, used for manual fill when mappingField is not set
    - `placeholderText` string — patient-facing guidance text shown inside the field, distinct from the internal label
    - `defaultValue` string — default value pre-filled for this field, regardless of type
    - `minLength` integer — minimum number of characters accepted. Only meaningful when type is text
    - `maxLength` integer — maximum number of characters accepted. Only meaningful when type is text
    - `dateRange` 'any' | 'future' | 'past' — restricts which dates are accepted. Only meaningful when type is date

## Other responses

- `401` — Not authenticated
- `403` — Access token does not have the required scope

---

[API](https://skmtc.net/lumahealth/apis/rest-service.md) · [All operations](https://skmtc.net/lumahealth/apis/rest-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lumahealth/rest-service/revisions/d3c75c2a2f1d/schema)
