Validation Rules

Department List API


Field * requiredValidationsRule
URL http://zaicrm.com/api/department?keyword=tech&includeTeams=1&includeRoles=1&status=active-
keyword To search department using name-
includeTeams To get the teams for assigned department & it should pass as 1-
includeRoles To get the roles for assigned department & it should pass as 1-
status must be 'active' or 'inactive' column-
sort_key must be 'id' or 'name' column-
sort_order must be 'asc' or 'desc'-
departmentId pass the department encrypted ID-

Department Store API


Field * requiredValidationsRule
URL http://zaicrm.com/api/department-
name * min char - 3, max char - 25It accepts alpha numeric symbols characters
status Must be active or inactiveIt accepts alpha characters and it should be active or inactive
description min char - 2, max char - 250It accepts any characters

Department Update API


Field * requiredValidationsRule
URL http://zaicrm.com/api/department/encrypted_department_id-
name * min char - 3, max char - 25It accepts alpha numeric symbols characters
status Must be active or inactiveIt accepts alpha characters and it should be active or inactive
description min char - 2, max char - 250It accepts any characters

Department Delete API


Field * requiredValidationsRule
URL http://zaicrm.com/api/department/encrypted_department_id-

Department Department Lock and Unlock API


Field * requiredValidationsRule
URL http://zaicrm.com/api/department/lock - Lock | http://zaicrm.com/api/department/unlock - Unlock-
department_id Pass the department ID in the format Ex:MQ==,MJ==-
status Must be active or inactiveIt accepts alpha characters and it should be active or inactive

Department multiple delete API


Field * requiredValidationsRule
URL http://zaicrm.com/api/department/bulkdelete-
delete_id Pass the department ID in the format Ex:MQ==,MJ==-

Department Archive API


Field * requiredValidationsRule
URL http://devapi.zaicrm.com/api/department/archive-
archive_department_ids Pass the department ID in the format Ex:NzU=,NzQ=-

Department - Roles and Teams Status update API


Field * requiredValidationsRule
URL http://devapi.zaicrm.com/api/roleteams/lock-
department_role_team_json Ex:department_role_team_json:{"NA==":{"roles":["MTA=","NQ=="],"teams":["NQ==","OQ=="]},"Mg==":{"roles":["OQ==","MTI="],"teams":["MTY="]}} -
status Must be active or inactiveIt accepts alpha characters and it should be active or inactive

Role List API


Field * requiredValidationsRule
URL http://zaicrm.com/api/roles-
department_id To search role mapped under particular department using department encrypted ID-
hierarchy & includehierarchylevels To get hierarchy levels of role-
keyword To search role using name-
sort_key must be 'id' or 'name' column-
sort_order must be 'asc' or 'desc'-

Role Store API


Field * requiredValidationsRule
URL http://zaicrm.com/api/roles-
name * min char - 3, max char - 25It accepts alpha numeric symbols characters
status Must be active or inactiveIt accepts alpha characters and it should be active or inactive
department_id * Encrypted ID of department-
description min char - 3, max char - 250It accepts any characters
hierarchy hierarchy:1 | hierarchy must be 1-
reporting_to_roles reporting_to_roles must be JSON format["eyJpdiI6ImtHZzlUYUtOTnZQUU4yeitKTXpYQXc9PSIsInZhbHVlIjoic2FJSEtYeXJjNDd4cGZNVGNiajFTZz09IiwibWFjIjoiZGIzMjRkNjUzYjZmZDU2YzgzMjM5YTA2N2Y4ZTZiNTQ4NTMzNGYwNmI3OTA4MTI2ZjA2ZDhkMjhjYWQ0NWZlZiJ9","eyJpdiI6IlhOdkFPMG15WjBtZzkrUjRmN1dRWVE9PSIsInZhbHVlIjoiZUgwWXBra1BLVWdsOFVtUkl0OWI3dz09IiwibWFjIjoiOTYxNmQyMGFhMDYwMGY5NDgwZGQ2NzYxZTFlOTg3ZWQxMzM3Yjg5YjVlNmMyYzU2OWUyZTQ5OTM3ZmM2ZjliOSJ9","eyJpdiI6IndVM21SYmJpSEE2S2t3Y09jQXNLZEE9PSIsInZhbHVlIjoiT2pyaDVFWEUvcFNzWXdJcHA3b3huUT09IiwibWFjIjoiZDYxNWRkOThhMDdmOTFhYjhkYjQ2YThlZTg4NWI4NjBiNDQ2M2I1NWRhNDU1MDhjMTRiMTliMWIwZmVkYjA1OSJ9","eyJpdiI6InlwcVRDcVFJckc2Vmk1cS9LSWdienc9PSIsInZhbHVlIjoiekpkR3Faa1BWUC9QaDNXaUpvNjVwdz09IiwibWFjIjoiMWIyYjNmMGQ1ODNlMTkzYjk4ZjY2YTlmOGQzYmE4MmMxNmVhZDVlNDBkZDNkY2Q1NmIwZWE4MmEwZTNmOTQ1YiJ9"]

