This documentation has moved

XML API documentation can now be found at developer.openprovider.com. This page will remain available until September 2026, but will no longer be updated.

The XML API itself is not changing. Your existing integration continues to work.

API Module Customer createCustomerRequest

From Openprovider API documentation

(Difference between revisions)
Jump to: navigation, search
(Created page with '==Module Customer > Create== {| border="1" cellpadding="4" |- style="background-color:#BBBBBB;" |'''Module''' |customer |- style="background-color:#EEEEEE;" |'''Command name''' |…')
(Module Customer > Create)
 
(17 intermediate revisions not shown)
Line 13: Line 13:
|'''Input'''
|'''Input'''
|
|
-
*[[API Format Company|companyName]]
+
*companyName
-
*[[API Format VAT|vat]]
+
*[[API Format vat|vat]]
*'''[[API Format Name|name]]'''
*'''[[API Format Name|name]]'''
*'''[[API Format Gender|gender]]'''
*'''[[API Format Gender|gender]]'''
Line 20: Line 20:
*'''[[API Format Phone|phone]]'''
*'''[[API Format Phone|phone]]'''
*[[API Format Phone|fax]]
*[[API Format Phone|fax]]
-
*'''[[API Format Email|email]]'''
+
*'''email'''
-
*[[API Format Additional Data|additionalData]]
+
*[[API Format Additional Data Customer|additionalData]]
 +
*[[API Format Extensions Additional Data Customer|extensionAdditionalData]] (NB! Mandatory for some TLDs)
 +
*[[API Format locale|locale]]
 +
*[[API Format tags|tags]]
|- style="vertical-align:top;"
|- style="vertical-align:top;"
|'''Output'''
|'''Output'''
|
|
-
*'''[[API Format Handle|handle]]'''
+
*[[API Format Handle|handle]]
|}
|}
Line 32: Line 35:
  $request = new OP_Request;
  $request = new OP_Request;
  $request->setCommand('createCustomerRequest')
  $request->setCommand('createCustomerRequest')
-
  ->setAuth(array('username' => 'username', 'password' => 'password'))
+
->setAuth(array('username' => $username, 'password' => $password))
-
  ->setArgs(array(
+
->setArgs(array(
-
    'name' => array(
+
  'name' => array(
-
      'initials' => 'J.B.',
+
    'initials' => 'J.B.',
-
      'firstName' => 'John',
+
    'firstName' => 'John',
-
      'prefix' => 'van',
+
    'prefix' => 'van',
-
      'lastName' => 'Halen',
+
    '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',
 +
  'locale' => 'el_GR',
 +
  'additionalData' => array(
 +
    'birthCity' => 'Amsterdam',
 +
    'birthDate' => '1971-02-14',
 +
    'socialSecurityNumber' => '771268635',
 +
    'companyRegistrationNumber' => '115372'
 +
  ),
 +
  'extensionAdditionalData' => array(
 +
    array(
 +
      'name' => 'us',
 +
      'data' => array(
 +
        'nexusCategory' => 'C31',
 +
        'applicantPurpose' => 'P1'
 +
      )
     ),
     ),
-
 
-
    '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===
===Raw XML===
-
to do
+
''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>
 +
  <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>
 +
    <locale>el_GR</locale>
 +
    <additionalData>
 +
      <birthCity>London</birthCity>
 +
      <birthCountry>GB</birthCountry>
 +
      <birthDate>1976-03-24</birthDate>
 +
    </additionalData>
 +
    <extensionAdditionalData>
 +
    <array>
 +
      <item>
 +
      <name>us</name>
 +
        <data>
 +
        <nexusCategory>C31</nexusCategory>
 +
        <applicantPurpose>P1</applicantPurpose>
 +
        </data>
 +
      </item>
 +
      </array>
 +
    </extensionAdditionalData>
 +
  </createCustomerRequest>
 +
</openXML>
 +
 
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<openXML>
 +
  <reply>
 +
    < code>0</code>
 +
    <desc></desc>
 +
    <data>
 +
      <handle>JH000001-US</handle>
 +
    </data>
 +
  </reply>
 +
</openXML>

Current revision as of 11:03, 26 January 2018

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',
  'locale' => 'el_GR',
  'additionalData' => array(
    'birthCity' => 'Amsterdam',
    'birthDate' => '1971-02-14',
    'socialSecurityNumber' => '771268635',
    'companyRegistrationNumber' => '115372'
  ),
  'extensionAdditionalData' => array(
   array(
     'name' => 'us',
     'data' => array(
       'nexusCategory' => 'C31',
       'applicantPurpose' => 'P1'
     )
   ),
   ),
));

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>
  <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>
    <locale>el_GR</locale>
    <additionalData>
      <birthCity>London</birthCity>
      <birthCountry>GB</birthCountry>
      <birthDate>1976-03-24</birthDate>
    </additionalData>
   <extensionAdditionalData>
    <array>
     <item>
      <name>us</name>
       <data>
        <nexusCategory>C31</nexusCategory>
        <applicantPurpose>P1</applicantPurpose>
       </data>
     </item>
     </array>
   </extensionAdditionalData>
  </createCustomerRequest>
</openXML>
<?xml version="1.0" encoding="UTF-8"?>
<openXML>
  <reply>
    < code>0</code>
    <desc></desc>
    <data>
      <handle>JH000001-US</handle>
    </data>
  </reply>
</openXML>
Views
Personal tools