{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/akahu/main/json-schema/akahu-pdf-statement-schema.json",
  "title": "PdfStatement",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/akahu-one-off-rest-api-openapi.yml#/components/schemas/PdfStatement",
  "type": "object",
  "properties": {
    "_accounts": {
      "type": "array",
      "description": "The Account IDs described by this statement. In most cases this will only be one account, but in the case of Kiwibank, one statement is produced per account holder.",
      "items": {
        "type": "string"
      }
    },
    "description": {
      "type": "string",
      "description": "If available, how this document is described by the bank."
    },
    "meta": {
      "type": "object",
      "description": "Additional metadata concerning this document.",
      "additionalProperties": true
    },
    "period": {
      "type": "object",
      "description": "The period that this PDF covers.",
      "properties": {
        "start": {
          "type": "string",
          "format": "date-time",
          "description": "Formatted as an ISO 8601 timestamp."
        },
        "end": {
          "type": "string",
          "format": "date-time",
          "description": "Formatted as an ISO 8601 timestamp."
        }
      }
    },
    "uri": {
      "type": "string",
      "description": "A short-lived URI that can be used to access the PDF file retrieved from the bank. Each request to this endpoint generates a new URI with a new expiry."
    },
    "expires_at": {
      "type": "string",
      "description": "When the PDF URI expires. Each request to this endpoint generates a new URI with a new expiry. After expiry this URI will no longer be accessible. Formatted as an ISO 8601 timestamp.",
      "format": "date-time"
    }
  }
}