{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pdfbetter-com/json-schema/pdfbetter-com-field-list-schema.json",
  "title": "FieldList",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pdfbetter-com-openapi.json#/components/schemas/FieldList",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "field_list"
    },
    "documentId": {
      "type": "string"
    },
    "revision": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Document revision; pass as `expectedRevision` to fill safely"
    },
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name you fill by. Radio groups are one entry named after the group."
          },
          "type": {
            "type": "string",
            "description": "Model fields: text, number, date, checkbox, radio, dropdown, signature, … PDF fields: text, checkbox, radio, dropdown, optionlist, signature, button"
          },
          "source": {
            "type": "string",
            "enum": [
              "model",
              "pdf"
            ],
            "description": "`model` = added in PDFBetter; `pdf` = AcroForm field that was already in the uploaded PDF"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "readOnly": {
            "type": "boolean"
          },
          "options": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "value": {
            "type": [
              "string",
              "number",
              "boolean",
              "null"
            ]
          },
          "page": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "1-based page number"
          },
          "multiline": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "maxLength": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "name",
          "type",
          "source",
          "label",
          "required",
          "readOnly",
          "options",
          "value",
          "page",
          "multiline",
          "maxLength"
        ],
        "additionalProperties": false
      }
    },
    "updated": {
      "description": "Fields changed by this request (fill only)",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "object",
    "documentId",
    "revision",
    "data"
  ],
  "additionalProperties": false
}