API Module Customer createCustomerRequest
From Openprovider API documentation
(Difference between revisions)
| Line 76: | Line 76: | ||
===Raw XML=== | ===Raw XML=== | ||
| - | + | <?xml version="1.0" encoding="UTF-8"?> | |
| + | <openxml> | ||
| + | <credentials> | ||
| + | <username>username</username> | ||
| + | <password>password</password> | ||
| + | </credentials> | ||
| + | <createcustomerrequest> | ||
| + | <companyname>Hosting Unlimited</companyname> | ||
| + | <vat></vat> | ||
| + | <name> | ||
| + | <initials>J.B.</initials> | ||
| + | <firstname>John</firstname> | ||
| + | <prefix>van</prefix> | ||
| + | <lastname>Halen</lastname> | ||
| + | </name> | ||
| + | <gender>M</gender> | ||
| + | <phone> | ||
| + | <countrycode>+8</countrycode> | ||
| + | <areacode>383</areacode> | ||
| + | <subscribernumber>1231212</subscribernumber> | ||
| + | </phone> | ||
| + | <fax> | ||
| + | <countrycode>+8</countrycode> | ||
| + | <areacode>383</areacode> | ||
| + | <subscribernumber>1231213</subscribernumber> | ||
| + | </fax> | ||
| + | <address> | ||
| + | <street>Main Street</street> | ||
| + | <number>2</number> | ||
| + | <suffix>a</suffix> | ||
| + | <zipcode>630060</zipcode> | ||
| + | <city>Washington</city> | ||
| + | <state></state> | ||
| + | <country>US</country> | ||
| + | </address> | ||
| + | <email>info@openprovider.nl</email> | ||
| + | <additionaldata> | ||
| + | <birthcity>London</birthcity> | ||
| + | <birthcountry>GB</birthcountry> | ||
| + | <birthdate>1976-03-24</birthdate> | ||
| + | </additionaldata> | ||
| + | </createcustomerrequest> | ||
| + | </openxml> | ||
| + | |||
| + | <?xml version="1.0" encoding="UTF-8"?> | ||
| + | <openxml> | ||
| + | <reply> | ||
| + | < code>0</code> | ||
| + | <desc></desc> | ||
| + | <data> | ||
| + | <handle>JH000001-US</handle> | ||
| + | </data> | ||
| + | </reply> | ||
| + | </openxml> | ||
Revision as of 08:36, 16 April 2010
Contents |
Module Customer > Create
| Module | customer |
| Command name | createCustomerRequest |
| Use | Creates an entry for a new customer |
| Input |
|
| Output |
|
Examples
Using PHP class
$request = new OP_Request;
$request->setCommand('createCustomerRequest')
->setAuth(array('username' => 'username', 'password' => 'password'))
->setArgs(array(
'name' => array(
'initials' => 'J.B.',
'firstName' => 'John',
'prefix' => 'van',
'lastName' => 'Halen',
),
'gender' => 'M',
'phone' => array(
'countryCode' => '+31',
'areaCode' => '10',
'subscriberNumber' => '4482299'
),
'fax' => array(
'countryCode' => '+31',
'areaCode' => '10',
'subscriberNumber' => '2440250'
),
'address' => array(
'street' => 'Nieuwe Binnenweg',
'number' => '137',
'suffix' => 'a',
'zipcode' => '3014 GJ',
'city' => 'Rotterdam',
'state' => 'Zuid-Holland',
'country' => 'NL',
),
'email' => 'support@openprovider.nl',
'additionalData' => array(
'birthCity' => 'Amsterdam',
'birthDate' => '1971-02-14',
'socialSecurityNumber' => '771268635',
'companyRegistrationNumber' => '115372'
)
));
Raw XML
<?xml version="1.0" encoding="UTF-8"?>
<openxml>
<credentials>
<username>username</username>
<password>password</password>
</credentials>
<createcustomerrequest>
<companyname>Hosting Unlimited</companyname>
<vat></vat>
<name>
<initials>J.B.</initials>
<firstname>John</firstname>
<prefix>van</prefix>
<lastname>Halen</lastname>
</name>
<gender>M</gender>
<phone>
<countrycode>+8</countrycode>
<areacode>383</areacode>
<subscribernumber>1231212</subscribernumber>
</phone>
<fax>
<countrycode>+8</countrycode>
<areacode>383</areacode>
<subscribernumber>1231213</subscribernumber>
</fax>
<address>
<street>Main Street</street>
<number>2</number>
<suffix>a</suffix>
<zipcode>630060</zipcode>
<city>Washington</city>
<state></state>
<country>US</country>
</address>
<email>info@openprovider.nl</email>
<additionaldata>
<birthcity>London</birthcity>
<birthcountry>GB</birthcountry>
<birthdate>1976-03-24</birthdate>
</additionaldata>
</createcustomerrequest>
</openxml>
<?xml version="1.0" encoding="UTF-8"?>
<openxml>
<reply>
< code>0</code>
<desc></desc>
<data>
<handle>JH000001-US</handle>
</data>
</reply>
</openxml>