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 <
[email protected]> 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}]}]}
>