diff --git a/api-docs/apiLive.htm b/api-docs/apiLive.htm index ee038427c..13b9b1446 100644 --- a/api-docs/apiLive.htm +++ b/api-docs/apiLive.htm @@ -294,11 +294,11 @@
A person who guarantees to pay for someone else's debt + if he or she should default on a loan obligation. A guarantor acts as a co-signor of sorts. +
+Field Descriptions |
+
| guarantorType | +
| Identifies if the guarantor is
+ an existing Client, Staff member or an external
+ individual + Refer Retrieve + Guarantor Details Template for complete + details + |
+
| entityId | +
| The identifier for guarantors + who are an existing Client of Staff member. + | +
| firstname | +
| Guarantors first name + | +
| lastname | +
| Guarantors last name + | +
| officeName | +
| Name of the office with which the internal guarantors are associated + | +
| addressLine1, addressLine2, city, state, zip, + country, mobileNumber, housePhoneNumber, comment, + dob | +
| Address, contact and date of + birth details of an external guarantor + | +
Example Requests:
+
+GET https://DomainName/api/v1/loans/{loanId}/guarantors
+
+
+[
+ {
+ "id": 1,
+ "loanId": 1,
+ "guarantorType": {
+ "id": 1,
+ "code": "guarantor.existing.customer",
+ "value": "CUSTOMER"
+ },
+ "firstname": "Declan",
+ "lastname": "Browne",
+ "officeName": "Head Office",
+ "joinedDate": [
+ 2009,
+ 1,
+ 4
+ ]
+ }
+]
+
+ This is a convenience resource. It can be useful when + building maintenance user interface screens for client + applications. The template data returned consists of any or all + of: +
Example Request:
+
+GET https://DomainName/api/v1/loans/{loanId}/guarantors/template
+
+
+{
+ "guarantorType": {
+ "id": 1,
+ "code": "guarantor.existing.customer",
+ "value": "CUSTOMER"
+ },
+ "guarantorTypeOptions": [
+ {
+ "id": 1,
+ "code": "guarantor.existing.customer",
+ "value": "CUSTOMER"
+ },
+ {
+ "id": 2,
+ "code": "guarantor.staff",
+ "value": "STAFF"
+ },
+ {
+ "id": 3,
+ "code": "guarantor.external",
+ "value": "EXTERNAL"
+ }
+ ]
+}
+
+ Example Requests:
+
+GET https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId}
+
+
+{
+ "id": 1,
+ "loanId": 1,
+ "guarantorType": {
+ "id": 1,
+ "code": "guarantor.existing.customer",
+ "value": "CUSTOMER"
+ },
+ "firstname": "Declan",
+ "officeName": "Head Office",
+ "joinedDate": [
+ 2009,
+ 1,
+ 4
+ ]
+}
+
+
+ Note: You may associate any number of Guarantors
+ to a Loan. The mandatory fields would vary based
+ on the "guarantorType"
+
Mandatory Fields
+ for "internal" guarantors |
+
| guarantorTypeId, entityId | +
Mandatory Fields for "external" guarantors |
+
| guarantorTypeId, firstname, lastname | +
+POST https://DomainName/api/v1//loans/{loanId}}/guarantors
+
+
+POST /loans/1/guarantors
+Content-Type: application/json
+Request Body:
+{
+ guarantorTypeId:3,
+ firstname:Lyndon,
+ lastname:Johnson
+}
+
+
+{
+ "officeId": 2,
+ "loanId": 1,
+ "resourceId": 9
+}
+
+
+POST /loans/1/guarantors
+Content-Type: application/json
+Request Body:
+{
+ guarantorTypeId:1,
+ entityId:2
+}
+
+
+{
+ "officeId": 2,
+ "loanId": 1,
+ "resourceId": 10
+}
+
+
+PUT https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId}
+
+
+PUT loans/1/guarantors/1
+Content-Type: application/json
+Request Body:
+{
+ entityId:1
+}
+
+
+{
+ "officeId": 1,
+ "resourceId": 1,
+ "changes": {
+ "entityId": 1
+ }
+}
+
+ + Note: A guarantor can be removed only from loans that are not yet approved. +
+
+DELETE https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId}
+
+
+DELETE loans/1/guarantors/1
+Content-Type: application/json
+No Request Body:
+
+
+{
+ "officeId": 2,
+ "loanId": 1,
+ "resourceId": 1
+}
+
+
-POST https://DomainName/api/v1/glaccounts_update
+POST https://DomainName/api/v1/glaccounts
POST glaccounts
@@ -8613,7 +8930,22 @@ Request Body:
{
- "resourceId": 1,
+ "resourceId": 1
+}
+
+
+PUT glaccounts/1
+Content-Type: application/json
+Request Body:
+{
+ "disabled": true
+}
+
+
+{
+ "resourceId": 1
}
An accounting closure indicates that no more journal + entries may be logged or reversed in the system + (either manually or via the portfolio) prior to the closure date +
+Field Descriptions |
+
| closingDate | +
| The date for which the + accounting closure is defined | +
| officeId | +
| The identifer of the branch for + which accounting has been closed | +
| comments | +
| Description associated with an + Accounting closure | +
Example Requests:
+
+GET https://DomainName/api/v1/glclosures
+
+
+[
+ {
+ "id": 7,
+ "officeId": 1,
+ "officeName": "Head Office",
+ "closingDate": [
+ 2013,
+ 1,
+ 2
+ ],
+ "deleted": false,
+ "createdDate": [
+ 2013,
+ 1,
+ 3
+ ],
+ "lastUpdatedDate": [
+ 2013,
+ 1,
+ 3
+ ],
+ "createdByUserId": 1,
+ "createdByUsername": "mifos",
+ "lastUpdatedByUserId": 1,
+ "lastUpdatedByUsername": "mifos",
+ "comments": "closed",
+ "allowedOffices": []
+ },
+ {
+ "id": 6,
+ "officeId": 1,
+ "officeName": "Head Office",
+ "closingDate": [
+ 2012,
+ 12,
+ 13
+ ],
+ "deleted": false,
+ "createdDate": [
+ 2012,
+ 12,
+ 14
+ ],
+ "lastUpdatedDate": [
+ 2012,
+ 12,
+ 14
+ ],
+ "createdByUserId": 1,
+ "createdByUsername": "mifos",
+ "lastUpdatedByUserId": 1,
+ "lastUpdatedByUsername": "mifos",
+ "comments": "hello",
+ "allowedOffices": []
+ }
+]
+
+ Example Requests:
+
+GET https://DomainName/api/v1/glclosures/{glclosureId}
+
+
+{
+ "id": 7,
+ "officeId": 1,
+ "officeName": "Head Office",
+ "closingDate": [
+ 2013,
+ 1,
+ 2
+ ],
+ "deleted": false,
+ "createdDate": [
+ 2013,
+ 1,
+ 3
+ ],
+ "lastUpdatedDate": [
+ 2013,
+ 1,
+ 3
+ ],
+ "createdByUserId": 1,
+ "createdByUsername": "mifos",
+ "lastUpdatedByUserId": 1,
+ "lastUpdatedByUsername": "mifos",
+ "comments": "closed",
+ "allowedOffices": []
+}
+
+ Mandatory Fields |
+
| officeId,closingDate + | +
+POST https://DomainName/api/v1/glclosures
+
+
+POST glclosures
+Content-Type: application/json
+Request Body:
+{
+ "officeId": 1,
+ "closingDate": "06 December 2012",
+ "comments": "The accountants are heading for a carribean vacation"
+ "locale": "en" ,
+ "dateFormat": "dd MMMM yyyy"
+}
+
+
+{
+ "resourceId": 1
+}
+
+ Once an accounting closure is created, only the comment associated with it can be edited +
+
+PUT https://DomainName/api/v1/glclosures/{glclosureId}
+
+
+PUT glclosures/1
+Content-Type: application/json
+Request Body:
+{
+ "comments": "All transactions verified by Johnny Cash"
+}
+
+
+{
+ "resourceId": 1
+}
+
+
+PUT glclosures/1
+Content-Type: application/json
+Request Body:
+{
+ "disabled": true
+}
+
+
+{
+ "resourceId": 1
+}
+
+ + Note: Only the latest accounting closure + associated with a branch may be closed. +
+
+DELETE https://DomainName/api/v1/glclosures/{glclosureId}
+
+
+DELETE glclosures/1
+Content-Type: application/json
+No Request Body:
+
+
+{
+ "resourceId": 1
+}
+
+ A journal entry refers to the logging of
+ transactions against general ledger accounts. A journal
+ entry can consist of several line items, each of which is either a "debit" or a "credit". The total amount of the
+ debits must equal the total amount of the credits or the
+ journal entry is said to be "unbalanced"
+ A journal entry directly changes the account balances on
+ the general ledger
+
Field Descriptions |
+
| officeId | +
| The identifier of the office ( + cost center) at which the financial activity + occured | +
| glAccountId | +
| The identifier of the account ( + Ledger Account) against which this journal entry + was made + | +
| entryDate | +
| The target date for which this + entry was recorded | +
| amount | +
| The Monetary amount associated + with this entry + | +
| comments | +
| A description associated with + this entry | +
| entryType | +
| Either a Credit(1) or a Debit(2) | +
| transactionId | +
| A unique Identifier for a set
+ of related Credit and Debit entries that make up a "balanced" jounral Entry.
+ For a manual entry, this feild is a unique string. + For a system generated entry, the combination + of transactionId and entityId is unique + |
+
| entryType | +
| Either a Credit(1) or a Debit(2) | +
| portfolioGenerated | +
| Flag determines if an entry is + generated by the portfolio (posted automatically by + the system during lifecycle of loan and saving + products) or manually created by using the Create (Balanced) Journal + Entries API + | +
| reversed | +
| Flag determines if this manual
+ journal entry has been reversed using the Reverse a Journal Entry API. + Note: A journal entry is reversed by logging debits + for all credits that make up the Journal entry and + vice-versa + |
+
Example Requests:
+
+GET https://DomainName/api/v1/journalentries?transactionId=PB37X8Y21EQUY4S
+
+
+[
+ {
+ "id": 81,
+ "officeId": 1,
+ "officeName": "Head Office",
+ "glAccountName": "Something totally else",
+ "glAccountId": 17,
+ "glAccountCode": "340098",
+ "glAccountClassification": {
+ "id": 3,
+ "code": "accountType.equity",
+ "value": "EQUITY"
+ },
+ "entryDate": [
+ 2012,
+ 12,
+ 12
+ ],
+ "entryType": {
+ "id": 2,
+ "code": "journalEntrytType.debit",
+ "value": "DEBIT"
+ },
+ "amount": 120,
+ "transactionId": "PB37X8Y21EQUY4S",
+ "portfolioGenerated": false,
+ "createdByUserId": 1,
+ "createdDate": [
+ 2012,
+ 12,
+ 13
+ ],
+ "createdByUserName": "mifos",
+ "reversed": true
+ },
+ {
+ "id": 82,
+ "officeId": 1,
+ "officeName": "Head Office",
+ "glAccountName": "Something else",
+ "glAccountId": 19,
+ "glAccountCode": "560050",
+ "glAccountClassification": {
+ "id": 3,
+ "code": "accountType.equity",
+ "value": "EQUITY"
+ },
+ "entryDate": [
+ 2012,
+ 12,
+ 12
+ ],
+ "entryType": {
+ "id": 1,
+ "code": "journalEntryType.credit",
+ "value": "CREDIT"
+ },
+ "amount": 120,
+ "transactionId": "PB37X8Y21EQUY4S",
+ "portfolioGenerated": false,
+ "createdByUserId": 1,
+ "createdDate": [
+ 2012,
+ 12,
+ 13
+ ],
+ "createdByUserName": "mifos",
+ "reversed": true
+ }
+]
+
+
+ Note: A Balanced (simple) Journal entry would
+ have atleast one "Debit" and one "Credit" entry whose
+ amounts are equal
+ Compound Journal entries may have "n" debits and "m"
+ credits where both "m" and "n" are greater than 0
+ and the sum or all debits and all credits are equal
+
+
Mandatory Fields |
+
| officeId, entryDate + | +
| + |
| credits | +
| Details of the credits contained
+ in the journal entry. Each credit entry contains
+ the following items + glAccountId: Identifier of the general ledger + account against which credit entry shall be + made + amount: Amount of money involved in the credit + + comments: Optional description associated with + a credit entry + . + |
+
| debits | +
| Details of the debits contained
+ in the journal entry. Each debit entry contains the following items + glAccountId: Identifier of the general ledger account against which the debit entry shall be + made + amount: Amount of money involved in the debit + + comments: Optional description associated with + a debit entry + . + |
+
+POST https://DomainName/api/v1/journalentries
+
+
+POST journalentries
+Content-Type: application/json
+Request Body:
+{
+"officeId": 1,
+"entryDate": "06 December 2012",
+"comments": "Gifts for staff",
+"locale": "en" ,
+"dateFormat": "dd MMMM yyyy",
+"credits":[{"glAccountId":1,
+ "amount":5000},
+ {"glAccountId":2,
+ "amount":5000}
+ ],
+"debits":[{"glAccountId":3,
+ "amount":5000},
+ {"glAccountId":4,
+ "amount":5000}
+ ]
+}
+
+
+{
+ "resourceId": C1MAE935K0IAEYA
+}
+
+ Example Requests:
+
+GET https://DomainName/api/v1/journalentries/{entryId}
+
+
+{
+ "id": 22,
+ "officeId": 2,
+ "officeName": "sub branch 1",
+ "glAccountName": "Income from interest",
+ "glAccountId": 14,
+ "glAccountCode": "400001",
+ "glAccountClassification": {
+ "id": 4,
+ "code": "accountType.income",
+ "value": "INCOME"
+ },
+ "entryDate": [
+ 2012,
+ 11,
+ 2
+ ],
+ "entryType": {
+ "id": 1,
+ "code": "journalEntryType.credit",
+ "value": "CREDIT"
+ },
+ "amount": 900,
+ "transactionId": "13",
+ "portfolioGenerated": true,
+ "createdByUserId": 1,
+ "createdDate": [
+ 2012,
+ 11,
+ 2
+ ],
+ "createdByUserName": "mifos",
+ "reversed": false
+}
+
+ + Note: A journal entry is reversed by logging debits + for all credits that constitute the Journal entry and + vice-versa +
+
+GET https://DomainName/api/v1/journalentries/{transactionId}
+
+
+POST journalentries/C1MAE935K0IAEYA?command=reverse
+Content-Type: application/json
+
+
+{
+ "resourceId": C1MAE935K0IAEYA
+}
+
+