APIs to Create Groups and Users
URL for service
http://primary.smartmessagingservices.net:8080/gateway/services/GatewayAdminService
Note about group, company and user creation.
The Group record is the key account record that controls the credit and message sending control. A user is required for authentication of a message to be sent to the gateway and also for the customer to access intelli messaging web applications. If end users are going to purchase credits on line in the intelli messaging end userportal then a company record (associated to the Group Record) must also be created with all the parameters completed.
For record creation or editing the user calling the webservice callingUserName must have permissions in the gateway web application to create and edit records.
Characters are Case Sensitive.
Authenication process does not check the state of the user record (ie if inactive) but only checks the name and password to the group Id being passed.
Return Parameter.
Only one parameter is returned. This parameter value will change depending the processing of the message by the server. eg if you are creating a Group record, successful creation will return a group ID. You will need to store this id to then create a user record. If the group is not created a message will be returned with the word "ERROR" at the start of the message followed by the detail of error.
Create Customer and Group
createCustomerAndGroup
Parameter Name |
Description |
---|---|
parentGroupId |
group id to which newly created group will belong. Id of parent group |
callingUserName |
Name of user call the method - must below to the parentGroup and have can_write* capability ie an account admin role |
callingUserPassword |
Password of user above |
groupName |
Name of group to be recreated under the parentGroup |
Returns if success
GroupId of newly created Group.
http GET example
- parentGroupId (group id to which newly created group will belong)
- callingUserName (createCustomerAndGroup)
- callingUserPassword (password)
- groupName (Name of the group being created)
Create User
Method Name = createUser
Parameter |
Description and use |
---|---|
groupId |
Group id for which the username is to be created under |
callingUserName |
Name of user calling the method - must belong to the parentGroup of the "groupId" passed in, and have can_write* capability ie an account admin role |
callingUserPassword |
Password of user above |
newUserName |
Name of new user to be created - must be unique in the whole of our system - we recommend email address be used as these are most likely |
newUserPassword |
Password - recommended to be secure ie contain 8 or more characters and contain Caps, Numbers and shift number characters. |
Returns if success
userId of newly created user.
[http://primary.smartmessagingservices.net:8080/gateway/services/GatewayAdminService?method=createUser&groupId=[]&callingUserName=[]&callingUserPassword=[]&newUserName=[]&newUserPassword|http://primary.smartmessagingservices.net:8080/gateway/services/GatewayAdminService?method=createUser&groupId=[]&callingUserName=[]&callingUserPassword=[]&newUserName=[]&newUserPassword]=[]
Change Password
Method Name
changePassword
Parameter |
Description |
---|---|
userName |
Username of user for which password is to be changed |
currentPassword |
Current password of user |
newPassword |
new password for user |
Returns if Success
"Password Changed"
[http://primary.smartmessagingservices.net:8080/gateway/services/GatewayAdminService?method=changePassword&userName=[]¤tPassword=[]&newPassword|http://primary.smartmessagingservices.net:8080/gateway/services/GatewayAdminService?method=changePassword&userName=[]¤tPassword=[]&newPassword]|=[]
userName (username for whom password is being changed)
- currentPassword (current password)
- newPassword (new password)
Disable User
Method disableUser
Parameter |
Description |
---|---|
callingUserName |
Name of user calling the method - must belong to the parentGroup of the Group" that user belongs to, and have can_write* capability ie an account admin role |
callingUserPassword |
password for the callingUserName |
userNameToDisable |
Name of user to be disabled. |
Returns if Success
"[name of user] Disabled"
[http://primary.smartmessagingservices.net:8080/gateway/services/GatewayAdminService?method=disableUser&callingUserName=[]&callingUserPassword=[]&userNameToDisable=[]
Create Company
Method Name createCompany
Parameter |
Description |
---|---|
callingUserName |
Name of user calling the method - must belong to the parentGroup of the groupId in the call, and have can_write* capability ie an account admin role |
callingUserPassword |
password of the callingUserName |
groupId |
Id of the group for which the company record is being created |
integrationId |
Customer system integration record Id |
companyName |
Name of company that the group belongs to - unique in the system |
ABN |
ABN of the company |
street |
street address |
city |
City |
postCode |
Post code |
state |
State or region |
country |
Country - for Australia must be exactly "Australia" - otherwise GST will not be charged in the invoice for purchase made via the online merchant facility |
contactName |
Contact for the company |
contactNumber |
Contact number for the company |
contactEmail |
Contact email for the company |
Returns if Success
Company Record Id
Add Credits to a Group
Method Name = addCredits
Parameter |
Description and use |
---|---|
groupId |
Group id for which the credits are to be added - must be a direct subgroup of the parent group of the callingUserName. |
callingUserName |
Name of user calling the method - must belong to the parentGroup of the "groupId" passed in, and have can_write* capability ie an account admin role |
callingUserPassword |
Password of user above |
amountCredits |
integer number of the amount of credits to add |
Returns
The current balance of the groupid after credits are added.
[http://primary.smartmessagingservices.net:8080/gateway/services/GatewayAdminService?method=addCredits&groupId=[]&callingUserName=[]&callingUserPassword=[]&amountCredits=[]