Skip to Content

Get a document field

You're viewing API version 2026-09, which is deprecated and stops working on October 1, 2027. To move your integration, see Upgrading to 2026-10.
GET
/api/v1/documents/{id}/fields/{fieldId}

Get one content block of a document by its field ID, with full type-specific metadata.

Authorization

headerAuthorizationBearer <token>

Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.

Path Parameters

id*string
fieldId*string

Header Parameters

authorization*string

Bearer token for API authentication

Response Body

200

application/json
  1. response
id*string

Unique field identifier

documentId?|

Document this field belongs to

templateId?|

Template this field belongs to

type*string

Field type

Value in"TEXT""HTML""FORM""PDF""PRODUCT_TABLE""TABLE""SPACER""PAGE_BREAK""DURATION"
position*number

0-based order of the field among the document's content blocks

fieldMeta*||||||||

Type-specific content. For PDF fields this includes placedFields (boxes placed on the PDF pages) and formFields (form fields extracted from the PDF).

createdAt?unknown
updatedAt?unknown
Example Request
curl -X GET 'https://app.sajn.se/api/v1/documents/string/fields/string' \  -H 'authorization: string'
Example Response
{  "id": "string",  "documentId": "string",  "templateId": "string",  "type": "TEXT",  "position": 0,  "fieldMeta": {    "type": "TEXT",    "content": "string",    "locked": true,    "sectionStyle": {      "background": "none",      "padding": "none",      "bleed": true,      "border": true    },    "visibilityRule": {      "customInputId": "string",      "equals": "string",      "mode": "SHOW_WHEN"    },    "hidden": true  },  "createdAt": null,  "updatedAt": null}

Was this page helpful?