Skip to end of metadata
Go to start of metadata

For the investor portals a web service is created to allow loan creation from the investor portal. The webservice contains 3 controllers, expecting or return json data.

There are 4 controllers available:

  1. Evo - Fetch account information from the evolution database
  2. HomeSettings - Get default values for the administration in use
  3. Loan - Create (edit existing) loan
  4. Party - Create, edit or fetch loan party information

Controllers

1. Evo

Fetch accounts;

URL: /api/Evo/{Account type}/{Account usage}

Get a list of available accounts, depending on type and usage

Valid values for account type: GLAccount APAccount ARAccount
Valid values for account usage: None Interest_Income_Account Accrued_Interest_Account Principal_Account Default

return value: a serialized datatable object

2. Home settings

URL: /api/HomeSettings

Get all settings for the administration in use.
return value: a serialized datatable object

URL: /api/HomeSettings/id/{id:int}

Get a specific setting by ID
return value: a serialized datatable object

URL: /api/HomeSettings/code/{code:string}

Get a specific setting by code
return value: a serialized datatable object

URL: /api/HomeSettings/enums

Get all LMS enumerations (like account type, account usage, etc)
return value: a serialized object containing enums with for each enum it'e enumerations

URL: /api/HomeSettings/currencies

Get all (foreign) currencies in use by the administration
return value: a serialized datatable object

URL: /api/HomeSettings/interesttypes

Get all interest types (periods) in use for this administration. Note: by default  a "fixed" interest type is available. Administrators can add interest periods which will be used in loan calculations.
return value: a serialized datatable object

3. Loan

URL: /api/Loan/save

Expects a loan object to save to the LMS administration.  The object should implement the LMS  ILoansUI interface

return value: saved loan id or error collection

Loan interface
public interface ILoansUI
		{
		int LoanId { get; set; }
		int StatusOfLoanId { get; set; }
		string LoanName { get; set; }
		bool IsLending { get; set; }
		int PartyToId { get; set; }
		int PartyFromId { get; set; }
		string ExternalReference { get; set; }
		DateTime AgreementDate { get; set; }
		DateTime MaturityDate { get; set; }
		DateTime DateOfSepaSignature { get; set; }
		int CurrencyId { get; set; }
		int InterestTypeId { get; set; }
		decimal StartPrincipal { get; set; }
		decimal AdditionalInterest { get; set; }
		int RepaymentPeriods { get; set; }
		decimal BaloonValue { get; set; }
		int GraceInPeriods { get; set; }
		DateTime FirstPeriodEndDate { get; set; }
		int WhtEvoLiabilityAccountId { get; set; }
		int WhtEvoExpenseAccountId { get; set; }
		decimal WhtTaxRate { get; set; }
		bool WhtOurExpense { get; set; }
		bool WhtGrossUp { get; set; }
		bool WhtPartyPay { get; set; }
		string Security { get; set; }
		string ExtraContractInformation { get; set; }
		int EvoInterestAccountId { get; set; }
		int EvoInterEvoPrincipalAccountId { get; set; }
		int EvoAccruedAccountId { get; set; }
		
		#region enums
		// string values are passed from/to the frontend/controller
		
		string EvoInterestAccountTypeEnum { get; set; }
		EvoAccountTypes EvoInterestAccountType{ get; set; }
		string EvoInterEvoPrincipalAccountTypeEnum { get; set; }
		EvoAccountTypes EvoInterEvoPrincipalAccountType{ get; set; }
		string EvoAccruedAccountTypeEnum { get; set; }
		EvoAccountTypes EvoAccruedAccountType{ get; set; }
		string DayCountConventionEnum { get; set; }
		DayCountConvention DayCountConvention { get; set; }
		string CompoundIntervalEnum { get; set; }
		Frequency CompoundInterval { get; set; }
		string RepaymentStyleEnum { get; set; }
		RepaymentStyle RepaymentStyle { get; set; }
		string RepaymentTypeEnum { get; set; }
		RepaymentType RepaymentType { get; set; }
		string PeriodFrequencyEnum { get; set; }
		Frequency PeriodFrequency { get; set; }

		#endregion 
	}
Possible returned exceptions
- Loan external reference max. length is 256
- Loan external reference is not unique
- Loan name max. length is 256
- Missing from (lending) party
- Missing loan party.
- Either To or From party should be the Home party.
- Extra Contract Info max. length is 256.
- Missing loan currency.
- Missing loan interest type.
- Loan principal cannot be 0.
- Loan interest cannot be 0.

When loan amortization is enabled, additional  required fields:
- Missing loan amortization repayment period.");
- Missing loan amortization period interval.");
- loan.FirstPeriodEndDate <= loan.AgreementDate; Loan amortization first period payment precedes agreement date.


URL: /api/Loan/validate

Expects a loan object to validate for the LMS administration. Returns an error collection if loan values are invalid
return value: ok or error collection

URL: /api/Loan/id/{id:int}

Get loan by id, for edit.
return value: a serialized datatable object

