WAPI – command contact-create

  Contacts, WAPI (API interface)

This command creates a new contact that you can use for various operations with domains. Each contact is identified by its name, which is always unique. Not all types of the domain using contacts, and each of them has different rules.

Some registers of a domain allow you to set its own contact name in parameters (must be available for registration – command contact-check), otherwise, it will be generated automatically (command returns it as parameter cname).

More detailed specifications for working with contacts in the various registers:

To the items’ email, email2 and notify-email are required to specify an existing address when creating /editing a contact there is a checking of the existence of these e-mail addresses.

Parameters

  • tld – domain TLD 
  • contact –  items of a new contact:
    • cname – contact name (empty – automatically generated)
    • fname – name
    • lname – last name 
    • company – company
    • addr_street – street
    • addr_city – city
    • addr_zip – ZIP
    • addr_state – state
    • addr_country – country (ISO country code – lowercase)
    • phone – phone
    • fax – fax
    • email – e-mail
    • email2 – second e-mail
    • ic – company ID
    • dic – VAT number
    • + other items according to the registry

Retur Values

  • 1000 = contact was successfully created
  • 2201 = invalid tld
  • 2216 = invalid contact name
  • 2218 = contact name is automatically created
  • 2219 = not filled item company
  • 2220 = item name is not filled
  • 2221 = surname not filled 
  • 2222 = email not filled 
  • 2223 = email wrong format
  • 2224 = email2 not filled
  • 2225 = email2 wrong format
  • 2226 = phone not filled
  • 2227 = phone wrong format
  • 2228 = fax not filled
  • 2229 = fax wrong format 
  • 2230 = company ID not filled 
  • 2231 = company ID wrong format
  • 2232 = VAT number not filled
  • 2233 = VAT number wrong format
  • 2234 = street not filled
  • 2235 = city not filled
  • 2236 = ZIP not filled
  • 2237 = country not filled
  • 2238 = country wrong format
  • 2239 = state not filled
  • 2240 = other data not filled
  • 2241 = ozheer data wrong format 
  • 3228 = domain does not work with contacts
  • 3230 = failed to create a contact
  • 3231 = contact name is already used
  • 3232 = contact can not be used – reason unknown
  • 3233 = contact can not be used
  • 3234 = contact can not be used – quarantined
  • 3235 = contact can not be used – reserved
  • 3236 = contact can not be used – blocked
  • 3237 = contact is already registered with us
  • 4211 = failed to check contact – communication error
  • 4213 = failed to create a contact – communication error

Return data

If successful, the command returns the following data:

  • cname – created contact name

Example of use

XML query:

<request>
 <user>tester</user>
 <auth>e347aa51858cf6b6c017ae5d060fefca1b9dba38</auth>
 <command>contact-create</command>
 <clTRID>5428</clTRID>
 <data>
  <tld>cz</tld>
  <contact>
   <fname>Franta</fname>
   <lname>Tester</lname>
   <email>tester@example.com</email>
   <addr_street>Street 123</addr_street>
   <addr_city>Minas Morgull</addr_city>
   <addr_zip>12345</addr_zip>
   <addr_country>vg</addr_country>
   <phone>+011 123456789</phone>
   <notify_email>tester@example.com</notify_email>
  </contact>
 </data>
</request>

XML response:

<response>
 <code>1000</code>
 <result>OK</result>
 <timestamp>1288102525</timestamp>
 <clTRID>5428</clTRID>
 <svTRID>1288102525.0998.21781.1</svTRID>
 <command>contact-create</command>
 <data>
  <cname>WEDOS-PPE-50</cname>
 </data>
</response>