{
  "openapi" : "3.1.0",
  "info" : {
    "title" : "APIs of SavingAccount Service",
    "termsOfService" : "https://docs.ebaocloud.com/docs-ebaocloud-li-docs-api/",
    "version" : "1.0"
  },
  "servers" : [ {
    "url" : "http://liteul.ebaoli/liteul/rest",
    "description" : "Generated server url"
  } ],
  "paths" : {
    "/policies/universal/accounts/withdrawal" : {
      "post" : {
        "tags" : [ "Saving Account Service" ],
        "summary" : "Account withdrawal",
        "operationId" : "accountWithdrawal",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/WithdrawalRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WithdrawalResponse"
                }
              }
            }
          }
        }
      }
    },
    "/policies/universal/accounts/topup" : {
      "post" : {
        "tags" : [ "Saving Account Service" ],
        "summary" : "Account topup",
        "operationId" : "accountTopup",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/TopupRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/TopupResponse"
                }
              }
            }
          }
        }
      }
    },
    "/policies/universal/accounts/open" : {
      "post" : {
        "tags" : [ "Saving Account Service" ],
        "summary" : "Open Account",
        "operationId" : "openAccount",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateAccountRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CreateAccountResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components" : {
    "schemas" : {
      "InvestAccount" : {
        "type" : "object",
        "properties" : {
          "extObject" : { },
          "extendedProps" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "investId" : {
            "type" : "integer",
            "format" : "int64"
          },
          "accountCode" : {
            "type" : "string"
          },
          "accountValue" : {
            "type" : "number"
          },
          "policyId" : {
            "type" : "integer",
            "format" : "int64"
          },
          "policyNumber" : {
            "type" : "string"
          },
          "productCode" : {
            "type" : "string"
          },
          "startDate" : {
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "WithdrawalRequest" : {
        "type" : "object",
        "properties" : {
          "extObject" : { },
          "extendedProps" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "clientRequestId" : {
            "type" : "string"
          },
          "clientRequestTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "serviceReqTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "applyAmount" : {
            "type" : "number"
          },
          "applyTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "capitalChgId" : {
            "type" : "integer",
            "format" : "int64"
          },
          "investAccount" : {
            "$ref" : "#/components/schemas/InvestAccount"
          }
        }
      },
      "AccountTrans" : {
        "type" : "object",
        "properties" : {
          "extObject" : { },
          "extendedProps" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "transId" : {
            "type" : "integer",
            "format" : "int64"
          },
          "accountCode" : {
            "type" : "string"
          },
          "policyId" : {
            "type" : "integer",
            "format" : "int64"
          },
          "transCode" : {
            "type" : "integer",
            "format" : "int32"
          },
          "transAmount" : {
            "type" : "number"
          },
          "currencyId" : {
            "type" : "integer",
            "format" : "int32"
          },
          "dealTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "applyId" : {
            "type" : "integer",
            "format" : "int64"
          },
          "transChgId" : {
            "type" : "integer",
            "format" : "int64"
          },
          "investId" : {
            "type" : "integer",
            "format" : "int64"
          }
        }
      },
      "AccountTransApply" : {
        "type" : "object",
        "properties" : {
          "extObject" : { },
          "extendedProps" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "applyId" : {
            "type" : "integer",
            "format" : "int64"
          },
          "accountCode" : {
            "type" : "string"
          },
          "policyId" : {
            "type" : "integer",
            "format" : "int64"
          },
          "transCode" : {
            "type" : "integer",
            "format" : "int32"
          },
          "applyAmount" : {
            "type" : "number"
          },
          "applyTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "realApplyTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "currencyId" : {
            "type" : "integer",
            "format" : "int32"
          },
          "processStatus" : {
            "type" : "string"
          },
          "capitalChgId" : {
            "type" : "integer",
            "format" : "int64"
          },
          "transactions" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/AccountTrans"
            }
          }
        }
      },
      "ApplyTransDiff" : {
        "type" : "object",
        "properties" : {
          "extObject" : { },
          "extendedProps" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "applyId" : {
            "type" : "integer",
            "format" : "int64"
          },
          "applyAmount" : {
            "type" : "number"
          },
          "applyUnits" : {
            "type" : "number"
          },
          "transAmount" : {
            "type" : "number"
          },
          "transUnits" : {
            "type" : "number"
          },
          "amountDiff" : {
            "type" : "number"
          },
          "unitsDiff" : {
            "type" : "number"
          },
          "currencyId" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "ValidationResult" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "ruleType" : {
            "type" : "integer",
            "format" : "int32"
          },
          "extendedProps" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "ruleName" : {
            "type" : "string"
          },
          "messageLevel" : {
            "type" : "string"
          }
        }
      },
      "WithdrawalResponse" : {
        "type" : "object",
        "properties" : {
          "extObject" : { },
          "extendedProps" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "clientRequestId" : {
            "type" : "string"
          },
          "clientRequestTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "result" : {
            "type" : "integer",
            "format" : "int32"
          },
          "messages" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ValidationResult"
            }
          },
          "exceptions" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "serviceReqTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "serviceResTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "traceId" : {
            "type" : "string"
          },
          "events" : {
            "type" : "array",
            "items" : { }
          },
          "capitalChgId" : {
            "type" : "integer",
            "format" : "int64"
          },
          "investAccount" : {
            "$ref" : "#/components/schemas/InvestAccount"
          },
          "accountTransRequests" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/AccountTransApply"
            }
          },
          "applyTransDiffs" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ApplyTransDiff"
            }
          },
          "resultIfNull" : {
            "type" : "string",
            "enum" : [ "1", "0", "-1" ],
            "writeOnly" : true
          }
        }
      },
      "TopupRequest" : {
        "type" : "object",
        "properties" : {
          "extObject" : { },
          "extendedProps" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "clientRequestId" : {
            "type" : "string"
          },
          "clientRequestTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "serviceReqTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "applyAmount" : {
            "type" : "number"
          },
          "applyTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "capitalChgId" : {
            "type" : "integer",
            "format" : "int64"
          },
          "investAccount" : {
            "$ref" : "#/components/schemas/InvestAccount"
          }
        }
      },
      "TopupResponse" : {
        "type" : "object",
        "properties" : {
          "extObject" : { },
          "extendedProps" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "clientRequestId" : {
            "type" : "string"
          },
          "clientRequestTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "result" : {
            "type" : "integer",
            "format" : "int32"
          },
          "messages" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ValidationResult"
            }
          },
          "exceptions" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "serviceReqTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "serviceResTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "traceId" : {
            "type" : "string"
          },
          "events" : {
            "type" : "array",
            "items" : { }
          },
          "capitalChgId" : {
            "type" : "integer",
            "format" : "int64"
          },
          "investAccount" : {
            "$ref" : "#/components/schemas/InvestAccount"
          },
          "accountTransRequests" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/AccountTransApply"
            }
          },
          "applyTransDiffs" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ApplyTransDiff"
            }
          },
          "resultIfNull" : {
            "type" : "string",
            "enum" : [ "1", "0", "-1" ],
            "writeOnly" : true
          }
        }
      },
      "CreateAccountRequest" : {
        "type" : "object",
        "properties" : {
          "extObject" : { },
          "extendedProps" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "clientRequestId" : {
            "type" : "string"
          },
          "clientRequestTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "serviceReqTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "accountCode" : {
            "type" : "string"
          },
          "policyId" : {
            "type" : "integer",
            "format" : "int64"
          },
          "policyNumber" : {
            "type" : "string"
          },
          "productCode" : {
            "type" : "string"
          },
          "startDate" : {
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "CreateAccountResponse" : {
        "type" : "object",
        "properties" : {
          "extObject" : { },
          "extendedProps" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "clientRequestId" : {
            "type" : "string"
          },
          "clientRequestTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "result" : {
            "type" : "integer",
            "format" : "int32"
          },
          "messages" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ValidationResult"
            }
          },
          "exceptions" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "serviceReqTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "serviceResTime" : {
            "type" : "string",
            "format" : "date-time"
          },
          "traceId" : {
            "type" : "string"
          },
          "events" : {
            "type" : "array",
            "items" : { }
          },
          "investAccount" : {
            "$ref" : "#/components/schemas/InvestAccount"
          },
          "resultIfNull" : {
            "type" : "string",
            "enum" : [ "1", "0", "-1" ],
            "writeOnly" : true
          }
        }
      }
    },
    "securitySchemes" : {
      "basicScheme" : {
        "type" : "http",
        "in" : "header",
        "scheme" : "basic"
      },
      "bearer-key" : {
        "type" : "http",
        "in" : "header",
        "scheme" : "bearer",
        "bearerFormat" : "JWT"
      }
    }
  }
}