CloudPDF
DocsPricing
Start building

List form fields

GET/v1/docs/{docId}/layers/{layerName}/formv3.0.0-next.15

The form: every field with its value, every widget's row (its place, look and state), and the calculation order. A form field's widgets come with the form, never with the annotations.

Authentication#

Any one of these credentials is accepted.

API token

The deployment's static root credential (CLOUDPDF_API_AUTH_TOKENS), valid on every surface.

Document token

Doc-scoped JWT, valid only on the /v1/docs/{docId} subtree it names, gated by the capability scopes it carries (each operation's x-required-capability).

Document capabilitydoc.forms.read

Parameters#

docIdpathstringrequired
layerNamepathstringrequired
X-Document-Passwordheaderstring

Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

SDK examples#

The selected SDK is remembered across the API reference. Values are examples; replace them with identifiers and input from your application.

import { CloudPDFClient } from "@cloudpdf/sdk";

const client = new CloudPDFClient({
  baseUrl: "https://yourhost.com/path/to/api",
  token: "<token>",
});

await client.doc.forms.list({
  docId: "docId",
  layerName: "layerName"
});

Responses#

200OK
application/jsonDocFormsList200Response
formKind"none" | "acroform" | "xfa"
needsAppearancesboolean
fieldsFormField[]
family =
refFormFieldRef
kind =
kind"objectNumber"
objectNumberinteger
namestring
origin"acroform" | "recovered"
readOnlyboolean
requiredboolean
noExportboolean
alternateNamestring
mappingNamestring
valueEntry"none" | "scalar" | "array" | "unsupported"
kind =
kind"none"
defaultValueEntry"none" | "scalar" | "array" | "unsupported"
kind =
kind"none"
actionsPdfFieldActionsoptional
keystrokePdfActionTreeoptional
rootPdfActionNode
incompleteboolean
warningFlagsinteger
warnings("cycle-dropped" | "malformed-next" | "incomplete" | "payload-dropped")[]
formatPdfActionTreeoptional
rootPdfActionNode
incompleteboolean
warningFlagsinteger
warnings("cycle-dropped" | "malformed-next" | "incomplete" | "payload-dropped")[]
validatePdfActionTreeoptional
rootPdfActionNode
incompleteboolean
warningFlagsinteger
warnings("cycle-dropped" | "malformed-next" | "incomplete" | "payload-dropped")[]
calculatePdfActionTreeoptional
rootPdfActionNode
incompleteboolean
warningFlagsinteger
warnings("cycle-dropped" | "malformed-next" | "incomplete" | "payload-dropped")[]
groupIdstring
createdBystring
createdAtstring<date-time>
filledBystring
filledByNamestring
filledAtstring<date-time>
importedBystring
widgetsFormWidget[]
refAnnotationRef
objectNumberinteger
pagePageRef
family"text"
valuestring
defaultValuestring
maxLengthinteger
multilineboolean
passwordboolean
combboolean
widgetsWidgetAnnotation[]
subtype"widget"
refAnnotationRef
kind =
kind"objectNumber"
pagePageRef
kind"objectNumber"
objectNumberinteger
objectNumberinteger
pagePageRef
kind"objectNumber"
objectNumberinteger
hasAppearanceboolean
appearanceStatestring
nmstring
rectobject
xnumber
ynumber
widthnumber
heightnumber
contentsstring
subjectstring
blendMode"normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity"
invisibleboolean
hiddenboolean
printboolean
noZoomboolean
noRotateboolean
noViewboolean
readOnlyboolean
lockedboolean
toggleNoViewboolean
lockedContentsboolean
replyobject
toAnnotationRef
kind =
kind"objectNumber"
pagePageRef
objectNumberinteger
type"reply" | "group"
popupAnnotationRef
groupIdstring
authorstring
createdAtstring<date-time>
modifiedAtstring<date-time>
userIdstring
createdBystring
modifiedBystring
importedBystring
actionsPdfAnnotationActions
boxobject
xnumber
ynumber
widthnumber
heightnumber
rotation0 | 90 | 180 | 270
colorstring
interiorColorstring
strokeWidthnumber
borderStyle"solid" | "dashed" | "beveled" | "inset" | "underline"
dashArraynumber[]
fontFamilystring
fontSizenumber
fontColorstring
textAlign"left" | "center" | "right"
captionstring
checkStyle"check" | "cross" | "star" | "circle" | "square" | "diamond"
fieldFormFieldRef
fieldFamily"text" | "checkbox" | "radio" | "combobox" | "listbox" | "pushbutton" | "signature" | "unknown"
calculationOrderFormFieldRef[]
404Not found
application/jsonDocFormsList404Response
defaultError
application/jsonEngineErrorPayload
name"EngineError"
code"Unknown" | "InvalidArg" | "DocNotOpen" | "DocOpenFailed" | "DocPasswordRequired" | "DocPasswordIncorrect" | "SharePasswordRequired" | "Aborted" | "Network" | "Unauthenticated" | "Forbidden" | "NotFound" | "WireFormat" | "RuntimeUnavailable" | "LayerVersionConflict" | "NotImplemented" | "MalformedPdf" | "SigningPending" | "SigningExpired" | "SigningVersionMismatch" | "SignatureRefused" | "ProtectedDocument" | "StaleBase" | "PayloadTooLarge" | "ObjectNumberUnavailable" | "LayerFull" | "ChangeConflict" | "UndoUnavailable" | "IdempotencyKeyReused"
messagestring
detailsobjectoptional