Role Update API


Field * requiredValidationsRule
URL http://zaicrm.com/api/roles/encrypted_team_id-
name * min char - 3, max char - 25It accepts alpha numeric symbols characters
status Must be active or inactiveIt accepts alpha characters and it should be active or inactive
department_id * Encrypted ID of department-
description min char - 3, max char - 250It accepts any characters
hierarchy hierarchy:1 | hierarchy must be 1-
reporting_to_roles reporting_to_roles must be JSON format["eyJpdiI6ImtHZzlUYUtOTnZQUU4yeitKTXpYQXc9PSIsInZhbHVlIjoic2FJSEtYeXJjNDd4cGZNVGNiajFTZz09IiwibWFjIjoiZGIzMjRkNjUzYjZmZDU2YzgzMjM5YTA2N2Y4ZTZiNTQ4NTMzNGYwNmI3OTA4MTI2ZjA2ZDhkMjhjYWQ0NWZlZiJ9","eyJpdiI6IlhOdkFPMG15WjBtZzkrUjRmN1dRWVE9PSIsInZhbHVlIjoiZUgwWXBra1BLVWdsOFVtUkl0OWI3dz09IiwibWFjIjoiOTYxNmQyMGFhMDYwMGY5NDgwZGQ2NzYxZTFlOTg3ZWQxMzM3Yjg5YjVlNmMyYzU2OWUyZTQ5OTM3ZmM2ZjliOSJ9","eyJpdiI6IndVM21SYmJpSEE2S2t3Y09jQXNLZEE9PSIsInZhbHVlIjoiT2pyaDVFWEUvcFNzWXdJcHA3b3huUT09IiwibWFjIjoiZDYxNWRkOThhMDdmOTFhYjhkYjQ2YThlZTg4NWI4NjBiNDQ2M2I1NWRhNDU1MDhjMTRiMTliMWIwZmVkYjA1OSJ9","eyJpdiI6InlwcVRDcVFJckc2Vmk1cS9LSWdienc9PSIsInZhbHVlIjoiekpkR3Faa1BWUC9QaDNXaUpvNjVwdz09IiwibWFjIjoiMWIyYjNmMGQ1ODNlMTkzYjk4ZjY2YTlmOGQzYmE4MmMxNmVhZDVlNDBkZDNkY2Q1NmIwZWE4MmEwZTNmOTQ1YiJ9"]

Role Delete API


Field * requiredValidationsRule
URL http://zaicrm.com/api/roles/encrypted_role_id-

Role Based Permission - Assign Menu Item and Actions to the Role API


Field * requiredValidationsRule
URL http://zaicrm.com/api/roles/rolexmenuitemactionassign/{encrypted_role_id}-
menuitems_actions_json * Must be JSON format-
clear_menuitems_actions_to_role Must be 1 | To clear menu items and actions-

Get the menu items and actions assigned to the specific role API


Field * requiredValidationsRule
URL http://zaicrm.com/api/roles/rolexmenuitemactionsassigned/{encrypted_role_id}-

Role - Update Hierarchy and Reporting API


Field * requiredValidationsRule
URL http://zaicrm.com/api/roles/rolexmenuitemactionsassigned/{encrypted_role_id}-
reporting_to_roles Must be array formatEx : reporting_to_roles:["eyJpdiI6ImROcHFzaWYvQjltd3dPSDQ1UTFYOUE9PSIsInZhbHVlIjoiSlQyanVBa25NQ2dvNktJUHJvL3FiQT09IiwibWFjIjoiZTA3NDM5OGIzMWIwYTgzZjk4ZmYzYzE3MDI3OGM2MjYyMTY4MjE5NzU4NDVjODg5YmYyMTNlMjEzNDE3M2U3NiJ9"]
hierarchy Must be integer value-
department_id Must be encrypted department ID-
clear_reporting_to_roles Must be 1 to clear reporting roles-

Role - Update Descendant Roles


Field * requiredValidationsRule
URL http://zaicrm.com/api/roles/updateroledescendants/{encrypted_role_id}-
reporting_to_roles Must be array formatEx : reporting_to_roles:["eyJpdiI6ImROcHFzaWYvQjltd3dPSDQ1UTFYOUE9PSIsInZhbHVlIjoiSlQyanVBa25NQ2dvNktJUHJvL3FiQT09IiwibWFjIjoiZTA3NDM5OGIzMWIwYTgzZjk4ZmYzYzE3MDI3OGM2MjYyMTY4MjE5NzU4NDVjODg5YmYyMTNlMjEzNDE3M2U3NiJ9"]
hierarchy Must be integer value-
department_id Must be encrypted department ID-
clear_reporting_to_roles Must be 1 to clear reporting roles-

