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

Summary

Remove a footnote or endnote from the document.
  • Operation ID: footnotes.remove
  • API member path: editor.doc.footnotes.remove(...)
  • Mutates document: yes
  • Idempotency: non-idempotent
  • Supports tracked mode: no
  • Supports dry run: no
  • Deterministic target resolution: yes

Expected result

Returns a FootnoteMutationResult indicating success or a failure.

Input fields

FieldTypeRequiredDescription
targetobject(kind=“entity”)yes
target.entityType"footnote"yesConstant: "footnote"
target.kind"entity"yesConstant: "entity"
target.noteIdstringyes

Example request

{
  "target": {
    "entityType": "footnote",
    "kind": "entity",
    "noteId": "example"
  }
}

Output fields

Variant 1 (footnote.kind=“entity”)

FieldTypeRequiredDescription
footnoteobject(kind=“entity”)yes
footnote.entityType"footnote"yesConstant: "footnote"
footnote.kind"entity"yesConstant: "entity"
footnote.noteIdstringyes
successtrueyesConstant: true

Variant 2 (success=false)

FieldTypeRequiredDescription
failureobjectyes
failure.codestringyes
failure.detailsanyno
failure.messagestringyes
successfalseyesConstant: false

Example response

{
  "footnote": {
    "entityType": "footnote",
    "kind": "entity",
    "noteId": "example"
  },
  "success": true
}

Pre-apply throws

  • TARGET_NOT_FOUND
  • INVALID_TARGET
  • CAPABILITY_UNAVAILABLE

Non-applied failure codes

  • None

Raw schemas

{
  "additionalProperties": false,
  "properties": {
    "target": {
      "additionalProperties": false,
      "properties": {
        "entityType": {
          "const": "footnote"
        },
        "kind": {
          "const": "entity"
        },
        "noteId": {
          "type": "string"
        }
      },
      "required": [
        "kind",
        "entityType",
        "noteId"
      ],
      "type": "object"
    }
  },
  "required": [
    "target"
  ],
  "type": "object"
}
{
  "oneOf": [
    {
      "additionalProperties": false,
      "properties": {
        "footnote": {
          "additionalProperties": false,
          "properties": {
            "entityType": {
              "const": "footnote"
            },
            "kind": {
              "const": "entity"
            },
            "noteId": {
              "type": "string"
            }
          },
          "required": [
            "kind",
            "entityType",
            "noteId"
          ],
          "type": "object"
        },
        "success": {
          "const": true
        }
      },
      "required": [
        "success",
        "footnote"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "failure": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "type": "string"
            },
            "details": {},
            "message": {
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "type": "object"
        },
        "success": {
          "const": false
        }
      },
      "required": [
        "success",
        "failure"
      ],
      "type": "object"
    }
  ]
}
{
  "additionalProperties": false,
  "properties": {
    "footnote": {
      "additionalProperties": false,
      "properties": {
        "entityType": {
          "const": "footnote"
        },
        "kind": {
          "const": "entity"
        },
        "noteId": {
          "type": "string"
        }
      },
      "required": [
        "kind",
        "entityType",
        "noteId"
      ],
      "type": "object"
    },
    "success": {
      "const": true
    }
  },
  "required": [
    "success",
    "footnote"
  ],
  "type": "object"
}
{
  "additionalProperties": false,
  "properties": {
    "failure": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "details": {},
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "success": {
      "const": false
    }
  },
  "required": [
    "success",
    "failure"
  ],
  "type": "object"
}