{ "info": { "name": "Education, Religion & Social Category", "description": "Postman collection for Education Level, Degree/Qualification, Religion and Social Category dropdowns in Client registration.\n\nWorkflow:\n1. Get all codes to find code IDs\n2. Get code values for each to populate dropdowns\n3. Create/Update client with all dropdown IDs", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "variable": [ { "key": "base_url", "value": "https://localhost:8443/fineract-provider/api/v1" }, { "key": "tenant_id", "value": "default" }, { "key": "username", "value": "mifos" }, { "key": "password", "value": "password" } ], "auth": { "type": "basic", "basic": [ { "key": "username", "value": "{{username}}" }, { "key": "password", "value": "{{password}}" } ] }, "item": [ { "name": "1. Get All Codes", "request": { "method": "GET", "header": [ { "key": "Fineract-Platform-TenantId", "value": "{{tenant_id}}" }, { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{base_url}}/codes", "host": ["{{base_url}}"], "path": ["codes"] } }, "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "var codeMap = {", " 'EducationLevel': 'education_level_code_id',", " 'DegreeQualification': 'degree_qualification_code_id',", " 'Religion': 'religion_code_id',", " 'SocialCategory': 'social_category_code_id'", "};", "jsonData.forEach(function(code) {", " if (codeMap[code.name]) {", " pm.collectionVariables.set(codeMap[code.name], code.id);", " console.log(code.name + ' code id: ' + code.id);", " }", "});", "Object.keys(codeMap).forEach(function(name) {", " pm.test(name + ' code exists', function () {", " pm.expect(pm.collectionVariables.get(codeMap[name])).to.not.be.undefined;", " });", "});" ], "type": "text/javascript" } } ] }, { "name": "2. Get Education Level Code Values", "request": { "method": "GET", "header": [ { "key": "Fineract-Platform-TenantId", "value": "{{tenant_id}}" }, { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{base_url}}/codes/{{education_level_code_id}}/codevalues", "host": ["{{base_url}}"], "path": ["codes", "{{education_level_code_id}}", "codevalues"] } }, "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.test('Education Level values returned', function () {", " pm.expect(jsonData.length).to.be.greaterThan(0);", "});", "console.log('Education Level options:');", "jsonData.forEach(function(v) {", " console.log(' id=' + v.id + ' name=' + v.name);", "});", "if (jsonData.length > 0) {", " pm.collectionVariables.set('sample_education_level_id', jsonData[0].id);", "}" ], "type": "text/javascript" } } ] }, { "name": "3. Get Degree Qualification Code Values", "request": { "method": "GET", "header": [ { "key": "Fineract-Platform-TenantId", "value": "{{tenant_id}}" }, { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{base_url}}/codes/{{degree_qualification_code_id}}/codevalues", "host": ["{{base_url}}"], "path": ["codes", "{{degree_qualification_code_id}}", "codevalues"] } }, "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.test('Degree Qualification values returned', function () {", " pm.expect(jsonData.length).to.be.greaterThan(0);", "});", "console.log('Degree/Qualification options:');", "jsonData.forEach(function(v) {", " console.log(' id=' + v.id + ' name=' + v.name + ' description=' + v.description);", "});", "if (jsonData.length > 0) {", " pm.collectionVariables.set('sample_degree_qualification_id', jsonData[0].id);", "}" ], "type": "text/javascript" } } ] }, { "name": "4. Get Religion Code Values", "request": { "method": "GET", "header": [ { "key": "Fineract-Platform-TenantId", "value": "{{tenant_id}}" }, { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{base_url}}/codes/{{religion_code_id}}/codevalues", "host": ["{{base_url}}"], "path": ["codes", "{{religion_code_id}}", "codevalues"] } }, "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.test('Religion values returned', function () {", " pm.expect(jsonData.length).to.be.greaterThan(0);", "});", "console.log('Religion options:');", "jsonData.forEach(function(v) {", " console.log(' id=' + v.id + ' name=' + v.name);", "});", "if (jsonData.length > 0) {", " pm.collectionVariables.set('sample_religion_id', jsonData[0].id);", "}" ], "type": "text/javascript" } } ] }, { "name": "5. Get Social Category Code Values", "request": { "method": "GET", "header": [ { "key": "Fineract-Platform-TenantId", "value": "{{tenant_id}}" }, { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{base_url}}/codes/{{social_category_code_id}}/codevalues", "host": ["{{base_url}}"], "path": ["codes", "{{social_category_code_id}}", "codevalues"] } }, "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.test('Social Category values returned', function () {", " pm.expect(jsonData.length).to.be.greaterThan(0);", "});", "console.log('Social Category options:');", "jsonData.forEach(function(v) {", " console.log(' id=' + v.id + ' name=' + v.name);", "});", "if (jsonData.length > 0) {", " pm.collectionVariables.set('sample_social_category_id', jsonData[0].id);", "}" ], "type": "text/javascript" } } ] }, { "name": "6. Get Client Template (with all dropdown options)", "request": { "method": "GET", "header": [ { "key": "Fineract-Platform-TenantId", "value": "{{tenant_id}}" }, { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{base_url}}/clients/template", "host": ["{{base_url}}"], "path": ["clients", "template"] } }, "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "['educationLevelOptions', 'degreeQualificationOptions', 'religionOptions', 'socialCategoryOptions'].forEach(function(opt) {", " pm.test(opt + ' present in template', function () {", " pm.expect(jsonData).to.have.property(opt);", " });", " console.log(opt + ':', JSON.stringify(jsonData[opt]));", "});" ], "type": "text/javascript" } } ] }, { "name": "7. Create Client with all dropdown fields", "request": { "method": "POST", "header": [ { "key": "Fineract-Platform-TenantId", "value": "{{tenant_id}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"officeId\": 1,\n \"firstname\": \"Dropdown\",\n \"lastname\": \"Test Client\",\n \"active\": true,\n \"activationDate\": \"20 April 2026\",\n \"dateFormat\": \"dd MMMM yyyy\",\n \"locale\": \"en\",\n \"legalFormId\": 1,\n \"educationLevelId\": {{sample_education_level_id}},\n \"degreeQualificationId\": {{sample_degree_qualification_id}},\n \"religionId\": {{sample_religion_id}},\n \"socialCategoryId\": {{sample_social_category_id}}\n}" }, "url": { "raw": "{{base_url}}/clients", "host": ["{{base_url}}"], "path": ["clients"] } }, "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.test('Client created successfully', function () {", " pm.expect(pm.response.code).to.equal(200);", " pm.expect(jsonData.clientId).to.not.be.undefined;", "});", "if (jsonData.clientId) {", " pm.collectionVariables.set('created_client_id', jsonData.clientId);", " console.log('Created client id: ' + jsonData.clientId);", "}" ], "type": "text/javascript" } } ] }, { "name": "8. Get Client (verify all dropdown fields)", "request": { "method": "GET", "header": [ { "key": "Fineract-Platform-TenantId", "value": "{{tenant_id}}" }, { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{base_url}}/clients/{{created_client_id}}", "host": ["{{base_url}}"], "path": ["clients", "{{created_client_id}}"] } }, "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "['educationLevel', 'degreeQualification', 'religion', 'socialCategory'].forEach(function(field) {", " pm.test(field + ' present in response', function () {", " pm.expect(jsonData).to.have.property(field);", " pm.expect(jsonData[field]).to.not.be.null;", " });", " console.log(field + ':', JSON.stringify(jsonData[field]));", "});" ], "type": "text/javascript" } } ] }, { "name": "9. Update Client dropdown fields", "request": { "method": "PUT", "header": [ { "key": "Fineract-Platform-TenantId", "value": "{{tenant_id}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"educationLevelId\": {{sample_education_level_id}},\n \"degreeQualificationId\": {{sample_degree_qualification_id}},\n \"religionId\": {{sample_religion_id}},\n \"socialCategoryId\": {{sample_social_category_id}}\n}" }, "url": { "raw": "{{base_url}}/clients/{{created_client_id}}", "host": ["{{base_url}}"], "path": ["clients", "{{created_client_id}}"] } }, "event": [ { "listen": "test", "script": { "exec": [ "pm.test('Client updated successfully', function () {", " pm.expect(pm.response.code).to.equal(200);", "});" ], "type": "text/javascript" } } ] } ] }