Contact Check command¶
This command follows standard EPP Contact mapping, RFC-5733
Before creating a new contact object, a <contact:check>
command may be issued
with several variants of the contact handle.
Then, call <contact:create>
command with the first one contact handle which was available as the contact:id
attribute.
Client request¶
<?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>
<check>
<contact:check xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
<contact:id>TAKEN-0303-00015</contact:id>
<contact:id>freehdl-0001231</contact:id>
<contact:id>--+---(8)</contact:id>
<contact:id>client-id-adm0</contact:id>
</contact:check>
</check>
<clTRID>9a4I5Rd0QOaGcPJbsog5</clTRID>
</command>
</epp>
Server response¶
Example of a successfully completed request:
<?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">
<response>
<resData>
<contact:chkData xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" xsi:schemaLocation="urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd">
<contact:cd>
<contact:id avail="0">TAKEN-0303-00015</contact:id>
<contact:reason>Already in use</contact:reason>
</contact:cd>
<contact:cd>
<contact:id avail="0">freehdl-0001231</contact:id>
</contact:cd>
<contact:cd>
<contact:id avail="0">--+---(8)</contact:id>
<contact:reason>Value cannot be used as EPP contact handle</contact:reason>
</contact:cd>
<contact:cd>
<contact:id avail="0">client-id-adm0</contact:id>
<contact:reason>Already in use</contact:reason>
</contact:cd>
</contact:chkData>
</resData>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<trID>
<clTRID>9a4I5Rd0QOaGcPJbsog5</clTRID>
<svTRID>LVNIC-20110601-330e09f2f85547d58a57a6d4e520bc03-7</svTRID>
</trID>
</response>
</epp>
Please note, that if any of the contact:id
elements contains a syntactically invalid value for a contact handle,
the XML schema validation would fail and an error response would be received - as a result, no client handles would be really tried out.
Example of such a request and a resulting response for it:
Request with a too long value for a contact:id given:
<?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>
<check>
<contact:check
xmlns:contact="urn:ietf:params:xml:ns:contact-1.0"
xsi:schemaLocation="urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd">
<contact:id>AG</contact:id>
<contact:id>goodhdl-000123</contact:id>
<contact:id>too-long-contact-handle</contact:id>
</contact:check>
</check>
<clTRID>Qb3VsWu4tiNgly6tKZdF</clTRID>
</command>
</epp>
Resulting error response:
<?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">
<response>
<result code="2001">
<msg>Schema validation failed</msg>
<extValue>
<value><undef/></value>
<reason lang="EN">Element '{urn:ietf:params:xml:ns:contact-1.0}id': [facet 'minLength'] The value has a length of '2'; this underruns the allowed minimum length of '3'.</reason>
</extValue>
<extValue>
<value><undef/></value>
<reason lang="EN">Element '{urn:ietf:params:xml:ns:contact-1.0}id': 'AG' is not a valid value of the atomic type '{urn:ietf:params:xml:ns:eppcom-1.0}clIDType'.</reason>
</extValue>
<extValue>
<value><undef/></value>
<reason lang="EN">Element '{urn:ietf:params:xml:ns:contact-1.0}id': [facet 'maxLength'] The value has a length of '23'; this exceeds the allowed maximum length of '16'.</reason>
</extValue>
<extValue>
<value><undef/></value>
<reason lang="EN">Element '{urn:ietf:params:xml:ns:contact-1.0}id': 'too-long-contact-handle' is not a valid value of the atomic type '{urn:ietf:params:xml:ns:eppcom-1.0}clIDType'.</reason>
</extValue>
</result>
<trID>
<clTRID>Qb3VsWu4tiNgly6tKZdF</clTRID>
<svTRID>LVNIC-20110830-25e092a444524d0284107da7da9c4b80-1</svTRID>
</trID>
</response>
</epp>