Registration
Registration Micro Service provides APIs to create different types of users in the program. These users are mainly categorized as Consumers also known as end users of the application Business users like merchant System users like Admin or service owners.
To help you get started with your integration, Cloud Payments provides a sample Postman collection that includes a template of all the Registration API endpoints. It also includes a sample environment file with the URL details.
Click the button below to download the collection and associated the environment file.
Self Registration
Self Registration
Interfaces like mobile applications or websites usually provide sign-in options for the consumers to register themselves.
Registration MS provides self-registration API for this purpose. API details are as below..
Method | POST |
Resource URL | {reg_url}/user/selfregister |
Response Formats | application/json text/plain; charset=utf-8 |
Required Authentication | No |
Header Parameters
Key | Value |
---|---|
Content-Type | application/json |
api-key | {api-key} |
tenantName | {tenantName} |
Sefl Registration Request
{
"firstName":"James",
"lastName":"Smith",
"username":"jamessmith",
"password":"jsmith@1234",
"timeZoneFormatted":"America/Denver",
"timeZoneFormatted":"America/Denver",
"preferredLanguage":"EN",
"contactType":"EMAIL",
}
Request Parameters
Name | Required | Description | Value/Range |
---|---|---|---|
firstName | yes | First name | String |
lastName | Yes | Last Name | String |
username | Yes | Username is alphanumeric. Phone number or email could also be used as username. | String |
password | Yes | Each program can have a password rules like minimum length, maximum length, number of characters, number of special characters etc | String |
timezoneFormatted | Yes | Joda-Time is the replacement for the Java date and time classes. http://www.joda.orgjoda-time/key_format.html.time zone_formatted is populated with the getTimeZones API, and is then used to populate the timezone and timezoneOffset columns on the back end, that are returned in the response. | Must comply with: http://joda-time.sourceforge.net/timezones.html |
preferredLanguage | NO | TODO | String 2 char |
userContact | No | Email Id or Mobile number | String |
contactType | No | Yes if user contact is passed | String : EMAIL or MOBILE |
Self Registration Response
{"selfRegistrationResponse":{
"contextResponse":{
"statusCode":"SUCCESS",
},
"uuid":"be65ffab-65d6-403f-a52a-199e72f868d7""firstName":"James",
"lastName":"Smith",
"username":"jamessmith",
"timeZoneFormatted":"America/Chicago",
"userContact":"james.smith@gmail.com",
"contactType":"EMAIL" }
Response Parameters
Name | Description | Value/Range | |
---|---|---|---|
contextResponse | Response context. | tenantName statusCode - See status codes additionalStatusCode statusMessage additionalStatusMessage errorArgs errors |
|
uuid | Unique identifier for the person. Also knowned as person Id | String GUID | |
firstName | yes | First name | String |
lastName | Yes | Last Name | String |
username | Yes | Username is alphanumeric. Phone number or email could also be used as username. | String |
password | Yes | Each program can have a password rules like minimum length, maximum length, number of characters, number of special characters etc | String |
timezoneFormatted | Yes | Joda-Time is the replacement for the Java date and time classes. http://www.joda.orgjoda-time/key_format.html.time zone_formatted is populated with the getTimeZones API, and is then used to populate the timezone and timezoneOffset columns on the back end, that are returned in the response. | Must comply with: http://joda-time.sourceforge.net/timezones.html |
userContact | No | Email Id or Mobile number | String |
contactType | No | Yes if user contact is passed | String : EMAIL or MOBILE |
Privilege User Registration
This API could be used to create all types of users.
Unlike self-registration, this API needs a valid authentication token. An existing system user or business user can access this API after getting valid token by calling auth API.
Few Rules :
User of type service owner can create another user of type service owner or company user.
Company users can create another company users or consumers.
Company users cannot create user of type service owner
Consumers cannot create any type of user. They can only self register themselves.
Method | POST |
Resource URL | {reg_url}/user/registerPrivilegeUsers |
Response Formats | application/json text/plain; charset=utf-8 |
Required Authentication | Yes |
Header Parameters
Key | Value |
---|---|
Content-Type | application/json |
api-key | {api-key} |
Authorization | Bearer {access_token} |
tenantName | {tenantName} |
Privilege User Registration Request
{
"firstName":"Maria",
"lastName":"Garcia",
"username":"CashierMariaA",
"password":"MariaA@5421",
"timeZoneFormatted":"America/Denver",
"role":["ADMIN"],
"isResetRequired":false,
"preferredLanguage":EN,
"userType":SERVICE_OWNER,
"userContact":"james.smith@gmail.com",
"contactType":"EMAIL",
}
Request Parameters
Name | Required | Description | Value/Range |
---|---|---|---|
firstName | yes | First name | String |
lastName | Yes | Last Name | String |
username | Yes | Username is alphanumeric. Phone number or email could also be used as username. | String |
password | Yes | Each program can have a password rules like minimum length, maximum length, number of characters, number of special characters etc | String |
timezoneFormatted | Yes | Joda-Time is the replacement for the Java date and time classes. http://www.joda.orgjoda-time/key_format.html.time zone_formatted is populated with the getTimeZones API, and is then used to populate the timezone and timezoneOffset columns on the back end, that are returned in the response. | Must comply with: http://joda-time.sourceforge.net/timezones.html |
entity id | No | Company id if user type is COMPANY_USER | Integer |
role | Yes | List of String | List of roles for that user. Roles are program specific. Example CONSUMER, CASHIER_PURCHASES, ADMIN etc |
isResetRequired | NO : Default is false | If set to true, the user is required to reset the password after logging in for the first time. | boolean |
userType | Yes |
SUBSCRIBER for Consumer
COMPANY_USER for business user SERVICE_OWNER for system user |
String |
preferredLanguage | NO | TODO | String 2 char |
userContact | No | Email Id or Mobile number | String |
contactType | No | Yes if user contact is passed | String : EMAIL or MOBILE |
Privilege User Registration Response
{"PrivilegeUserRegistrationResponse":{
"contextResponse":{
"statusCode":"SUCCESS",
},
"uuid":"be65ffab-65d6-403f-a52a-199e72f868d7",
"firstName":"James",
"lastName":"Smith",
"username":"jamessmith",
"timeZoneFormatted":"America/Chicago",
"role":["ADMIN"],
"preferredLanguage":EN,
"userContact":"james.smith@gmail.com",
"contactType":"EMAIL" }
Response Parameters
Name | Description | Value/Range | |
---|---|---|---|
contextResponse | Response context. | tenantName statusCode - See status codes additionalStatusCode statusMessage additionalStatusMessage errorArgs errors |
|
uuid | Unique identifier for the person. Also knowned as person Id | String GUID | |
firstName | yes | First name | String |
lastName | Yes | Last Name | String |
username | Yes | Username is alphanumeric. Phone number or email could also be used as username. | String |
password | Yes | Each program can have a password rules like minimum length, maximum length, number of characters, number of special characters etc | String |
timezoneFormatted | Yes | Joda-Time is the replacement for the Java date and time classes. http://www.joda.orgjoda-time/key_format.html.time zone_formatted is populated with the getTimeZones API, and is then used to populate the timezone and timezoneOffset columns on the back end, that are returned in the response. | Must comply with: http://joda-time.sourceforge.net/timezones.html |
role | Yes | List of roles | List of String |
userContact | No | Email Id or Mobile number | String |
contactType | No | Yes if user contact is passed | String : EMAIL or MOBILE |
Update Person Status
Update person status API is used to update the status of the person including de-registering the person
Method | POST |
Resource URL | {reg_url}/user/updatePersonStatus |
Response Formats | application/json text/plain; charset=utf-8 |
Required Authentication | Yes |
Header Parameters
Key | Value |
---|---|
Content-Type | application/json |
api-key | {api-key} |
Authorization | Bearer {access_token} |
tenantName | {tenantName} |
Update Person Status Request
{
"personId":"156c96ab-31f6-4619-a6cc-33a9f812a23b"
"reason":"de-register user"
"status":"X"
}
Request Parameters
Name | Required | Description | Value/Range |
---|---|---|---|
personId | Yes | UUID of the person. | String |
reason | Yes | Reason for the udpate. | String |
Update Person Status Response
{"getCompanyResponse":{"contextResponse":{"tenantName":"CBD",
"statusCode":"SUCCESS",
},
"person":"156c96ab-31f6-4619-a6cc-33a9f812a23b",
"status":"X"} } }
Response Parameters
Name | Description | Value/Range |
---|---|---|
contextResponse | Construction of the response | tenantName statusCode - See status codes additionalStatusCode statusMessage additionalStatusMessage errorArgs errors |
person | UUID of the person | String |
status | Status of the person | String CREATED("C"), ACTIVE("A"), SUSPEND("S"), CLOSED("X"), DISABLE("D"); |