User Calls
The calls on this page relate to deployment users. This allows for single sign on functionality (SSO) and synchronising user profiles between systems.
All calls that return custom field values (product metadata fields, order fields, user profile fields etc.) only return values stored in the Storefront database. Values dynamically retrieved from remote data sources (such as third party web services and APIs) are not returned.
DoesUserExist
This call checks if the provided user already exists in the system. It is recommended to use this call rather than GetUserByID or GetUserByLogonName to check if a user exist for improved performance.
Request
POST /roiwebinterface.asmx HTTP/1.1
Host: host
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<DoesUserExist xmlns="http://roidistribution.com/webapi">
<username>string</username>
<token>string</token>
</DoesUserExist>
</soap12:Body>
</soap12:Envelope>
<username> - the encrypted deployment username
<token> - the authorisation token to validate the API call
Response
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<DoesUserExistResponse xmlns="http://roidistribution.com/webapi">
<DoesUserExistResult>boolean</DoesUserExistResult>
</DoesUserExistResponse>
</soap12:Body>
</soap12:Envelope>
<DoesUserExistResult> - true or false depending on whether the requested user was found
GetUserById
This call returns information about a single user.
Request
POST /roiwebinterface.asmx HTTP/1.1
Host: host
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetUserById xmlns="http://roidistribution.com/webapi">
<userId>string</userId>
<token>string</token>
</GetUserById>
</soap12:Body>
</soap12:Envelope>
<userId> - the ID of a deployment user
<token> - the authorisation token to validate the API call
Response
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetUserByIdResponse xmlns="http://roidistribution.com/webapi">
<GetUserByIdResult>
<Id>string</Id>
<LoginName>string</LoginName>
<CustomUserFields>
<CustomField>
<Name>string</Name>
<Value>string</Value>
</CustomField>
<CustomField>
<Name>string</Name>
<Value>string</Value>
</CustomField>
</CustomUserFields>
<CustomUserGroups>
<UserGroup>
<Id>string</Id>
<Name>string</Name>
</UserGroup>
<UserGroup>
<Id>string</Id>
<Name>string</Name>
</UserGroup>
</CustomUserGroups>
</GetUserByIdResult>
</GetUserByIdResponse>
</soap12:Body>
</soap12:Envelope>
<Id> - the ID of the user
<LoginName> - the name of the user
<CustomUserFields> - a list of custom field key-value pairs of the user’s profile
<CustomUserGroups> - a list of user group key value pairs for the groups the user is in
GetUserByLogonName
This call returns information about a single user.
Request
POST /roiwebinterface.asmx HTTP/1.1
Host: host
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetUserByLogonName xmlns="http://roidistribution.com/webapi">
<logonName>string</logonName>
<token>string</token>
</GetUserByLogonName>
</soap12:Body>
</soap12:Envelope>
<username> - the ID of a deployment user
<token> - the authorisation token to validate the API call
Response
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetUserByLogonNameResponse xmlns="http://roidistribution.com/webapi">
<GetUserByLogonNameResult>
<Id>string</Id>
<LoginName>string</LoginName>
<CustomUserFields>
<CustomField>
<Name>string</Name>
<Value>string</Value>
</CustomField>
<CustomField>
<Name>string</Name>
<Value>string</Value>
</CustomField>
</CustomUserFields>
<CustomUserGroups>
<UserGroup>
<Id>string</Id>
<Name>string</Name>
</UserGroup>
<UserGroup>
<Id>string</Id>
<Name>string</Name>
</UserGroup>
</CustomUserGroups>
</GetUserByLogonNameResult>
</GetUserByLogonNameResponse>
</soap12:Body>
</soap12:Envelope>
<Id> - the encrypted deployment username
<LoginName> - the name of the user
<CustomUserFields> - a list of custom field key-value pairs of the user’s profile
<CustomUserGroups> - a list of user group key value pairs for the groups the user is in
CreateUser
This call creates a new user on the deployment. A user must have a username and password before it can be created. It is reccomended to check the user exists (DoesUserExist) before attempting to create a new user.
Request
POST /roiwebinterface.asmx HTTP/1.1
Host: host
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<CreateUser xmlns="http://roidistribution.com/webapi">
<username>string</username>
<password>string</password>
<token>string</token>
</CreateUser>
</soap12:Body>
</soap12:Envelope>
<username> - the encrypted deployment username
<password> - the encrypted password to assign to the deployment user
<token> - the authorisation token to validate the API call
Response
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<CreateUserResponse xmlns="http://roidistribution.com/webapi">
<CreateUserResult>boolean</CreateUserResult>
</CreateUserResponse>
</soap12:Body>
</soap12:Envelope>
<CreateUserResult> - true or false depending on whether the user profile was created
SetUserFields
This call allows multiple user profile field values to be set for a single deployment user.
Request
POST /roiwebinterface.asmx HTTP/1.1 Host: host Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <SetUserFields xmlns="http://roidistribution.com/webapi"> <userId>string</userId> <userFields> <CustomField> <Name>string</Name> <codevalue>string</Value> </CustomField> <CustomField> <Name>string</Name> <codevalue>string</Value> </CustomField> </userFields> <token>string</token> </SetUserFields> </soap12:Body> </soap12:Envelope>
<userId> - the ID of a deployment user
<userFields> - a list of custom field key-value pairs of the user’s profile to be set
<token> - the authorisation token to validate the API call
Response
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<SetUserFieldsResponse xmlns="http://roidistribution.com/webapi" />
</soap12:Body>
</soap12:Envelope>
The call returns an error if it fails to set the requested user profile fields
GetLoginTicket
This call returns a ticket to sign the user into the deployment without a password. Login tickets are single-use and expire after 24-hours. To sign a user into the deployment, redirect the user to the to the /Login.aspx?ticket=”LOGINTICKET”&logonName=”USERNAME?” page with the listed arguments.
Request
POST /roiwebinterface.asmx HTTP/1.1
Host: host
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetLoginTicket xmlns="http://roidistribution.com/webapi">
<username>string</username>
<token>string</token>
</GetLoginTicket>
</soap12:Body>
</soap12:Envelope>
<username> - the encrypted deployment username
<token> - the authorisation token to validate the API call
Response
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetLoginTicketResponse xmlns="http://roidistribution.com/webapi">
<GetLoginTicketResult>string</GetLoginTicketResult>
</GetLoginTicketResponse>
</soap12:Body>
</soap12:Envelope>
<GetLoginTicketResult> - the login tcket required to sign the user into the deployment
GetAllUserGroups
This call returns a list of all the user groups on the deloyment.
Request
POST /roiwebinterface.asmx HTTP/1.1
Host: host
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetAllUserGroups xmlns="http://roidistribution.com/webapi">
<token>string</token>
</GetAllUserGroups>
</soap12:Body>
</soap12:Envelope>
<token> - the authorisation token to validate the API call
Response
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetAllUserGroupsResponse xmlns="http://roidistribution.com/webapi">
<GetAllUserGroupsResult>
<UserGroup>
<Id>string</Id>
<Name>string</Name>
</UserGroup>
<UserGroup>
<Id>string</Id>
<Name>string</Name>
</UserGroup>
</GetAllUserGroupsResult>
</GetAllUserGroupsResponse>
</soap12:Body>
</soap12:Envelope>
<GetAllUserGroupsResult> - A list of user group key value pairs for all user groups
AddUserToUserGroup
This call adds a user to a user group.
Request
POST /roiwebinterface.asmx HTTP/1.1
Host: host
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<AddUserToUserGroup xmlns="http://roidistribution.com/webapi">
<userId>string</userId>
<userGroupId>string</userGroupId>
<token>string</token>
</AddUserToUserGroup>
</soap12:Body>
</soap12:Envelope>
<userId> - the ID of a deployment user
<userGroupId> - the ID of the user group to add the user to
<token> - the authorisation token to validate the API call
Response
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<AddUserToUserGroupResponse xmlns="http://roidistribution.com/webapi">
<AddUserToUserGroupResult>boolean</AddUserToUserGroupResult>
</AddUserToUserGroupResponse>
</soap12:Body>
</soap12:Envelope>
<AddUserToUserGroupResult> - true or false depending on whether the user was added to the group
RemoveUserFromUserGroup
This call removes a user from a user group.
Request
POST /roiwebinterface.asmx HTTP/1.1
Host: host
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<AddUserToUserGroup xmlns="http://roidistribution.com/webapi">
<userId>string</userId>
<userGroupId>string</userGroupId>
<token>string</token>
</AddUserToUserGroup>
</soap12:Body>
</soap12:Envelope>
<userId> - the ID of a deployment user
<userGroupId> - the ID of the user group to remove the user from
<token> - the authorisation token to validate the API call
Response
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<AddUserToUserGroupResponse xmlns="http://roidistribution.com/webapi">
<AddUserToUserGroupResult>boolean</AddUserToUserGroupResult>
</AddUserToUserGroupResponse>
</soap12:Body>
</soap12:Envelope>
<AddUserToUserGroupResult> - true or false depending on whether the user was removed from the group