You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@fineract.apache.org by Justice Nutifafa Akligo <ju...@taryafrica.com> on 2022/03/25 04:18:54 UTC

Create Client from API error

Hi, I get legalformId parameter required when creating Client from API. Do
you know how I can get the legalFormId? It was not part of the mandatory
parameters in the API documentation.

{"developerMessage":"The request was invalid. This typically will happen
due to validation errors which are
provided.","httpStatusCode":"400","defaultUserMessage":"Validation errors
exist.","userMessageGlobalisationCode":"validation.msg.validation.errors.exist","errors":[{"developerMessage":"The
parameter legalFormId is mandatory.","defaultUserMessage":"The parameter
legalFormId is
mandatory.","userMessageGlobalisationCode":"validation.msg.client.legalFormId.cannot.be.blank","parameterName":"legalFormId","value":null,"args":[{"value":null}]}]}

Re: Create Client from API error

Posted by Rahul Pawar <rr...@gmail.com>.
Hi Justice Nutifafa,

The value of the legalFormId is either 1 or 2 (1 represents Person, and 2
represents Entity)
[image: image.png]

Thanks for notifying us on the API documentation, we will update it at
the earliest.

Thanks,
Rahul.

On Fri, Mar 25, 2022 at 9:49 AM Justice Nutifafa Akligo <
justice.akligo@taryafrica.com> wrote:

> Hi, I get legalformId parameter required when creating Client from API. Do
> you know how I can get the legalFormId? It was not part of the mandatory
> parameters in the API documentation.
>
> {"developerMessage":"The request was invalid. This typically will happen
> due to validation errors which are
> provided.","httpStatusCode":"400","defaultUserMessage":"Validation errors
> exist.","userMessageGlobalisationCode":"validation.msg.validation.errors.exist","errors":[{"developerMessage":"The
> parameter legalFormId is mandatory.","defaultUserMessage":"The parameter
> legalFormId is
> mandatory.","userMessageGlobalisationCode":"validation.msg.client.legalFormId.cannot.be.blank","parameterName":"legalFormId","value":null,"args":[{"value":null}]}]}
>

Re: Create Client from API error

Posted by Kigred Developer <ki...@gmail.com>.
 Hello Justice,
Are you following the documentation  api doc for fineract? If you are
following it, there is a template ` /clients/template` which has these
details. When you query it you will get a response similar to this:

{"activationDate":[2022,3,25],"isStaff":false,"officeId":1,"officeOptions":[{"id":1,"name":"Head
Office","nameDecorated":"Head
Office"}],"savingProductOptions":[{"id":1,"name":"Member
Savings","withdrawalFeeForTransfers":false,"allowOverdraft":false,"enforceMinRequiredBalance":false,"withHoldTax":false}],"genderOptions":[{"id":14,"name":"Male","position":0,"description":"","active":true,"mandatory":false},{"id":15,"name":"Female","position":1,"description":"","active":true,"mandatory":false}],"clientTypeOptions":[{"id":16,"name":"Monthly
Paid","position":0,"description":"Clients Paid
Monthly","active":true,"mandatory":false},{"id":17,"name":"Weekly
Paid","position":1,"description":"Clients Paid
Weekly","active":true,"mandatory":false}],"clientClassificationOptions":[],"clientNonPersonConstitutionOptions":[],"clientNonPersonMainBusinessLineOptions":[],"clientLegalFormOptions":[{"id":1,"code":"legalFormType.person","value":"PERSON"},{"id":2,"code":"legalFormType.entity","value":"ENTITY"}],"familyMemberOptions":{"relationshipIdOptions":[],"genderIdOptions":[{"id":14,"name":"Male","position":0,"description":"","active":true,"mandatory":false},{"id":15,"name":"Female","position":1,"description":"","active":true,"mandatory":false}],"maritalStatusIdOptions":[],"professionIdOptions":[]},"address":[null],"isAddressEnabled":false}

When you read through it you will see what you are looking for.
Regards.
If you building a UI for FINERACT, try to use the templates mentioned in
the api doc.

Regards.
Wilfred

On Fri, Mar 25, 2022 at 7:19 AM Justice Nutifafa Akligo <
justice.akligo@taryafrica.com> wrote:

> Hi, I get legalformId parameter required when creating Client from API. Do
> you know how I can get the legalFormId? It was not part of the mandatory
> parameters in the API documentation.
>
> {"developerMessage":"The request was invalid. This typically will happen
> due to validation errors which are
> provided.","httpStatusCode":"400","defaultUserMessage":"Validation errors
> exist.","userMessageGlobalisationCode":"validation.msg.validation.errors.exist","errors":[{"developerMessage":"The
> parameter legalFormId is mandatory.","defaultUserMessage":"The parameter
> legalFormId is
> mandatory.","userMessageGlobalisationCode":"validation.msg.client.legalFormId.cannot.be.blank","parameterName":"legalFormId","value":null,"args":[{"value":null}]}]}
>