5.6.2. Create contact¶
A contact create command is used to register a new contact.
The contact create command is a create
element in the contact
namespace
(http://www.nic.cz/xml/epp/contact-1.6
).
The command must be contained in the <create>
command type.
5.6.2.1. Command element structure¶
The <contact:create>
element must declare the contact
namespace
and schema, and it must contain
the following child elements:
<contact:id>
(1) – the contact handle as fredcom:objIDCreateType.<contact:postalInfo>
(1) – contact’s postal information:<contact:name>
(1) – personal name as contact:postalLineType,<contact:org>
(0..1) – organization name as contact:optPostalLineType,<contact:addr>
(1) – address:<contact:street>
(1..3) – street line 1–3 as contact:optPostalLineType,<contact:city>
(1) – city as contact:postalLineType,<contact:sp>
(0..1) – state or province as contact:optPostalLineType,<contact:pc>
(1) – postal code as contact:pcType,<contact:cc>
(1) – country code as contact:ccType,
<contact:voice>
(0..1) – telephone number as contact:e164StringType,<contact:fax>
(0..1) – fax number as contact:e164StringType,<contact:email>
(1) – email address(es) as contact:emailCommaListType,<contact:authInfo>
(0..1) – authorization information (AuthInfo) as fredcom:authInfoType; the AuthInfo will be generated by the server,<contact:disclose>
(0..1) – contact information disclosure settings:@flag
(R) – disclose flag as a xs:boolean:0
– hide listed items,1
– publish listed items,<contact:voice/>
(0..1) – telephone disclosure setting as an empty element,<contact:fax/>
(0..1) – fax disclosure setting as an empty element,<contact:email/>
(0..1) – email disclosure setting as an empty element,<contact:vat/>
(0..1) – VAT number disclosure setting as an empty element,<contact:ident/>
(0..1) – identity document disclosure setting as an empty element,<contact:notifyEmail/>
(0..1) – notification email disclosure setting as an empty element.
Note
Omitted items will be set by the server according to its disclosure policy.
Whether the new disclosure settings will have an effect, also depends on the server’s policy.
If the whole
<contact:disclose>
element is omitted, then the dislosure preference of all attributes is set according to the server disclosure policy.See also Policies & rules of disclosure, which contain examples of behaviour.
<contact:vat>
(0..1) – VAT-payer identifier as a contact:vatT,<contact:ident>
(0..1) – identity-document identification:@type
(R) – the type of the identity document as one of values:op
(identity card number),passport
(passport number),mpsv
(number from the Ministry of Labour and Social Affairs),ico
(company number),birthday
(the date of birth),element content: an identification number as a contact:identValueT,
<contact:notifyEmail>
(0..1) – notification email address(es) as contact:emailUpdCommaListType.
Important
Since FRED 2.48.0, in accordance with RFC 9154, create
with
nonempty AuthInfo is forbidden. Empty AuthInfo
(meaning Authinfo is present, but empty) is allowed.
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd">
<command>
<create>
<contact:create xmlns:contact="http://www.nic.cz/xml/epp/contact-1.6"
xsi:schemaLocation="http://www.nic.cz/xml/epp/contact-1.6 contact-1.6.6.xsd">
<contact:id>CID-MYCONTACT</contact:id>
<contact:postalInfo>
<contact:name>John Doe</contact:name>
<contact:org>Company X Ltd.</contact:org>
<contact:addr>
<contact:street>Street 123</contact:street>
<contact:city>City</contact:city>
<contact:pc>12300</contact:pc>
<contact:cc>CZ</contact:cc>
</contact:addr>
</contact:postalInfo>
<contact:voice>+420.222123456</contact:voice>
<contact:email>john@doe.cz</contact:email>
<contact:disclose flag="1">
<contact:fax/>
<contact:vat/>
<contact:ident/>
<contact:notifyEmail/>
</contact:disclose>
<contact:vat>1312112029</contact:vat>
<contact:notifyEmail>notify-john@doe.cz</contact:notifyEmail>
</contact:create>
</create>
<clTRID>ckmf002#17-07-28at12:11:37</clTRID>
</command>
</epp>
> create_contact CID-MYCONTACT 'John Doe' john@doe.cz 'Street 123' City 12300 CZ NULL 'Company X Ltd.' NULL +420.222123456 NULL (y (fax, vat, ident, notify_email)) 1312112029 () notify-john@doe.cz
5.6.2.1.1. Mailing address extension¶
The <contact:create>
element is used in the same way as described above.
The command extension can be used to set the mailing address at the time of creation. Otherwise you can set the mailing address later with the contact:update.
The command’s <extension>
element must contain a single <extra-addr:create>
element which declares the extra-addr
namespace (http://www.nic.cz/xml/epp/extra-addr-1.0
)
and schema and contains:
<extra-addr:mailing>
(1) – mailing address container:<extra-addr:addr>
(1) – address:<extra-addr:street>
(1..3) – street line 1–3 as extra-addr:postalLineType,<extra-addr:city>
(1) – city as extra-addr:postalLineType,<extra-addr:sp>
(0..1) – state or province as extra-addr:postalLineType,<extra-addr:pc>
(1) – postal code as extra-addr:pcType,<extra-addr:cc>
(1) – country code as extra-addr:ccType.
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd">
<command>
<create>
<contact:create xmlns:contact="http://www.nic.cz/xml/epp/contact-1.6"
xsi:schemaLocation="http://www.nic.cz/xml/epp/contact-1.6 contact-1.6.6.xsd">
<contact:id>CID-EXTRAADDR</contact:id>
<contact:postalInfo>
<contact:name>Foo Bar</contact:name>
<contact:addr>
<contact:street>Kratka 42</contact:street>
<contact:city>Praha</contact:city>
<contact:pc>11150</contact:pc>
<contact:cc>CZ</contact:cc>
</contact:addr>
</contact:postalInfo>
<contact:email>foobar@nic.cz</contact:email>
</contact:create>
</create>
<extension>
<extra-addr:create
xmlns:extra-addr="http://www.nic.cz/xml/epp/extra-addr-1.0"
xsi:schemaLocation="http://www.nic.cz/xml/epp/extra-addr-1.0 extra-addr-1.0.0.xsd">
<extra-addr:mailing>
<extra-addr:addr>
<extra-addr:street>Dlouha 24</extra-addr:street>
<extra-addr:city>Lysa nad Labem</extra-addr:city>
<extra-addr:pc>28922</extra-addr:pc>
<extra-addr:cc>CZ</extra-addr:cc>
</extra-addr:addr>
</extra-addr:mailing>
</extra-addr:create>
</extension>
<clTRID>hehr010#15-08-25at17:03:10</clTRID>
</command>
</epp>
> create_contact CID-EXTRAADDR 'Foo Bar' foobar@nic.cz 'Kratka 42' Praha 11150 CZ NULL NULL NULL NULL NULL () NULL () NULL (('Dlouha 24' 'Lysa nad Labem' 28922 CZ))
5.6.2.2. Response element structure¶
The response from the FRED EPP server contains the result, response data, and transaction identification.
See also Success or failure of a command.
The response data element (<resData>
) contains a single child element
<contact:creData>
which declares the contact
namespace and schema,
and it contains the following child elements:
<contact:id>
(1) – the contact handle as fredcom:objIDType,<contact:crDate>
(1) – the timestamp of creation as xs:dateTime.
<?xml version="1.0" encoding="UTF-8"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<resData>
<contact:creData xmlns:contact="http://www.nic.cz/xml/epp/contact-1.6"
xsi:schemaLocation="http://www.nic.cz/xml/epp/contact-1.6 contact-1.6.6.xsd">
<contact:id>CID-MYCONTACT</contact:id>
<contact:crDate>2017-07-28T12:11:43+02:00</contact:crDate>
</contact:creData>
</resData>
<trID>
<clTRID>ckmf002#17-07-28at12:11:37</clTRID>
<svTRID>ReqID-0000140980</svTRID>
</trID>
</response>
</epp>
5.6.2.2.1. Mailing address extension¶
Response extension is not used in reply to this command.