Skip to content

Wallet APIs

Sahil Kharya edited this page May 27, 2020 · 2 revisions

These are all Wallet APIs in this Project:


  • POST: http://localhost:8080/wallet

    This POST request is used to create or update the wallet.

    Request Body to create wallet:

    { "amount": 0, "borrowId": "string", "comment": "string", "lenderId": "string", "txnType": "DEBIT", }

    Request Body to update wallet:

    { "amount": 0, "borrowId": "string", "comment": "string", "lenderId": "string", "txnType": "DEBIT", "walletId": 0 }

    Response Body (same for both):

    { "amount": 0, "borrowId": "string", "comment": "string", "createdDate": "2020-05-27T10:35:15.388Z", "lenderId": "string", "txnType": "DEBIT", "updatedDate": "2020-05-27T10:35:15.388Z", "walletId": 0 }


  • GET: http://localhost:8080/wallet/lenderId/{lenderId}

    This GET API is used to get the wallets list using lenderId.

    Request Parameter:

    String: {lenderId}

    Response Body:

    [ { "balance": 0, "borrowId": "string", "createdDate": "2020-05-27T10:39:26.437Z", "lenderId": "string", "updatedDate": "2020-05-27T10:39:26.438Z", "walletId": 0 } ]


  • GET: http://localhost:8080/wallet/lenderId/{lenderId}/borrowId/{borrowId}

    This GET API is used to get the wallet using lenderId and borrowId from database.

    Request Parameter:

    String: {lenderId}

    String: {borrowId}

    Response Body:

    { "balance": 0, "borrowId": "string", "createdDate": "2020-05-27T10:39:26.437Z", "lenderId": "string", "updatedDate": "2020-05-27T10:39:26.438Z", "walletId": 0 }


  • GET: http://localhost:8080/wallet/walletId/{walletId}

    This GET API is used to get the wallet using walletId from Database.

    Request Parameter:

    String: {walletId}

    Response Body:

    { "balance": 0, "borrowId": "string", "createdDate": "2020-05-27T10:39:26.437Z", "lenderId": "string", "updatedDate": "2020-05-27T10:39:26.438Z", "walletId": 0 }



  • DELETE: http://localhost:8080/wallet/walletId/{walletId}

    This API is used to delete the wallet using walletId from Database.

    Request Parameter:

    String: {walletId}

    Response Body:

    true



  • GET: http://localhost:8080/wallet/wallets

    This GET API is used to get the list of all wallets from Database.

    Response Body:

    [ { "balance": 0, "borrowId": "string", "createdDate": "2020-05-27T10:39:26.437Z", "lenderId": "string", "updatedDate": "2020-05-27T10:39:26.438Z", "walletId": 0 } ]

Clone this wiki locally