{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "urn:sbv:iso20022:camt.060.001.05",
  "title": "AccountReportingRequest — camt.060.001.05 (SBV profile)",
  "description": "ISO 20022 camt.060.001.05: Yêu cầu báo cáo tài khoản",
  "type": "object",
  "required": ["Document"],
  "properties": {
    "Document": {
      "type": "object",
      "required": ["AcctRptgReq"],
      "properties": {
        "AcctRptgReq": {
          "type": "object",
          "required": ["GrpHdr", "RptgReq"],
          "properties": {
            "GrpHdr": {
              "type": "object",
              "required": ["MsgId", "CreDtTm", "MsgRcpt"],
              "properties": {
                "MsgId":   { "type": "string", "maxLength": 35 },
                "CreDtTm": { "type": "string", "format": "date-time" },
                "MsgPgntn":{ "type": "object", "properties": { "PgNb": { "type": "string" }, "LastPgInd": { "type": "boolean" } } },
                "MsgRcpt": { "type": "object", "properties": { "Nm": { "type": "string", "maxLength": 140 } } }
              }
            },
            "RptgReq": {
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "object",
                "required": ["Id", "Acct"],
                "properties": {
                  "Id":       { "type": "string", "maxLength": 35 },
                  "ReqdMsgNmId": { "type": "string", "maxLength": 35 },
                  "Acct": {
                    "type": "object",
                    "required": ["Id"],
                    "properties": {
                      "Id":   { "type": "object", "properties": { "Othr": { "type": "object", "properties": { "Id": { "type": "string" } } } } },
                      "Ccy":  { "type": "string", "pattern": "^[A-Z]{3}$" },
                      "Ownr": { "type": "object", "properties": { "Nm": { "type": "string", "maxLength": 140 } } }
                    }
                  },
                  "AcctOwnr": { "type": "object", "properties": { "Nm": { "type": "string", "maxLength": 140 } } },
                  "AcctSvcr": { "type": "object", "properties": { "FinInstnId": { "type": "object", "properties": { "BICFI": { "type": "string" } } } } },
                  "RptgPrd":  { "type": "object", "properties": { "FrToDt": { "type": "object", "properties": { "FrDt": { "type": "string", "format": "date" }, "ToDt": { "type": "string", "format": "date" } } } } }
                }
              }
            }
          }
        }
      }
    }
  }
}