URL: /api/Loan/code/{code:int}

Get loan by LMS code, for edit.
return value: a serialized datatable object

4. Party

URL: /api/Party/save

Expects a party object to save to the LMS administration. The object should implement the LMS  IPartyUI interface
return value: ok or error collection

Party interface
 public interface IPartyUI
    {
	    int idParty { get; set; }

	    /// <summary>
        /// Gets or sets the party code.
        /// </summary>
        string PartyCode { get; set; }

        #region details

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        string Name { set; get; }

        /// <summary>
        /// Gets or sets the party category.
        /// </summary>
        long PartyCategoryId { set; get; }

        /// <summary>
        /// Gets or sets the (customer) email.
        /// </summary>
        string Email { set; get; }

        /// <summary>
        /// Gets or sets the chamber of commerce.
        /// </summary>
        string ChamberOfCommerce { set; get; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is eu.
        /// </summary>
        bool IsEU { set; get; }

        #endregion region

        #region address

        /// <summary>
        /// Gets or sets the address1.
        /// </summary>
        /// <remarks>SEPA Street line</remarks>
        string Address1 { set; get; }

        /// <summary>
        /// Gets or sets the address2.
        /// </summary>
        /// <remarks>SEPA town line</remarks>
        string Address2 { set; get; }

        /// <summary>
        /// Gets or sets the address3.
        /// </summary>
        string Address3 { set; get; }

        /// <summary>
        /// Gets or sets the address4.
        /// </summary>
        string Address4 { set; get; }

        /// <summary>
        /// Gets or sets the address5.
        /// </summary>
        string Address5 { set; get; }

        #endregion

        #region contact information

        /// <summary>
        /// Gets or sets the contact person.
        /// </summary>
        string ContactPerson { set; get; }

        /// <summary>
        /// Gets or sets the phone number.
        /// </summary>
        string PhoneNumber { get; set; }

        /// <summary>
        /// Gets or sets the initials.
        /// </summary>
        string Initials { get; set; }

        /// <summary>
        /// Gets or sets the first name.
        /// </summary>
        string FirstName { get; set; }

        /// <summary>
        /// Gets or sets the name of the middle.
        /// </summary>
        string MiddleName { get; set; }

        /// <summary>
        /// Gets or sets the last name.
        /// </summary>
        string LastName { get; set; }

        /// <summary>
        /// Gets or sets the email to.
        /// </summary>
        string EmailTo { get; set; }

        /// <summary>
        /// Gets or sets the email cc.
        /// </summary>

        string EmailCC { get; set; }
        /// <summary>
        /// Gets or sets the email BCC.
        /// </summary>
        string EmailBCC { get; set; }

        #endregion

        /// <summary>
        /// Gets or sets additional description text.
        /// </summary>
        string Description { set; get; }

        #region banking details

        /// <summary>
        /// Gets or sets the name of the bank.
        /// </summary>
        string BankName { set; get; }

        /// <summary>
        /// Gets or sets the bank bic swift number.
        /// </summary>
        string BankBicSwiftNumber { set; get; }

        /// <summary>
        /// Gets or sets the bank number.
        /// </summary>
        string BankNumber { set; get; }

        /// <summary>
        /// Gets or sets the name of the bank account beneficiary.
        /// </summary>
        string BankAccountName { set; get; }

        /// <summary>
        /// Gets or sets the bank account IBAN number.
        /// </summary>
        string BankAccountNumber { set; get; }

        /// <summary>
        /// Gets or sets the bank currency code.
        /// </summary>
        string BankCurrencyCode { set; get; }

        /// <summary>
        /// Gets or sets the bank country code.
        /// </summary>
        string CountryCode { set; get; }

        #endregion
    }
Possible exceptions
- Party code max. length is 512.
- Party code is not unique.
- Party name max. length is 512.
- Missing party name.
- Missing party type.
- Party address line max. length is 512.
- Missing party address lines.
-- contact information
- Party contact person max. length is 512.
- Missing party contact person.
- Party email max. length is 512.
- Party email To max. length is 255.
- Missing party contact email address.
- Party email CC max. length is 255.
- Party email BCC max. length is 255.
- Party phone number max. length is 25.
-- bank information
- Party bank name max. length is 100.
- Missing party bank name.
- Party bank account beneficiary max. length is 100.
- Missing party bank account beneficiary.
- Party IBAN account number max. length is 100.
- Missing party IBAN account number.
- Party IBAN account number is invalid.
- Party BIC/SWIFT code max. length is 100.
- Missing party BIC/SWIFT code.
- Party currency code max. length is 100.
- Missing party bank currency code.


URL: /api/Party/validate

Expects a party object to validate for the LMS administration. Returns an error collection if party values are invalid
return value: ok or error collection

URL: /api/Party/{id:int}

Get a party by Id.
return value: a serialized datatable object

URL: /api/Party/partytype

Get available party types from the administration (party categorie in LMS)
return value: a serialized datatable object

  • No labels