{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-tagged-document-details-response-schema.json",
  "title": "TaggedDocumentDetailsResponse",
  "description": "Response payload for GET \"/tagged-documents/\\{documentId\\}\" API.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-express-openapi.yml#/components/schemas/TaggedDocumentDetailsResponse",
  "type": "object",
  "properties": {
    "name": {
      "description": "The name of the document.",
      "type": "string"
    },
    "id": {
      "description": "The unique identifier of the document.",
      "type": "string"
    },
    "paging": {
      "description": "Pagination details of the response.",
      "$ref": "#/$defs/Pagination"
    },
    "documentPages": {
      "description": "List of the pages from Express Document.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/DocumentPageDetails"
      }
    }
  },
  "required": [
    "documentPages",
    "id",
    "name"
  ],
  "$defs": {
    "DocumentPageDetails": {
      "description": "The details of a single page in the Express Document.",
      "type": "object",
      "properties": {
        "pageNumber": {
          "description": "The number of the page starting from 1.",
          "type": "number"
        },
        "pageTitle": {
          "description": "The title of the page.",
          "type": "string"
        },
        "thumbnailUrl": {
          "description": "Pre-signed URL for the page's thumbnail rendition valid for 4 hours.\nThe size of the rendition will be 640 pixels along the longest side. The format of the rendition will be a PNG image.",
          "type": "string"
        },
        "size": {
          "$ref": "#/$defs/Size",
          "description": "The original width and height of the page."
        },
        "taggedElements": {
          "description": "List of all the tagged elements on this page.\nIf this page do not have any tagged element, this field will be undefined.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/TaggedElement"
          }
        }
      },
      "required": [
        "pageNumber",
        "pageTitle",
        "size",
        "thumbnailUrl"
      ]
    },
    "Pagination": {
      "description": "Pagination details of the response.",
      "type": "object",
      "properties": {
        "nextUrl": {
          "description": "A URL using which the next page of the response can be fetched.",
          "type": "string"
        },
        "totalRecords": {
          "description": "Total number of items available that match the query.",
          "type": "number"
        }
      },
      "required": [
        "nextUrl",
        "totalRecords"
      ]
    },
    "Point": {
      "description": "Represents position within a page. 0,0 represents the top-left corner of a page.",
      "type": "object",
      "properties": {
        "x": {
          "description": "The left co-ordinate position in px.",
          "type": "number"
        },
        "y": {
          "description": "The top co-ordinate position in px.",
          "type": "number"
        }
      },
      "required": [
        "x",
        "y"
      ]
    },
    "Size": {
      "description": "Represents a dimension within a Page.",
      "type": "object",
      "properties": {
        "width": {
          "description": "The width in pixels ( px ).",
          "type": "number"
        },
        "height": {
          "description": "The height in pixels ( px ).",
          "type": "number"
        }
      },
      "required": [
        "height",
        "width"
      ]
    },
    "TaggedElement": {
      "description": "The details of a tag element inside the page.",
      "type": "object",
      "properties": {
        "name": {
          "description": "The name of the tag. Following rules apply to the tag name:\n\n1. In the same page, tag names should be unique.\n2. Across different pages, tags of same element type can have same name.\n3. The tag name is case-sensitive.",
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/TaggedElementType",
          "description": "The type of the tagged element."
        },
        "position": {
          "$ref": "#/$defs/Point",
          "description": "The x and y coordinates of the tagged element on the document's page, relative to the original page size."
        },
        "size": {
          "$ref": "#/$defs/Size",
          "description": "The width and height of the tagged element in the document's page relative to the original page size."
        },
        "value": {
          "description": "Represents the value of the tagged element. Use this field only for value-bearing element types, such as text.",
          "type": "string"
        }
      },
      "required": [
        "name",
        "position",
        "size",
        "type"
      ]
    },
    "TaggedElementType": {
      "description": "The supported tag types in a document.",
      "enum": [
        "image",
        "text",
        "video"
      ],
      "type": "string"
    }
  }
}