Skip to main content
Alpha: Document API is currently alpha and subject to breaking changes.

Summary

Get a single header/footer slot entry by address.
  • Operation ID: headerFooters.get
  • API member path: editor.doc.headerFooters.get(...)
  • Mutates document: no
  • Idempotency: idempotent
  • Supports tracked mode: no
  • Supports dry run: no
  • Deterministic target resolution: yes

Expected result

Returns a HeaderFooterSlotEntry for the targeted section slot.

Input fields

FieldTypeRequiredDescription
targetobject(kind=“headerFooterSlot”)yes
target.headerFooterKindenumyes"header", "footer"
target.kind"headerFooterSlot"yesConstant: "headerFooterSlot"
target.sectionSectionAddressyesSectionAddress
target.section.kind"section"yesConstant: "section"
target.section.sectionIdstringyes
target.variantenumyes"default", "first", "even"

Example request

{
  "target": {
    "headerFooterKind": "header",
    "kind": "headerFooterSlot",
    "section": {
      "kind": "section",
      "sectionId": "example"
    },
    "variant": "default"
  }
}

Output fields

FieldTypeRequiredDescription
isExplicitbooleanyes
kindenumyes"header", "footer"
refIdanyno
sectionSectionAddressyesSectionAddress
section.kind"section"yesConstant: "section"
section.sectionIdstringyes
sectionIndexintegeryes
variantenumyes"default", "first", "even"

Example response

{
  "isExplicit": true,
  "kind": "header",
  "refId": {},
  "section": {
    "kind": "section",
    "sectionId": "example"
  },
  "sectionIndex": 1,
  "variant": "default"
}

Pre-apply throws

  • TARGET_NOT_FOUND
  • INVALID_TARGET
  • INVALID_INPUT

Non-applied failure codes

  • None

Raw schemas

{
  "additionalProperties": false,
  "properties": {
    "target": {
      "additionalProperties": false,
      "properties": {
        "headerFooterKind": {
          "enum": [
            "header",
            "footer"
          ]
        },
        "kind": {
          "const": "headerFooterSlot"
        },
        "section": {
          "$ref": "#/$defs/SectionAddress"
        },
        "variant": {
          "enum": [
            "default",
            "first",
            "even"
          ]
        }
      },
      "required": [
        "kind",
        "section",
        "headerFooterKind",
        "variant"
      ],
      "type": "object"
    }
  },
  "required": [
    "target"
  ],
  "type": "object"
}
{
  "additionalProperties": false,
  "properties": {
    "isExplicit": {
      "type": "boolean"
    },
    "kind": {
      "enum": [
        "header",
        "footer"
      ]
    },
    "refId": {
      "type": [
        "string",
        "null"
      ]
    },
    "section": {
      "$ref": "#/$defs/SectionAddress"
    },
    "sectionIndex": {
      "minimum": 0,
      "type": "integer"
    },
    "variant": {
      "enum": [
        "default",
        "first",
        "even"
      ]
    }
  },
  "required": [
    "section",
    "sectionIndex",
    "kind",
    "variant",
    "isExplicit"
  ],
  "type": "object"
}