{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "urn:sbv:iso20022:camt.055.001.10",
  "title": "CustomerPaymentCancellationRequest — camt.055.001.10 (SBV profile)",
  "description": "ISO 20022 camt.055.001.10: Yêu cầu hủy lệnh thanh toán từ phía KH",
  "type": "object",
  "required": ["Document"],
  "properties": {
    "Document": {
      "type": "object",
      "required": ["CstmrPmtCxlReq"],
      "properties": {
        "CstmrPmtCxlReq": {
          "type": "object",
          "required": ["Assgnmt", "Undrlyg"],
          "properties": {
            "Assgnmt": {
              "type": "object",
              "required": ["Id", "Assgnr", "Assgne", "CreDtTm"],
              "properties": {
                "Id":       { "type": "string", "maxLength": 35 },
                "Assgnr":   { "type": "object" },
                "Assgne":   { "type": "object" },
                "CreDtTm":  { "type": "string", "format": "date-time" }
              }
            },
            "CtrlData": {
              "type": "object",
              "properties": { "NbOfTxs": { "type": "string", "pattern": "^[0-9]{1,15}$" } }
            },
            "Undrlyg": {
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "object",
                "properties": {
                  "OrgnlGrpInfAndCxl": {
                    "type": "object",
                    "properties": {
                      "OrgnlMsgId":   { "type": "string", "maxLength": 35 },
                      "OrgnlMsgNmId": { "type": "string", "maxLength": 35 },
                      "CxlRsnInf": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "Rsn": { "type": "object", "properties": { "Cd": { "type": "string", "maxLength": 4 } } }
                          }
                        }
                      }
                    }
                  },
                  "TxInf": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "CxlId":          { "type": "string", "maxLength": 35 },
                        "OrgnlEndToEndId":{ "type": "string", "maxLength": 35 },
                        "OrgnlUETR":      { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
