{
    "openapi": "3.0.3",
    "info": {
        "title": "Zung Member Mobile API",
        "version": "v1",
        "description": "Generated from mfidoc.com. Planned endpoints are excluded.",
        "contact": {
            "email": "dev@mfidoc.com"
        }
    },
    "servers": [
        {
            "url": "https://app.zung.ai/api/mobile"
        }
    ],
    "components": {
        "securitySchemes": {
            "bearer": {
                "type": "http",
                "scheme": "bearer"
            }
        }
    },
    "security": [
        {
            "bearer": []
        }
    ],
    "paths": {
        "/login": {
            "post": {
                "tags": [
                    "Member Sign-in"
                ],
                "summary": "Member sign-in",
                "description": "Exchanges a member's login and password for a bearer token.\n\nDocs: https://mfidoc.com/doc/mobile-login",
                "operationId": "mobileLogin",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Missing or expired token"
                    },
                    "403": {
                        "description": "Not permitted"
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "login": {
                                        "type": "string",
                                        "description": "Username, email or mobile number"
                                    },
                                    "password": {
                                        "type": "string",
                                        "description": "Member password"
                                    }
                                },
                                "required": [
                                    "login",
                                    "password"
                                ]
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "login": {
                                        "type": "string",
                                        "description": "Username, email or mobile number"
                                    },
                                    "password": {
                                        "type": "string",
                                        "description": "Member password"
                                    }
                                },
                                "required": [
                                    "login",
                                    "password"
                                ]
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/me": {
            "get": {
                "tags": [
                    "Member Sign-in"
                ],
                "summary": "Get signed-in member",
                "description": "The member profile behind the token.\n\nDocs: https://mfidoc.com/doc/mobile-me",
                "operationId": "mobileMe",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Missing or expired token"
                    },
                    "403": {
                        "description": "Not permitted"
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                }
            }
        },
        "/logout": {
            "post": {
                "tags": [
                    "Member Sign-in"
                ],
                "summary": "Member sign-out",
                "description": "Revokes the member's token.\n\nDocs: https://mfidoc.com/doc/mobile-logout",
                "operationId": "mobileLogout",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Missing or expired token"
                    },
                    "403": {
                        "description": "Not permitted"
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                }
            }
        },
        "/dashboard": {
            "get": {
                "tags": [
                    "Member Accounts"
                ],
                "summary": "Member dashboard",
                "description": "Balances across loans, savings, shares and wallets in one call.\n\nDocs: https://mfidoc.com/doc/mobile-dashboard",
                "operationId": "mobileDashboard",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Missing or expired token"
                    },
                    "403": {
                        "description": "Not permitted"
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                }
            }
        },
        "/loans": {
            "get": {
                "tags": [
                    "Member Accounts"
                ],
                "summary": "My loans",
                "description": "The member's loans with balances and next due date.\n\nDocs: https://mfidoc.com/doc/mobile-loans",
                "operationId": "mobileLoans",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Missing or expired token"
                    },
                    "403": {
                        "description": "Not permitted"
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                }
            }
        },
        "/loans/{id}": {
            "get": {
                "tags": [
                    "Member Accounts"
                ],
                "summary": "My loan detail",
                "description": "One loan with its repayment schedule.\n\nDocs: https://mfidoc.com/doc/mobile-loan",
                "operationId": "mobileLoan",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Missing or expired token"
                    },
                    "403": {
                        "description": "Not permitted"
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Loan id",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ]
            }
        },
        "/savings": {
            "get": {
                "tags": [
                    "Member Accounts"
                ],
                "summary": "My savings",
                "description": "The member's savings accounts.\n\nDocs: https://mfidoc.com/doc/mobile-savings",
                "operationId": "mobileSavings",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Missing or expired token"
                    },
                    "403": {
                        "description": "Not permitted"
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                }
            }
        },
        "/shares": {
            "get": {
                "tags": [
                    "Member Accounts"
                ],
                "summary": "My shares",
                "description": "Share capital held by the member (SACCOs).\n\nDocs: https://mfidoc.com/doc/mobile-shares",
                "operationId": "mobileShares",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Missing or expired token"
                    },
                    "403": {
                        "description": "Not permitted"
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                }
            }
        },
        "/fixed-deposits": {
            "get": {
                "tags": [
                    "Member Accounts"
                ],
                "summary": "My fixed deposits",
                "description": "Fixed deposits with maturity dates.\n\nDocs: https://mfidoc.com/doc/mobile-fixed-deposits",
                "operationId": "mobileFixedDeposits",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Missing or expired token"
                    },
                    "403": {
                        "description": "Not permitted"
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                }
            }
        },
        "/wallets": {
            "get": {
                "tags": [
                    "Member Accounts"
                ],
                "summary": "My wallets",
                "description": "The member's wallets and balances.\n\nDocs: https://mfidoc.com/doc/mobile-wallets",
                "operationId": "mobileWallets",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Missing or expired token"
                    },
                    "403": {
                        "description": "Not permitted"
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                }
            }
        },
        "/statement": {
            "get": {
                "tags": [
                    "Member Accounts"
                ],
                "summary": "Account statement",
                "description": "A combined statement across the member's accounts.\n\nDocs: https://mfidoc.com/doc/mobile-statement",
                "operationId": "mobileStatement",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Missing or expired token"
                    },
                    "403": {
                        "description": "Not permitted"
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                }
            }
        },
        "/loans/products": {
            "get": {
                "tags": [
                    "Applications"
                ],
                "summary": "Loan products",
                "description": "Loan products the member can apply for.\n\nDocs: https://mfidoc.com/doc/mobile-loan-products",
                "operationId": "mobileLoanProducts",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Missing or expired token"
                    },
                    "403": {
                        "description": "Not permitted"
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                }
            }
        },
        "/loans/preview": {
            "post": {
                "tags": [
                    "Applications"
                ],
                "summary": "Preview a loan",
                "description": "Instalment, interest and fees for an amount and term before applying. 30 requests a minute.\n\nDocs: https://mfidoc.com/doc/mobile-loan-preview",
                "operationId": "mobileLoanPreview",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Missing or expired token"
                    },
                    "403": {
                        "description": "Not permitted"
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                }
            }
        },
        "/loans/apply": {
            "post": {
                "tags": [
                    "Applications"
                ],
                "summary": "Apply for a loan",
                "description": "Submits a loan application from the member's phone.\n\nDocs: https://mfidoc.com/doc/mobile-loan-apply",
                "operationId": "mobileLoanApply",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Missing or expired token"
                    },
                    "403": {
                        "description": "Not permitted"
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                }
            }
        },
        "/applications/{type}": {
            "post": {
                "tags": [
                    "Applications"
                ],
                "summary": "Apply for savings or fixed deposit",
                "description": "type is savings or fixed-deposits. 20 requests a minute.\n\nDocs: https://mfidoc.com/doc/mobile-apply-product",
                "operationId": "mobileApplyProduct",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Missing or expired token"
                    },
                    "403": {
                        "description": "Not permitted"
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                },
                "parameters": [
                    {
                        "name": "type",
                        "in": "path",
                        "required": true,
                        "description": "savings or fixed-deposits",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/applications/{type}/{id}/cancel": {
            "post": {
                "tags": [
                    "Applications"
                ],
                "summary": "Cancel an application",
                "description": "Withdraws a pending loan, savings or fixed deposit application.\n\nDocs: https://mfidoc.com/doc/mobile-cancel-application",
                "operationId": "mobileCancelApplication",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Missing or expired token"
                    },
                    "403": {
                        "description": "Not permitted"
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                },
                "parameters": [
                    {
                        "name": "type",
                        "in": "path",
                        "required": true,
                        "description": "loans, savings or fixed-deposits",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Application id",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ]
            }
        },
        "/wallets/{id}/transfer": {
            "post": {
                "tags": [
                    "Wallet Transfers"
                ],
                "summary": "Transfer from wallet",
                "description": "Moves money from the member's wallet, e.g. to repay a loan or fund savings. 20 requests a minute.\n\nDocs: https://mfidoc.com/doc/mobile-wallet-transfer",
                "operationId": "mobileWalletTransfer",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Missing or expired token"
                    },
                    "403": {
                        "description": "Not permitted"
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Wallet id",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ]
            }
        }
    }
}