Add CIF number, Occupation Category & Occupation fields to Client module
- Added mandatory unique CIF number (auto-generated as CIF+padded ID) - Added Occupation Category dropdown (6 categories: Salaried, Business, Professional, Agriculture, Student, Others) - Added Occupation dropdown (54 occupations mapped to categories) - Both stored in m_code/m_code_value tables (same pattern as Gender) - Visible in client create/update API and personal data view - Includes Liquibase migrations 0227 & 0228 - Added Postman collection for User Management APIs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
ba5365d4af
commit
90c21d40c1
@@ -0,0 +1,607 @@
|
||||
{
|
||||
"info": {
|
||||
"_postman_id": "user-mgmt-collection",
|
||||
"name": "Fineract - User Management",
|
||||
"description": "Fineract User Management APIs - Login, Create, Update, Change Password, Delete Users",
|
||||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
||||
},
|
||||
"auth": {
|
||||
"type": "basic",
|
||||
"basic": [
|
||||
{
|
||||
"key": "username",
|
||||
"value": "{{username}}",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "password",
|
||||
"value": "{{password}}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"variable": [
|
||||
{
|
||||
"key": "baseUrl",
|
||||
"value": "https://localhost:8443/fineract-provider/api"
|
||||
},
|
||||
{
|
||||
"key": "username",
|
||||
"value": "mifos"
|
||||
},
|
||||
{
|
||||
"key": "password",
|
||||
"value": "password"
|
||||
},
|
||||
{
|
||||
"key": "tenantId",
|
||||
"value": "default"
|
||||
},
|
||||
{
|
||||
"key": "userId",
|
||||
"value": "1"
|
||||
}
|
||||
],
|
||||
"item": [
|
||||
{
|
||||
"name": "Authentication",
|
||||
"item": [
|
||||
{
|
||||
"name": "Login (Self-Service)",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"username\": \"mifos\",\n \"password\": \"password\"\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/self/authentication?returnClientList=true",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "self", "authentication"],
|
||||
"query": [
|
||||
{
|
||||
"key": "returnClientList",
|
||||
"value": "true"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "Authenticates a user and returns auth token. Use this for self-service users."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Login (Basic Auth Test)",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/users/1",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "users", "1"]
|
||||
},
|
||||
"description": "Test basic auth by fetching user details. If credentials are correct, you'll get a 200 response."
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Users",
|
||||
"item": [
|
||||
{
|
||||
"name": "Get All Users",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/users",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "users"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Get User by ID",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/users/{{userId}}",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "users", "{{userId}}"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Get User Template",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/users/template",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "users", "template"]
|
||||
},
|
||||
"description": "Returns template data (available offices, roles) needed to create a new user."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Create User",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"username\": \"newuser\",\n \"firstname\": \"New\",\n \"lastname\": \"User\",\n \"email\": \"newuser@example.com\",\n \"officeId\": 1,\n \"roles\": [1],\n \"sendPasswordToEmail\": false,\n \"password\": \"Password@123\",\n \"repeatPassword\": \"Password@123\",\n \"isSelfServiceUser\": false,\n \"passwordNeverExpires\": true\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/users",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "users"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Update User (Change Username)",
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"username\": \"updatedUsername\"\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/users/{{userId}}",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "users", "{{userId}}"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Update User (Change Password via PUT)",
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"password\": \"NewPassword@123\",\n \"repeatPassword\": \"NewPassword@123\"\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/users/{{userId}}",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "users", "{{userId}}"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Change Password (Dedicated Endpoint)",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"password\": \"NewPassword@123\",\n \"repeatPassword\": \"NewPassword@123\"\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/users/{{userId}}/pwd",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "users", "{{userId}}", "pwd"]
|
||||
},
|
||||
"description": "Dedicated password change endpoint. Must provide both password and repeatPassword."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Update User (Full Update)",
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"username\": \"updatedUser\",\n \"firstname\": \"Updated\",\n \"lastname\": \"User\",\n \"email\": \"updated@example.com\",\n \"officeId\": 1,\n \"roles\": [1],\n \"password\": \"NewPassword@123\",\n \"repeatPassword\": \"NewPassword@123\",\n \"passwordNeverExpires\": true\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/users/{{userId}}",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "users", "{{userId}}"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Delete User",
|
||||
"request": {
|
||||
"method": "DELETE",
|
||||
"header": [
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/users/{{userId}}",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "users", "{{userId}}"]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Roles",
|
||||
"item": [
|
||||
{
|
||||
"name": "Get All Roles",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/roles",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "roles"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Get Role by ID",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/roles/1",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "roles", "1"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Get Role Permissions",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/roles/1/permissions",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "roles", "1", "permissions"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Create Role",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"name\": \"New Role\",\n \"description\": \"A new custom role\"\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/roles",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "roles"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Update Role",
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"name\": \"Updated Role\",\n \"description\": \"Updated description\"\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/roles/1",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "roles", "1"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Update Role Permissions",
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"permissions\": {\n \"READ_USER\": true,\n \"CREATE_USER\": true,\n \"UPDATE_USER\": true\n }\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/roles/1/permissions",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "roles", "1", "permissions"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Enable Role",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/roles/1?command=enable",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "roles", "1"],
|
||||
"query": [
|
||||
{
|
||||
"key": "command",
|
||||
"value": "enable"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Disable Role",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/roles/1?command=disable",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "roles", "1"],
|
||||
"query": [
|
||||
{
|
||||
"key": "command",
|
||||
"value": "disable"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Delete Role",
|
||||
"request": {
|
||||
"method": "DELETE",
|
||||
"header": [
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/roles/1",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "roles", "1"]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Password Preferences",
|
||||
"item": [
|
||||
{
|
||||
"name": "Get Password Preferences",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/passwordpreferences",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "passwordpreferences"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Get Password Preferences Template",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/passwordpreferences/template",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "passwordpreferences", "template"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Update Password Preferences",
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"validationPolicyId\": 2\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/passwordpreferences",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "passwordpreferences"]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Permissions",
|
||||
"item": [
|
||||
{
|
||||
"name": "Get All Permissions",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/permissions",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "permissions"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Update Permissions (Maker-Checker)",
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "fineract-platform-tenantid",
|
||||
"value": "{{tenantId}}"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"permissions\": {\n \"CREATE_USER_MAKER\": true,\n \"CREATE_USER_CHECKER\": true\n }\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/v1/permissions",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["v1", "permissions"]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user