CloudPDF
DocsPricing
Start building

Get form snapshot

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

Reconciled form snapshot: fields, widgets, values.

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.get({
  docId: "docId",
  layerName: "layerName"
});

Responses#

200OK
application/jsonDocFormsGet200Response
formKind"none" | "acroform" | "xfa"
needsAppearancesboolean
fields(8 variants)[]
family =
ref"objectNumber" | "fqn"
kind =
kind"objectNumber"
fieldObjectNumberinteger
fieldObjectNumberinteger
namestring
origin"acroform" | "recovered"
flagsobject
readOnlyboolean
requiredboolean
noExportboolean
rawinteger
alternateNamestring
mappingNamestring
valueEntry"none" | "scalar" | "array" | "unsupported"
kind =
kind"none"
defaultValueEntry"none" | "scalar" | "array" | "unsupported"
kind =
kind"none"
actionsobjectoptional
keystrokeobjectoptional
rootobject
incompleteboolean
warningFlagsinteger
warnings("cycle-dropped" | "malformed-next" | "incomplete")[]
formatobjectoptional
rootobject
incompleteboolean
warningFlagsinteger
warnings("cycle-dropped" | "malformed-next" | "incomplete")[]
validateobjectoptional
rootobject
incompleteboolean
warningFlagsinteger
warnings("cycle-dropped" | "malformed-next" | "incomplete")[]
calculateobjectoptional
rootobject
incompleteboolean
warningFlagsinteger
warnings("cycle-dropped" | "malformed-next" | "incomplete")[]
widgetsobject[]
annotObjectNumberinteger
pageObjectNumberinteger
family"text"
valuestring
defaultValuestring
maxLengthinteger
multilineboolean
passwordboolean
combboolean
calculationOrder("objectNumber" | "fqn")[]
404Not found
application/jsonDocFormsGet404Response
name"EngineError"
code"Unknown" | "InvalidArg" | "DocNotOpen" | "DocOpenFailed" | "DocPasswordRequired" | "DocPasswordIncorrect" | "SharePasswordRequired" | "Aborted" | "Network" | "Unauthenticated" | "Forbidden" | "NotFound" | "WireFormat" | "RuntimeUnavailable" | "InvalidReference" | "WeakAnnotationSessionConflict" | "LayerVersionConflict" | "NotImplemented" | "MalformedPdf"
messagestring
detailsobjectoptional
defaultError
application/jsonEngineErrorPayload
name"EngineError"
code"Unknown" | "InvalidArg" | "DocNotOpen" | "DocOpenFailed" | "DocPasswordRequired" | "DocPasswordIncorrect" | "SharePasswordRequired" | "Aborted" | "Network" | "Unauthenticated" | "Forbidden" | "NotFound" | "WireFormat" | "RuntimeUnavailable" | "InvalidReference" | "WeakAnnotationSessionConflict" | "LayerVersionConflict" | "NotImplemented" | "MalformedPdf"
messagestring
detailsobjectoptional