Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

AttributeTypeRequiredpurpose
namestringtruename of user. can be combination of firstname , middle name and lastname
usernamealphanumericfalseunique identity to identify user. user name will be unique per installation
passwordalphanumerictrue
phonenumberconditionaleither phone or email is mandatory . but during creation time user can't pass both.
emailalphanumericconditionaleither phone or email is mandatory . but during creation time user can't pass both.
userTypestringinternalTo identify user is Teacher or Other , as of now there is only two types
signUpTypestringinternalTo identify user came via selfsignUp, googleplus , statelogin or stateonboard
phoneVerifiedisPhoneVerifiedbooleaninternalwill be true only when user verified phone otp
emailVerifiedisEmailVerifiedbooleaninternalwill be true only when user verified email otp
otpnumberfalseOTP can be passed during signup 

...

Code Block
languagejs
titleCreate user body
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": "",
       "OTP":"entered OTP by user(optional)",
       "VerificationType":"it can be OTP , Google , or some state"  
         
    }
}

Note:
* Now user creation won't ask user to enter phoneVerified, if user is providing phone number.
* is username is auto generated unique value or user has to enter it - it's optional for user , if user not providing then system will generate it.
* Do we need to take orgId or channel in create user to associate user with another rootOrg?
* 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"
* Do we need to make OTP mandatory or optional based on introducing signupType?

...