Role - Get Descendant Roles, Tree Structure, Reporting To Roles


Field * requiredValidationsRule
URL http://zaicrm.com/api/roles/getdescendantroles/{encrypted_role_id}?includeDescendantRolesTreeStructure=1&includeReportingToRoles=1-
department_id Must be encrypted department ID-
includeDescendantRolesTreeStructure Must be 1 -
includeReportingToRoles Must be 1-

Role - Remove Descendant Role


Field * requiredValidationsRule
URL http://zaicrm.com/api/roles/getdescendantroles/{encrypted_role_id}?includeDescendantRolesTreeStructure=1&includeReportingToRoles=1-
department_id Must be encrypted department ID-
descendant_role_assigned_id Descendant role assigned ID must be encrypted role ID-
parent_role_id Parent role ID must be encrypted role ID-

Hierarchy List ( Grades List )


Field * requiredValidationsRule
URL http://zaicrm.com/api/hierarchylist-

Status list


Field * requiredValidationsRule
URL http://zaicrm.com/api/statuslist-

Role Archive


Field * requiredValidationsRule
URL http://devapi.zaicrm.com/api/roles/archive-

Undo Remove Descendant Role API


Field * requiredValidationsRule
URL http://devapi.zaicrm.com/api/roles/undo-
role_id It must be encrypted role ID-
parent_role_id It must be encrypted role ID-
department_id It must be encrypted department ID-
descendant_role_assigned_id It must be encrypted role ID-

Team List API


Field * requiredValidationsRule
URL http://zaicrm.com/api/team-
keyword To search team using name-
sort_key must be 'id' or 'name' column-
sort_order must be 'asc' or 'desc'-

Team Store API


Field * requiredValidationsRule
URL http://zaicrm.com/api/team-
name * min char - 3, max char - 25It accepts alpha numeric symbols characters
status Must be active or inactiveIt accepts alpha characters and it should be active or inactive
department_id * Encrypted ID of department-
description min char - 3, max char - 250It accepts any characters

Team Update API


Field * requiredValidationsRule
URL http://zaicrm.com/api/team/encrypted_team_id-
name * min char - 3, max char - 25It accepts alpha numeric symbols characters
status Must be active or inactiveIt accepts alpha characters and it should be active or inactive
department_id * Encrypted ID of department-
description min char - 3, max char - 250It accepts any characters

Team Delete


Field * requiredValidationsRule
URL http://zaicrm.com/api/team/{encrypted_team_id}-

Team Archive


Field * requiredValidationsRule
URL http://devapi.zaicrm.com/api/team/archive-
archive It must be archive[{"department_id":"MQ==","team_id":"ODY=,ODU="}, {"department_id":"Mg==","team_id":"ODM="}]

S No. 1 & 2 | User List API


Field * requiredValidationsRule
URL http://zaicrm.com/api/user-
page To get the details of page-
department_id Can pass n number of departments with comma separatersMust be encrypted ID of department with comma separators
role_id Can pass n number of roles with comma separatersMust be encrypted ID of role with comma separators
team_id Can pass n number of teams with comma separatersMust be encrypted ID of team with comma separators
joining_date_from 2020-07-01-
joining_date_from 2020-07-01-

S No. 3 | User Store API


Field * requiredValidationsRule
URL http://zaicrm.com/api/user-
name * min char - 3 | max char - 25It accepts alpha numeric symbols characters
email * It should br uniqueIt should be with domain Example: mail@mail.co
password * Default - password must at least one UPPERCASE / lowercase, and number | Based on settings it may vary as alpha, alpha numeric, and numeric. | min char - Default - 8 | It may vary based on settings-
phone * unique | min and max digits - 10It must be a number
employee_id * unique | min and max digits - 5It must be a number
user_name * unique | min char - 3 | max char - 25It accepts alpha numeric symbols characters
status Must be active or inactiveIt accepts alpha characters and it should be active or inactive
user_type * Rule : Admin - 1 or Employee - 2It should be 0 or 1
address * Must be a json format-
secondary_phone unique | min and max digits - 10It must be a number
joining_date Must be before or equal to todayDate format must be - DD-MM-YYYY
user_image * Allowed type - jpg,jpeg,png | Allowed Size - 20MB-
Assign Department, Team and RoleTo assign department, team and role for the users.-

S No. 4 | Edit User Details API


Field * requiredValidationsRule
URL http://devapi.zaicrm.com/api/user/editdetail/{encrypted_user_id}-

S No. 4 | Edit User API


