CreateUser (V6)
Description
The CreateUser api allow to create a user for a company, if the company settings allow this operation
URL: https://secure1.sandbox.directpay.online/API/v6/
Response
The method will respond with the result of the operation, and the user token if the operation succeed
Variables to send:
Parameter | Data type | Description | |
Request | Text | CreateUser | Mandatory |
CompanyToken | Token | Token you got from DPO to operate this API | Mandatory |
userCompanyToken | Token | Token you got from DPO customer | Mandatory |
userFirstName | Name | First name of the user | Mandatory |
userLastName | Name | Last name of the user | Mandatory |
userEmail | User email | Mandatory | |
userPhoneCode | ISO code | Customer country ISO 2 letter code | Optional |
userPhoneNumber | Number | User Phone number | Optional |
userSendSms | Boolean | Send SMS to user | Optional |
| deprecated |
Request example:
<API3G> <CompanyToken>68B90B5E-25F6-4146-8AB1-C7A3A0C41A7F</CompanyToken> <Request>CreateUser</Request> <userCompanyToken>AB77238D-4C7C-44EE-AF4F-E23E84184042</userCompanyToken> <userLastName>Alain</userLastName> <userFirstName>Aznavour</userFirstName> <userEmail>test@test.com</userEmail> </API3G>
Response:
The server will respond for the CreateUser api request according to the following results:
Parameter | Data type | Description |
Result | 3 digits code | A code will be sent with the result of the request |
ResultExplanation | Text | Free text of the result |
UsrUNQ | Token | User unique token |
Response example:
<API3G> <Result>000</Result> <ResultExplanation>User has been added for company "CompanyName", an email will be sent to him.</ResultExplanation> <UsrUNQ>9275BCF5-6858-4B51-876C-5EA5EED743C3</UsrUNQ> </API3G>
Response codes:
Code | Explanation |
000 | Success |
902 | Data mismatch or other error |
801 | Request missing company token |
802 | Wrong CompanyToken |
803 | No request or error in Request type name |
804 | Error in XML |
999 | No permissions - contact support team |