diff --git a/api-docs/apiLive.htm b/api-docs/apiLive.htm index 161284049..3298e9739 100644 --- a/api-docs/apiLive.htm +++ b/api-docs/apiLive.htm @@ -488,6 +488,16 @@ var jqxhr = $.ajax({

Clients are people and businesses that have applied (or may apply) to an MFI for loans.

+ + + + + + + + + + @@ -507,21 +517,23 @@ var jqxhr = $.ajax({
GET https://Domain Name/api/v1/clients [ { + "id" : 14, + "accountNo": "14", + "firstname" : "Patrick", + "middlename" : "J" + "lastname" : "Asare-Frimpong", + "displayName" : "Patrick J Asare-Frimpong", "officeId" : 2, "officeName" : "sub branch 1", - "id" : 14, - "firstname" : "Patrick", - "lastname" : "Asare-Frimpong", - "displayName" : "Patrick Asare-Frimpong", "externalId" : "123AB", "joinedDate" : [ 2012, 4, 18 ] }, { + "id" : 13, + "accountNo": "0000000AB5", + "fullname" : "My micro business Ltd." + "displayName" : "My micro business Ltd.", "officeId" : 5, "officeName" : "Majmoua", - "id" : 13, - "firstname" : "firstMajmoua", - "lastname" : "client", - "displayName" : "firstMajmoua client", "joinedDate" : [ 2011, 12, 1 ] }... ] @@ -582,12 +594,12 @@ var jqxhr = $.ajax({
GET https://Domain Name/api/v1/clients/{clientId} { - "officeId" : 1, - "officeName" : "Demo MFI Head Office", "id" : 1, "firstname" : "Patrick", "lastname" : "O'Meara", "displayName" : "Patrick O'Meara", + "officeId" : 1, + "officeName" : "Demo MFI Head Office", "joinedDate" : [ 2009, 1, 4 ] } @@ -599,12 +611,12 @@ var jqxhr = $.ajax({

Create a Client

Note: You can enter either:
- firstname/lastname - for a person OR
- clientOrBusinessName - for a business or organisation (or person known by one name).
+ firstname/middlename/lastname - for a person (middlename is optional) OR
+ fullname - for a business or organisation (or person known by one name).

Field Descriptions
accountNo
If provided during client creation, its value is set as account no. for client account, otherwise an auto generated account no. is put in place based on the configured strategy.
firstname
Facility to break up name into parts suitable for humans.
middlename
Facility to break up name into parts suitable for humans.
lastname
Facility to break up name into parts suitable for humans.
fullname
Facility to set name of a client or business that doesnt suit the firstname,middlename,lastname structure.
externalId
A place to put an external reference for this client e.g. The ID another system uses.
If provided, it must be unique.
- +
Mandatory Fields
firstname and lastname OR clientOrBusinessName
, joinedDate, officeId
firstname and lastname OR fullname
, joinedDate, officeId
@@ -634,7 +646,7 @@ Content-Type: application/json Request Body: { "officeId": 1, - "clientOrBusinessName": "New Business to Create", + "fullname": "New Business to Create", "externalId": "one/78", "dateFormat": "dd MMMM yyyy", "locale": "en", diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/api/ClientsApiResource.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/api/ClientsApiResource.java index 8f743f3bf..4302db962 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/api/ClientsApiResource.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/api/ClientsApiResource.java @@ -48,7 +48,7 @@ import org.springframework.stereotype.Component; public class ClientsApiResource { private final Set CLIENT_DATA_PARAMETERS = new HashSet(Arrays.asList("id", "accountNo", "officeId", "officeName", "externalId", - "firstname", "lastname", "joinedDate", "displayName", "clientOrBusinessName", "allowedOffices", "imagePresent")); + "firstname", "middlename", "lastname", "fullname", "joinedDate", "displayName", "clientOrBusinessName", "allowedOffices", "imagePresent")); private final PlatformSecurityContext context; private final ClientReadPlatformService clientReadPlatformService;