Field * requiredValidationsRule
URL http://zaicrm.com/api/user/encrypted_user_id-
name * min char - 3 | max char - 25It accepts alpha numeric symbols characters
email * It should br uniqueIt should be with domain Example: mail@mail.co
password * Default - password must at least one UPPERCASE / lowercase, and number | Based on settings it may vary as alpha, alpha numeric, and numeric. | min char - Default - 8 | It may vary based on settings-
phone * unique | min and max digits - 10It must be a number
employee_id * unique | min and max digits - 5It must be a number
user_name * unique | min char - 3 | max char - 25It accepts alpha numeric symbols characters
status * Must be active or inactiveIt accepts alpha characters and it should be active or inactive
user_type * Rule : Admin - 1 or Employee - 2It should be 0 or 1
address * Must be a json format-
secondary_phone unique | min and max digits - 10It must be a number
joining_date Must be before or equal to todayDate format must be - DD-MM-YYYY
user_image Allowed type - jpg,jpeg,png | Allowed Size - 20MB-
Assign Department, Team and RoleTo assign department, team and role for the users.-

S No. 5 | Delete User


Field * requiredValidationsRule
URL http://zaicrm.com/api/user/{encrypted_id}-

S No. 6 | User Bulk Operations - Status Change


Field * requiredValidations
URL http://zaicrm.com/api/user/bulkstatusupdate
user_id * Can pass n number of users with comma separaters
status * Must be active or inactive

S No. 7 | User Bulk Operations - Delete API


Field * requiredValidations
URL http://zaicrm.com/api/user/bulkdelete
delete_id * Can pass n number of users with comma separaters

S No. 19 | Add mulitple users to the team API


Field * requiredValidations
URL http://zaicrm.com/api/user/team
index * Index should be add
team_id * Pass encrypted team ID
user_id * Can pass n number of encrypted user ID with comma separaters
department_id * Pass encrypted department ID

S No. 20 | Remove user from the team API


Field * requiredValidations
URL http://zaicrm.com/api/user/team
index * Index should be remove
team_id * Pass encrypted team ID
user_id * Pass encrypted user ID
department_id * Pass encrypted department ID

S No. 21 | Restore user from the team API


Field * requiredValidations
URL http://zaicrm.com/api/user/team
index * Index should be undo
team_id * Pass encrypted team ID
user_id * Pass encrypted user ID
department_id * Pass encrypted department ID

S No. 25 | Get User basic detail API


Field * requiredValidations
URL http://zaicrm.com/api/user/team
index * Index should be basic
user_id * Pass encrypted user ID

S No. 26 | GET users under specific team API


Field * requiredValidations
URL http://zaicrm.com/api/user/teamdepartment?team_id={encrypted_team_id}&index=user
index * Index should be user
team_id * Pass encrypted team ID

S No. 27 | GET teams under department API


Field * requiredValidations
URL http://zaicrm.com/api/user/teamdepartment?index=team
index * Index should be team

S No. 29 | Get User default detail API


Field * requiredValidations
URL http://zaicrm.com/api/user/detail?index=default&user_id={user_id}
index * Index should be default
user_id * Pass encrypted user ID

S No. 30 | Remove multiple teams for the user API


Field * requiredValidations
URL http://zaicrm.com/api/user/team
index * Index should be team
team_id * Can pass n number of encrypted team ID with comma separaters
expiry_date * Can pass same number (which team ID sent) of expiry date with comma separaters
user_id * Pass encrypted user ID
department_id * Pass encrypted department ID

S No. 33 | To get the users from selected department not in the selected team API


Field * requiredValidations
URL http://zaicrm.com/api/user/teamdepartment?index=department_user&team_id={encrypted_team_id}&department_id={encrypted_department_id}
index * Index should be department_user
team_id * Pass encrypted team ID
department_id * Pass encrypted department ID

S No. 34 | Restore role and team associated with department API


Field * requiredValidations
URL http://zaicrm.com/api/user/undo/{encrypted_user_id}
index * Index should be team
department_id * Pass encrypted department ID

S No. 35 | Restore department role and team for user API


Field * requiredValidations
URL http://zaicrm.com/api/user/undo/{encrypted_user_id}
index * Index should be department
department_id * Pass encrypted department ID

S No. 36 | Assign Previous teams to new role when assign a new role to the specific user API


Field * requiredValidations
URL http://zaicrm.com/api/user/undo/{encrypted_user_id}
index * Index should be teamrole
department_id * Pass encrypted department ID

S No. 37 | Remove User role department API


Field * requiredValidations
URL http://zaicrm.com/api/user/removerole/{encrypted_user_id}
role_id * Pass encrypted role ID
department_id * Pass encrypted department ID
end_date * Index should be dd-mm-yyyy