API Module Domain createDomainRequest
From Openprovider API documentation
(Difference between revisions)
| (52 intermediate revisions not shown) | |||
| Line 1: | Line 1: | ||
==Module Domain > Create== | ==Module Domain > Create== | ||
| + | Fields marked in bold are mandatory. Prior to use this API method make sure if the domain TLD requires [[API Format Extensions Additional Data Customer|additional data]] for domain owner to be filled in. | ||
{| border="1" cellpadding="4" | {| border="1" cellpadding="4" | ||
|- style="background-color:#BBBBBB;" | |- style="background-color:#BBBBBB;" | ||
| Line 9: | Line 10: | ||
|- | |- | ||
|'''Use''' | |'''Use''' | ||
| - | |Registers a domain with the provided | + | |Registers a domain name with the attributes provided |
|- style="vertical-align:top;" | |- style="vertical-align:top;" | ||
|'''Input''' | |'''Input''' | ||
| | | | ||
*'''[[API Format Domain|domain]]''' | *'''[[API Format Domain|domain]]''' | ||
| - | *'''period''' | + | *'''[[API Format Period|period]]''' |
| - | *'''ownerHandle''' | + | *'''[[API Format Handle|ownerHandle]]''' (customer unique identifier or [[API Format Handle|handle]]) |
| - | *'''adminHandle''' | + | *'''[[API Format Handle|adminHandle]]''' (customer unique identifier or [[API Format Handle|handle]]) |
| - | *'''techHandle''' | + | *'''[[API Format Handle|techHandle]]''' (customer unique identifier or [[API Format Handle|handle]]) |
| - | *billingHandle | + | *[[API Format Handle|billingHandle]] (customer unique identifier or [[API Format Handle|handle]]) |
| - | *resellerHandle | + | *[[API Format Handle|resellerHandle]] (customer unique identifier or [[API Format Handle|handle]]) |
| - | *nsGroup | + | *'''[[API Format nsGroup|nsGroup]]''' ('nameserver group', use ''dns-openprovider'' if you want to use our nameservers. Mandatory field only if nameServers field is empty) |
| - | *nsTemplateName | + | *[[API Format nsTemplateName|nsTemplateName]] (name of the template to use to automatically create DNS zone on the domain; only applicable if nsGroup is ''dns-openprovider'') |
| - | *[[API Format Nameservers|nameServers]] | + | *'''[[API Format Nameservers|nameServers]]''' (mandatory field only if nsGroup field is empty) |
| - | *useDomicile (''0'' (default) or ''1'') | + | *[[API Format isDnssecEnabled|isDnssecEnabled]] (''0'' (default) or ''1'' - Only accepted when nameservers of Openprovider are used) |
| + | *[[API Format DNSSEC Keys|dnssecKeys]] (when using your own nameservers) | ||
| + | *[[API Format useDomicile|useDomicile]] (''0'' (default) or ''1'') | ||
| + | *acceptPremiumFee (required in case when domain is premium, value is the price returned in the response for createDomainRequest without acceptPremiumFee) | ||
| + | *[[API Format isPrivateWhoisEnabled|isPrivateWhoisEnabled]] (''0'' or ''1'', default value is ''0'') | ||
*promoCode | *promoCode | ||
| - | *autorenew | + | *[[API Format autorenew|autorenew]] ''( on | off | default )'' |
*comments | *comments | ||
| - | *[[API Format | + | *[[API Format Additional Data|additionalData]] (mandatory for some TLDs) |
| - | *applicationMode ( | + | *[[API Format applicationMode|applicationMode]] (required for new gTLDs) |
| - | + | ||
| - | + | ||
|- style="vertical-align:top;" | |- style="vertical-align:top;" | ||
|'''Output''' | |'''Output''' | ||
| | | | ||
| - | *status | + | *[[API Format Domain status|status]] ''(ACT - active or REQ - requested)'' |
| - | *authCode | + | *[[API Format authCode|authCode]] ''(only in case if TLD supports it)'' |
| - | *activationDate ''(only in case of a succeeded realtime domain registration)'' | + | *[[API Format activationDate|activationDate]] ''(available only in case of a succeeded realtime domain registration)'' |
| - | *expirationDate ''(only in case of a succeeded realtime domain registration)'' | + | *[[API Format expirationDate|expirationDate]] ''(available only in case of a succeeded realtime domain registration)'' |
| - | *renewalDate ''(only in case of a succeeded realtime domain registration)'' | + | *[[API Format expirationDateOpenprovider|expirationDateOpenprovider]] ''(Same as renewalDate. Available only in case of a succeeded realtime domain registration)'' |
| + | *[[API Format renewalDate|renewalDate]] ''(Date when a domain expires at Openprovider. This date should be referred for domain expiration and renewals.available only in case of a succeeded realtime domain registration)'' | ||
|} | |} | ||
| Line 57: | Line 61: | ||
'period' => '1', | 'period' => '1', | ||
'nsGroup' => 'dns-openprovider', | 'nsGroup' => 'dns-openprovider', | ||
| - | |||
)); | )); | ||
===Raw XML=== | ===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.'' | ''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.'' | ||
| + | |||
| + | '''NB''': When submitting multiple domain names in an array, the <domain'''s'''> (plural) XML field should be used instead of <domain>. | ||
| + | |||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
<openXML> | <openXML> | ||
| Line 79: | Line 85: | ||
<period>1</period> | <period>1</period> | ||
<nsGroup>dns-openprovider</nsGroup> | <nsGroup>dns-openprovider</nsGroup> | ||
| - | |||
</createDomainRequest> | </createDomainRequest> | ||
</openXML> | </openXML> | ||
| Line 92: | Line 97: | ||
<activationDate>2011-04-22 14:14:32</activationDate> | <activationDate>2011-04-22 14:14:32</activationDate> | ||
<expirationDate>2012-04-22 14:41:32</expirationDate> | <expirationDate>2012-04-22 14:41:32</expirationDate> | ||
| - | < | + | <expirationDateOpenprovider>2012-04-22 14:41:32</expirationDateOpenprovider> |
<authCode>123456</authCode> | <authCode>123456</authCode> | ||
</data> | </data> | ||
| + | </reply> | ||
| + | </openXML> | ||
| + | |||
| + | ''Output example for the attempt to register premium domain without parameter acceptPremiumFee:'' | ||
| + | <?xml version="1.0" encoding="UTF-8"?> | ||
| + | <openXML> | ||
| + | <reply> | ||
| + | < code>379</code> | ||
| + | <desc>You are about to register the premium domain. If you accept this registration fee, re-send the createDomainRequest and add the parameters "acceptPremiumFee" with the value of a premium fee, which can be found in the `data` block of this command output.</desc> | ||
| + | <data>33</data> | ||
</reply> | </reply> | ||
</openXML> | </openXML> | ||
Current revision as of 09:00, 19 August 2025
Contents |
Module Domain > Create
Fields marked in bold are mandatory. Prior to use this API method make sure if the domain TLD requires additional data for domain owner to be filled in.
| Module | domain |
| Command name | createDomainRequest |
| Use | Registers a domain name with the attributes provided |
| Input |
|
| Output |
|
Examples
Using PHP class
$request = new OP_Request;
$request->setCommand('createDomainRequest')
->setAuth(array('username' => 'username', 'password' => 'password'))
->setArgs(array(
'ownerHandle' => 'SR003891-NL',
'adminHandle' => 'SR003891-NL',
'techHandle' => 'SR003891-NL',
'billingHandle' => 'SR003891-NL',
'domain' => array(
'name' => 'this-domain-is-registered',
'extension' => 'com'
),
'period' => '1',
'nsGroup' => 'dns-openprovider',
));
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.
NB: When submitting multiple domain names in an array, the <domains> (plural) XML field should be used instead of <domain>.
<?xml version="1.0" encoding="UTF-8"?>
<openXML>
<credentials>
<username>username</username>
<password>password</password>
</credentials>
<createDomainRequest>
<ownerHandle>SR003891-NL</ownerHandle>
<adminHandle>SR003891-NL</adminHandle>
<techHandle>SR003891-NL</techHandle>
<billingHandle>SR003891-NL</billingHandle>
<domain>
<name>this-domain-is-registered</name>
<extension>com</extension>
</domain>
<period>1</period>
<nsGroup>dns-openprovider</nsGroup>
</createDomainRequest>
</openXML>
<?xml version="1.0" encoding="UTF-8"?>
<openXML>
<reply>
< code>0</code>
<desc></desc>
<data>
<status>ACT</status>
<activationDate>2011-04-22 14:14:32</activationDate>
<expirationDate>2012-04-22 14:41:32</expirationDate>
<expirationDateOpenprovider>2012-04-22 14:41:32</expirationDateOpenprovider>
<authCode>123456</authCode>
</data>
</reply>
</openXML>
Output example for the attempt to register premium domain without parameter acceptPremiumFee:
<?xml version="1.0" encoding="UTF-8"?>
<openXML>
<reply>
< code>379</code>
<desc>You are about to register the premium domain. If you accept this registration fee, re-send the createDomainRequest and add the parameters "acceptPremiumFee" with the value of a premium fee, which can be found in the `data` block of this command output.</desc>
<data>33</data>
</reply>
</openXML>