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

Summary

Clear an explicit header/footer reference from a section slot.
  • Operation ID: headerFooters.refs.clear
  • API member path: editor.doc.headerFooters.refs.clear(...)
  • Mutates document: yes
  • Idempotency: conditional
  • Supports tracked mode: no
  • Supports dry run: yes
  • Deterministic target resolution: yes

Expected result

Returns a SectionMutationResult receipt; reports NO_OP if no explicit reference existed.

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
sectionSectionAddressyesSectionAddress
section.kind"section"yesConstant: "section"
section.sectionIdstringyes
successtrueyesConstant: true

Variant 2 (success=false)

FieldTypeRequiredDescription
failureobjectyes
failure.codeenumyes"NO_OP"
failure.detailsanyno
failure.messagestringyes
successfalseyesConstant: false

Example response

{
  "section": {
    "kind": "section",
    "sectionId": "example"
  },
  "success": true
}

Pre-apply throws

  • TARGET_NOT_FOUND
  • INVALID_TARGET
  • INVALID_INPUT
  • CAPABILITY_UNAVAILABLE
  • INTERNAL_ERROR

Non-applied failure codes

  • NO_OP

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": {
        "section": {
          "$ref": "#/$defs/SectionAddress"
        },
        "success": {
          "const": true
        }
      },
      "required": [
        "success",
        "section"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "failure": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "enum": [
                "NO_OP"
              ]
            },
            "details": {},
            "message": {
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "type": "object"
        },
        "success": {
          "const": false
        }
      },
      "required": [
        "success",
        "failure"
      ],
      "type": "object"
    }
  ]
}
{
  "additionalProperties": false,
  "properties": {
    "section": {
      "$ref": "#/$defs/SectionAddress"
    },
    "success": {
      "const": true
    }
  },
  "required": [
    "success",
    "section"
  ],
  "type": "object"
}
{
  "additionalProperties": false,
  "properties": {
    "failure": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "enum": [
            "NO_OP"
          ]
        },
        "details": {},
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "success": {
      "const": false
    }
  },
  "required": [
    "success",
    "failure"
  ],
  "type": "object"
}