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

Summary

Resolve the effective header/footer reference for a slot, walking the section inheritance chain.
  • Operation ID: headerFooters.resolve
  • API member path: editor.doc.headerFooters.resolve(...)
  • Mutates document: no
  • Idempotency: idempotent
  • Supports tracked mode: no
  • Supports dry run: no
  • Deterministic target resolution: yes

Expected result

Returns a HeaderFooterResolveResult indicating explicit, inherited, or none status with the resolved refId.

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

Variant 1 (section.kind=“section”)

FieldTypeRequiredDescription
refIdstringyes
sectionSectionAddressyesSectionAddress
section.kind"section"yesConstant: "section"
section.sectionIdstringyes
status"explicit"yesConstant: "explicit"

Variant 2 (resolvedFromSection.kind=“section”)

FieldTypeRequiredDescription
refIdstringyes
resolvedFromSectionSectionAddressyesSectionAddress
resolvedFromSection.kind"section"yesConstant: "section"
resolvedFromSection.sectionIdstringyes
resolvedVariantenumyes"default", "first", "even"
status"inherited"yesConstant: "inherited"

Variant 3 (status=“none”)

FieldTypeRequiredDescription
status"none"yesConstant: "none"

Example response

{
  "refId": "example",
  "section": {
    "kind": "section",
    "sectionId": "example"
  },
  "status": "explicit"
}

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"
}
{
  "oneOf": [
    {
      "additionalProperties": false,
      "properties": {
        "refId": {
          "type": "string"
        },
        "section": {
          "$ref": "#/$defs/SectionAddress"
        },
        "status": {
          "const": "explicit"
        }
      },
      "required": [
        "status",
        "refId",
        "section"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "refId": {
          "type": "string"
        },
        "resolvedFromSection": {
          "$ref": "#/$defs/SectionAddress"
        },
        "resolvedVariant": {
          "enum": [
            "default",
            "first",
            "even"
          ]
        },
        "status": {
          "const": "inherited"
        }
      },
      "required": [
        "status",
        "refId",
        "resolvedFromSection",
        "resolvedVariant"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "status": {
          "const": "none"
        }
      },
      "required": [
        "status"
      ],
      "type": "object"
    }
  ]
}