From Openprovider API documentation
Module Reseller > Create Contact
Module
| reseller
|
Command name
| createContactResellerRequest
|
Use
| Create new responsible contact in your reseller account
|
Input
|
- username
- password
- role ('tech' or 'billing' (only one billing contact can be created per reseller account))
- isActive (can be 0 or 1; defaults to 1)
- companyName
- name
- gender
- address
- phone
- email
|
Output
|
|
Examples
Using PHP class
$request = new OP_Request;
$request->setCommand('createContactRequest')
->setAuth(array('username' => 'username', 'password' => 'password'))
->setArgs(array(
'username' => 'newUser',
'password' => 'newPassword',
'role' => 'tech',
'isActive' => 1,
'name' => array(
'initials' => 'J.B.',
'firstName' => 'John',
'prefix' => 'van',
'lastName' => 'Halen',
),
'gender' => 'M',
'phone' => array(
'countryCode' => '+31',
'areaCode' => '10',
'subscriberNumber' => '4482299'
),
'email' => 'support@openprovider.nl',
));
Raw XML
Please note that newlines and leading spaces are added only for readability. Those whitespaces should be excluded from your XML command before sending it to Openprovider.
<?xml version="1.0" encoding="UTF-8"?>
<openXML>
<credentials>
<username>username</username>
<password>password</password>
</credentials>
<createContactRequest>
<username>newUser</username>
<password>newPassword</password>
<role>tech</role>
<isActive>1</isActive>
<name>
<initials>J.B.</initials>
<firstName>John</firstName>
<prefix>van</prefix>
<lastName>Halen</lastName>
</name>
<gender>M</gender>
<phone>
<countryCode>+31</countryCode>
<areaCode>10</areaCode>
<subscriberNumber>4482299</subscriberNumber>
</phone>
<email>support@openprovider.nl</email>
</createContactRequest>
</openXML>
<?xml version="1.0" encoding="UTF-8"?>
<openXML>
<reply>
<code>0</code>
<desc />
<data>
<id>5391</id>
</data>
</reply>
</openXML>