...
Code Block | ||||
---|---|---|---|---|
| ||||
Changes in Create User api request body: URI: v2/user/create Method: POST Request body: { "request": { "firstName":"name of user", "email":"valid and unique email id", "phone":"valid phone number", "password":"user password", "username" : "unique user name. Optional", "channel" : "rootOrgchannel value (Optional)"// if user pass it , it must be valid and user will be associated with this as "PUBLIC" role. "organisationId": "", "sourcesignUpType": "google"// optional } } - Changes in create user api: * username : field will be optional (if user is passing it then system will verify uniqueness only, if user is not passing then system will generate unique username.) * channel : This field is optional . * if caller will pass it, then system will verify it's validity ( should be rootOrg and status as active) once it's verified then user will be associated with that rootOrg. * if channel is invalid or not active then creation will fail with proper error message. * organisationId : This field is optional. * if caller passes both channel and organisationId then , organisationId should be either suborg or rootOrg under same channel. it's status should be active. once it's verified then user will be associated with both as role "PUBLIC" * if channel and organisationId belongs to different rootOrg or channel is active but suborg(organisationId) is inactive then user creation will fail with proper error message. * if user will pass on organisationId , then system will check organisationId should be valid and active. if both condition satisfied then user will be associated with corresponding rootOrg and suborg with role "PUBLIC". * User creation won't ask any phoneverified or emailVerified field. * Once Phone/email is verified by user in DB it will mark isPhoneVerifiedPhoneVerified or isEmailVerifiedemailVerified as true. * For Google signIn user email verified will be always true. Doubts: * How to do validation for Indian phone number. As per PRD only Indian phone number is valid. * Are we taking country code as well from user , or always will associate user country code as "+91" |
...