EPP-DRS API

Introduction

Anatomy of API call

All input parameters to the API are transmitted as HTTP Query Parameters. Both GET and POST Requests are accepted.

API URL

Transaction ID

In every response from EPP-DRS, you will find a string element called transactionId. This is simply a unique identifier EPP-DRS assigns to this request for tracking and troubleshooting purposes.

Common parameters

Name Description
keyId An API key, generated by EPP-DRS. Can be found in Control panel → Settings → API settings
signature Signature that signs each and every API request. Instructions on how to generate this signature can be found below.
version API version. 20111014 is the latest
action Action to trigger. See the list of actions

Generate signature

To create the signature

  1. Create the canonicalized query string that you need later in this procedure:
    1. Sort the UTF-8 query string components by parameter name with natural byte ordering. The parameters can come from the GET URI or from the POST body (when Content-Type is application/x-www-form-urlencoded).
    2. URL encode the parameter name and values
    3. Concatinate name and values to a single string (eg. var1value1var2value2)
  2. Calculate an RFC 2104-compliant HMAC with the string you just created, your API Access Key (You can get it on 'Control Panel → Settings → API settings' page) as the key, and SHA1 as the hash algorithm. For more information, go to http://www.ietf.org/rfc/rfc2104.txt.
  3. Make the resulting value base64 encoded.
  4. Use the Resulting value as the value of the Signature request parameter.

Sample request

https://epp-drs.com/api.php?action=listContacts
&version=20090622
&keyId=kRFRw0vnj88%3D
&query=C000
&limit=-1
&signature=v8x1nc%2FtND%2FHf3UgV9nd8Wi0lk4%3D

Sample response

<?xml version="1.0"?>
<listContactsResponse>
  <contactList>
    <contact>
      <clid>C000000042262-KZ</clid>
      <name>Marat Komarov</name>
      <email>marat@webta.net</email>
    </contact>
    <contact>
      <clid>C000-443042426</clid>
      <name>Kazimir Malevich</name>
      <email>kazi@painter.com</email>
    </contact>
  </contactList>
  <total>35</total>
  <transactionId>456b7dc4-aa34-4f28-8e13-361eb1205a7a</transactionId>
</listContactsResponse>

Sample error response

<?xml version="1.0"?>
<error>
  <message>'locked' parameter is required</message>
  <transactionId>d5c1bb92-4c55-4d1e-a92c-63ab3783f31d</transactionId>
</error>

Actions

getTldInfo

Get TLD meta information: - registration period, - domain extra fields - transfer options - renewal options - etc…

Changelog Added contacts section (v2010-05-24)

Request parameters

Name Type Version Description
tld string 2009-06-22 Domain extension

Sample request

https://epp-drs.com/api.php?action=getTldInfo
&version=20090622
&keyId=kRFRw0vnj88%3D
&tld=asia
&signature=QeT0rFZcHeZ9zHBdO6SweQykXfw%3D

Sample response

<?xml version="1.0"?>
<getTldInfoResponse>
  <registration>
    <minPeriod>1</minPeriod>
    <maxPeriod>10</maxPeriod>
    <extraFields>
      <field>
        <description>Local presence for .ASIA domain registrations
        </description>
        <type>select</type>
        <options>
          <option>
            <value>1</value>
            <title>Yes</title>
          </option>
          <option>
            <value>0</value>
            <title>No</title>
          </option>
        </options>
        <name>x-asia-ced-accept-trustee-tac</name>
        <required>1</required>
      </field>
      <field>
        <description>Indicates which contact should be used as CED
        </description>
        <type>select</type>
        <options>
          <option>
            <value>registrant</value>
            <title>Registrant</title>
          </option>
          <option>
            <value>admin</value>
            <title>Administrative</title>
          </option>
          <option>
            <value>billing</value>
            <title>Billing</title>
          </option>
          <option>
            <value>tech</value>
            <title>Technical</title>
          </option>
        </options>
        <name>x-asia-ced-contact</name>
        <required>1</required>
      </field>
      <field>
        <description>Location or domicile of the entity</description>
        <type>text</type>
        <name>x-asia-ced-cclocality</name>
        <required>1</required>
        <minLength>1</minLength>
        <maxLength>255</maxLength>
      </field>
      <field>
        <description>Province of establishment of the CED</description>
        <type>text</type>
        <name>x-asia-ced-localitysp</name>
        <required>1</required>
        <minLength>1</minLength>
        <maxLength>255</maxLength>
      </field>
      <field>
        <description>City of establishment of the CED</description>
        <type>text</type>
        <name>x-asia-ced-localitycity</name>
        <required>1</required>
        <minLength>1</minLength>
        <maxLength>255</maxLength>
      </field>
      <field>
        <description>Type of entity</description>
        <type>select</type>
        <options>
          <option>
            <value>naturalperson</value>
            <title>Natural Person</title>
          </option>
          <option>
            <value>corporation</value>
            <title>Corporation</title>
          </option>
          <option>
            <value>cooperative</value>
            <title>Cooperative</title>
          </option>
          <option>
            <value>partnership</value>
            <title>Partnership</title>
          </option>
          <option>
            <value>government</value>
            <title>Government</title>
          </option>
          <option>
            <value>politicalparty</value>
            <title>Politicalparty</title>
          </option>
          <option>
            <value>society</value>
            <title>Society</title>
          </option>
          <option>
            <value>institution</value>
            <title>Institution</title>
          </option>
          <option>
            <value>other</value>
            <title>Other</title>
          </option>
        </options>
        <name>x-asia-ced-legalentitytype</name>
        <required>1</required>
      </field>
      <field>
        <description>Form of identification</description>
        <type>select</type>
        <options>
          <option>
            <value>passport</value>
            <title>Passport</title>
          </option>
          <option>
            <value>certificate</value>
            <title>Certificate</title>
          </option>
          <option>
            <value>legislation</value>
            <title>Legislation</title>
          </option>
          <option>
            <value>societyregistry</value>
            <title>Society Registry</title>
          </option>
          <option>
            <value>politicalpartyregistry</value>
            <title>Political Party Registry</title>
          </option>
          <option>
            <value>other</value>
            <title>Other</title>
          </option>
        </options>
        <name>x-asia-ced-identform</name>
        <required>1</required>
      </field>
      <field>
        <description>Identification number / code of reference</description>
        <type>text</type>
        <name>x-asia-ced-identnumber</name>
        <required>1</required>
        <minLength>1</minLength>
        <maxLength>255</maxLength>
      </field>
      <field>
        <description>Description of the type of entity</description>
        <type>text</type>
        <name>x-asia-ced-otherletype</name>
        <required>1</required>
        <minLength>1</minLength>
        <maxLength>255</maxLength>
      </field>
      <field>
        <description>Description of the form of identification</description>
        <type>text</type>
        <name>x-asia-ced-otheridentform</name>
        <required>1</required>
        <minLength>1</minLength>
        <maxLength>255</maxLength>
      </field>
    </extraFields>
  </registration>
  <renew>
    <available>1</available>
    <minPeriod>1</minPeriod>
    <maxPeriod>10</maxPeriod>
  </renew>
  <contacts>
    <groups>
      <group>
        <name>contact</name>
        <title>Admin or Technical</title>
        <fields>
          <field>
            <description>Full name</description>
            <type>text</type>
            <name>name</name>
            <required>1</required>
            <minLength>3</minLength>
            <maxLength>255</maxLength>
          </field>
          <field>
            <description>Organization</description>
            <type>text</type>
            <name>org</name>
            <required>0</required>
            <minLength>3</minLength>
            <maxLength>255</maxLength>
          </field>         
          <field>
            <description>Country</description>
            <type>select</type>
            <options>
              <option><value>AF</value><title>Afghanistan</title></option>
              <option><value>AL</value><title>Albania</title></option>
              <option><value>DZ</value><title>Algeria</title></option>
              .... 
            </options>
            <name>cc</name>
            <required>1</required>
            <minLength>2</minLength>
            <maxLength>2</maxLength>
          </field>
          <field>
            <description>City</description>
            <type>text</type><name>city</name>
            <required>1</required>
            <minLength>2</minLength>
            <maxLength>255</maxLength>
          </field>
          <field>
            <description>Zip code</description>
            <type>text</type>
            <name>pc</name>
            <required>1</required>
            <minLength>2</minLength>
            <maxLength>16</maxLength>
          </field>
          <field>
            <description>Address 1</description>
            <type>text</type>
            <name>street1</name>
            <required>1</required>
            <minLength>3</minLength>
            <maxLength>255</maxLength>
          </field>
          <field>
            <description>Address 2</description>
            <type>text</type>
            <name>street2</name>
            <required>0</required>
            <minLength>3</minLength>
            <maxLength>255</maxLength>
          </field>
          <field>
            <description>Phone</description>
            <type>phone</type>
            <name>voice</name>
            <required>0</required>
          </field>
          <field>
            <description>Fax</description>
            <type>phone</type>
            <name>fax</name>
            <required>0</required>
          </field>
          <field>
            <description>Email</description>
            <type>text</type>
            <name>email</name>
            <required>1</required>
            <minLength>2</minLength>
            <maxLength>255</maxLength>
          </field>
        </fields>
      </group>
      <group>
        <name>holder</name>
        <title>Registrant</title>
        <fields>
          ...
        </fields>
      </group>
    <groups>
    <types>
      <type>
        <name>registrant</name>
        <group>holder</group>
        <required>1</required>
      </type>
      <type>
        <name>admin</name>
        <group>contact</group>
        <required>1</required>
      </type>
      <type>
        <name>tech</name>
        <group>contact</group>
        <required>1</required>
      </type>
    </types>
  </contacts>
  <transactionId>e3f30510-7c22-4497-9b2d-89aa9def4e7f</transactionId>
</getTldInfoResponse>

createContact

Creates domain contact. Server will reply with contact CLID, that can be used in creatDomain action.

Changelog

Request parameters

Name Type Version Description
tld string 2010-05-24 Domain extension
type string 2010-05-24 Contact type. See getTldInfo
group string 2010-05-24 Contact group. See getTldInfo
userId int 2010-05-24 User ID to which assign registered domain. (Available for admin)

Sample request

https://epp-drs.com/api.php?action=createContact
&version=20100524
&keyId=xinmOym9vLE%3D
&tld=lu
&type=tech
&name=Marat+Komarov
&org=Webta
&street1=str
&pc=99022
&city=Sebastopol
&cc=UA
&email=marat%40localhost
&voice=%2B38.111111111
&signature=NCIEUqvlV89CykVH9gbaBIezKm0%3D

Sample response

<?xml version="1.0"?>
<createContactResponse>
  <clid>C77327613</clid>
  <transactionId>b523f60a-895a-4152-996d-1ad1d6300331</transactionId>
</createContactResponse>

checkDomain

Checks whether domain names exist. The server will reply with registered / not registered

Changelog

Request parameters

Name Type Version Description
name string 2009-06-22 Domain name

Sample request

https://epp-drs.com/api.php?action=checkDomain
&version=20090622
&keyId=kRFRw0vnj88%3D
&name=f00t00morrow.gr
&signature=fvatTFVwRNF1cyH%2Fj%2Flaig8QytY%3D

Sample response

<?xml version="1.0"?>
<checkDomainResponse>
  <name>f00t00morrow.gr</name>
  <avail>1</avail>
  <transactionId>1e367fa6-fac7-46de-a117-e6abc51ac2b6</transactionId>
</checkDomainResponse>

createDomain

Register domain name

Changelog

Request parameters

Name Type Version Description
name string 2009-06-22 Domain name
period int 2009-06-22 Registration period
registrant string 2009-06-22 Registrant contact CLID. See listContacts
admin string 2009-06-22 Admin contact CLID. See listContacts
billing string 2009-06-22 Billing contact CLID. See listContacts
tech string 2009-06-22 Technical contact CLID. See listContacts
ns array[string] 2009-06-22 Array of nameservers
extraFields array[key ⇒ value] 2009-06-22 Assoc array of domain registration extra parameters. See getTldInfo
userId int 2009-06-22 User ID to which assign registered domain. (Available for admin)
noBilling bool 2009-06-22 Disable billing for domain opeartion (Available for admin)

Sample request

https://epp-drs.com/api.php?action=createDomain
&version=20090622
&keyId=kRFRw0vnj88%3D
&name=miumau.no
&period=1
&registrant=GL1O
&admin=MK10P
&tech=MK10P
&ns%5B0%5D=ns.google.com
&ns%5B1%5D=ns2.google.com
&userId=14
&signature=3Z63EsrPlWKaclU3mECsUfHt%2BN0%3D

Sample response

<?xml version="1.0"?>
<createDomainResponse>
  <name>miumau.no</name>
  <status>ok</status>
  <transactionId>719a9232-5815-448c-8dc8-9ad6c2d4c0cd</transactionId>
</createDomainResponse>

renewDomain

Renew domain name

Changelog

Request parameters

Name Type Version Description
name string 2010-04-08 Domain name
period int 2010-04-08 Renewal period
userId int 2010-04-08 User ID to which assign registered domain. (Available for admin)
noBilling bool 2010-04-08 Disable billing for domain opeartion (Available for admin)

Sample request

https://epp-drs.com/api.php?action=renewDomain
&version=20100408
&keyId=kRFRw0vnj88%3D
&name=miumau.no
&period=1
&userId=14
&signature=3Z63EsrPlWKaclU3mECsUfHt%2BN0%3D

Sample response

<?xml version="1.0"?>
<renewDomainResponse>
  <transactionId>719a9232-5815-448c-8dc8-9ad6c2d4c0cd</transactionId>
</renewDomainResponse>

transferDomain

Request ingoing transfer

Changelog

Request parameters

Name Type Version Description
name string 2009-06-22 Domain name
authCode string 2009-06-22 EPP auth code
registrant string 2009-06-22 Registrant contact CLID. See listContacts
admin string 2009-06-22 Admin contact CLID. See listContacts
billing string 2009-06-22 Billing contact CLID. See listContacts
tech string 2009-06-22 Technical contact CLID. See listContacts
extraFields array[key ⇒ value] 2009-06-22 Assoc array of domain registration extra parameters. See getTldInfo
userId int 2009-06-22 User ID to which assign registered domain. (Available for admin)
noBilling bool 2009-06-22 Disable billing for domain opeartion (Available for admin)

Sample request

https://epp-drs.com/api.php?action=transferDomain
&version=20090622
&keyId=kRFRw0vnj88%3D
&name=api-for-transfer-3.gr
&authCode=200839921
&userId=15
&noBilling=1
&signature=VG4MwYFNkK%2BEWAqN2eMekML9DbM%3D

Sample response

<?xml version="1.0"?>
<transferDomainResponse>
  <transactionId>4c2b4f68-0b17-4f13-82d2-88160ada60eb</transactionId>
</transferDomainResponse>

updateDomainContact

Updates one of the domain contacts (registrant, admin, billing, tech). For some registries change registrant contact may cause trade. User will be billed for it.

Changelog

Request parameters

Name Type Version Description
name string 2009-06-22 Domain name
contactType string 2009-06-22 Contact type. 'registrant', 'admin', 'billing', 'tech' are available.
clid string 2009-06-22 Contact CLID
noBilling bool 2009-06-22 Disable billing for domain operation (Available for admin)

Sample request

https://epp-drs.com/api.php?action=updateDomainContact
&version=20090622
&keyId=PybmwXwMZnI%3D
&name=epp-drs.be
&contactType=registrant
&clid=c49027
&signature=Uu20bIn8I8WeDUZXbsq75K2t%2Bwo%3D

Sample response

<?xml version="1.0"?>
<updateDomainContactResponse>
  <transactionId>db3fe3fd-a83a-4809-ace6-cdf1f20a20e4</transactionId>
</updateDomainContactResponse>

updateDomainLock

Set domain transfer lock.

Changelog

Request parameters

Name Type Version Description
name string 2009-06-22 Domain name
locked bool 2009-06-22 Locked flag

Sample request

https://epp-drs.com/api.php?action=updateDomainLock
&version=20090622
&keyId=kRFRw0vnj88%3D
&name=epp-drs.no
&locked=1
&signature=1RsjDlRfP5gdR%2BPetV0ydR8p%2Buc%3D

Sample response

<?xml version="1.0"?>
<updateDomainLockResponse>
  <transactionId>d5c1bb92-4c55-4d1e-a92c-63ab3783f31d</transactionId>
</updateDomainLockResponse>

updateDomainNameservers

Set domains nameservers.

Changelog

Request parameters

Name Type Version Description
name string 2009-06-22 Domain name
ns array[string] 2009-06-22 Array of nameservers

Sample request

https://epp-drs.com/api.php?action=updateDomainNameservers
&version=20090622
&keyId=kRFRw0vnj88%3D
&name=epp-drs.no
&ns%5B0%5D=ns.nsmatrix.com
&ns%5B1%5D=ns2.nsmatrix.com
&signature=HdpAw2zaChG8IlM574jIJLrgBC4%3D

Sample response

<?xml version="1.0"?>
<updateDomainNameserversResponse>
  <transactionId>55794de3-2f8b-417c-8729-57734498a2bd</transactionId>
</updateDomainNameserversResponse>

updateDomainFlags

Modify domain flags

Changelog

Request parameters

Name Type Version Description
name string 2011-02-17 Domain name
add array[string] 2011-02-17 Flags to add
remove array[string] 2011-02-17 Flags to add

Sample request

https://epp-drs.com/api.php?action=updateDomainFlags
&version=20110217
&keyId=kRFRw0vnj88%3D
&name=epp-drs.no
&add%5B0%5D=clientRenewProhibited
&remove%5B1%5D=clientTradeProhibited
&signature=HdpAw2zaChG8IlM574jIJLrgBC4%3D

Sample response

<?xml version="1.0"?>
<updateDomainFlagsResponse>
  <transactionId>55794de3-2f8b-417c-8729-57734498a2bd</transactionId>
</updateDomainFlagsResponse>

getDomainInfo

Get domain information from registry/local database

Changelog

Request parameters

Name Type Version Description
name string 2009-06-22 Domain name
mode string 2009-06-22 Request mode. 'registry' - request registry server, 'local' - EPP-DRS database

Sample request

https://epp-drs.com/api.php?action=getDomainInfo
&version=20090622
&keyId=kRFRw0vnj88%3D
&name=kolizey.it
&mode=registry
&signature=c0TKS6lSiWmwOzLtvXBmabTfID8%3D

Sample response

<?xml version="1.0"?>
<getDomainInfoResponse>
  <name>kolizey.it</name>
  <contacts>
    <registrant>C55215128</registrant>
    <admin>C81338287</admin>
  </contacts>
  <ns>ns.epp-drs.com</ns>
  <ns>ns2.epp-drs.com</ns>
  <createDate>2008-09-01 16:09</createDate>
  <expireDate>2010-08-31 23:59</expireDate>
  <locked>0</locked>
  <registryStatus>ok</registryStatus>
  <flag>clientTransferProhibited</flag>
  <flag>clientHold</flag>
  <authCode>s2EReWu%m</authCode>
  <extraFields>
    <X-IT-CONSENTFORPUBLISHING>0</X-IT-CONSENTFORPUBLISHING>
    <X-IT-ENTITY-TYPE>1</X-IT-ENTITY-TYPE>
  </extraFields>
  <transactionId>01ec0f2c-b6df-4c08-862c-7cafb6887aee</transactionId>
</getDomainInfoResponse>

listDomains

List domains from database by several criteries

Changelog

Request parameters

Name Type Version Description
query string 2009-06-22 Search over domain name
createDate date 2009-06-22 Exact create date
createDateRange array[date, date] 2009-06-22 Create date between
expireDate date 2009-06-22 Exact expire date
expireDateRange array[date, date] 2009-06-22 Expire date between
contact string 2009-06-22 Any contact clid assigned to domain
userId int 2009-06-22 User ID (Only in Admin mode)
Data slide
start int 2009-06-22 Data slice start. Default 0
limit int 2009-06-22 Date slice size. Default 25. -1 Unlimited

Sample request

https://epp-drs.com/api.php?action=listDomains
&version=20090622
&keyId=kRFRw0vnj88%3D
&query=.it
&expireDateRange%5B0%5D=2009-07-07
&expireDateRange%5B1%5D=2010-12-31
&signature=FGonVT%2Bcf6pRAQ36QDriB7nDXzc%3D

Sample response

<?xml version="1.0"?>
<listDomainsResponse>
  <total>1</total>
  <domainList>
    <domain>
      <name>kolizey.it</name>
      <contacts>
        <registrant>C55215128</registrant>
        <admin>C81338287</admin>
      </contacts>
      <ns>ns.epp-drs.com</ns>
      <ns>ns2.epp-drs.com</ns>
      <createDate>2008-09-01 16:09</createDate>
      <expireDate>2010-08-31 23:59</expireDate>
      <locked>0</locked>
      <localStatus>Delegated</localStatus>
    </domain>
  </domainList>
  <transactionId>211163df-dae9-4833-b157-80840544008f</transactionId>
</listDomainsResponse>

importDomains

Import domains into EPP-DRS database. Similar to AdminCP → Tools → Import existing domains

Changelog

Request parameters

Name Type Version Description
names array[string] 2009-06-22 Domain names. If TLD is not provided default is used.
defaultTld string 2009-06-22 Default TLD
userId int 2009-06-22 User ID to whom apply these domains (Available for admin)

Sample request

https://epp-drs.com/api.php?action=importDomains
&version=20090622
&keyId=kRFRw0vnj88%3D
&names%5B0%5D=b.info
&names%5B1%5D=non-existed-domain.gr
&names%5B2%5D=aaa.unknown
&names%5B3%5D=groovy
&defaultTld=gr
&userId=1
&signature=JCDErHaBzdeVHAvCrF965JGcGsY%3D

Sample response

<?xml version="1.0"?>
<importDomainsResponse>
  <importResult>
    <name>b.info</name>
    <success>0</success>
    <error>Cannot connect to registry server</error>
  </importResult>
  <importResult>
    <name>non-existed-domain.gr</name>
    <success>0</success>
    <error>Registry error: The object you are trying to use does not exist</error>
  </importResult>
  <importResult>
    <name>aaa.unknown</name>
    <success>0</success>
    <error>No modules configured to handle extension 'unknown'</error>
  </importResult>
  <importResult>
    <name>groovy.gr</name>
    <success>1</success>
  </importResult>
  <transactionId>30079767-ea29-46db-a4bf-971cb0e52c63</transactionId>
</importDomainsResponse>

listContacts

List contacts from database by several criteries

Changelog

Request parameters

Name Type Version Description
query string 2009-06-22 Search over contact fields and clid
userId int 2009-06-22 User ID (Available for admin)
Data slice
start int 2009-06-22 Data slice start. Default 0
limit int 2009-06-22 Date slice size. Default 25. -1 Unlimited

Sample request

https://epp-drs.com/api.php?action=listContacts
&version=20090622
&keyId=kRFRw0vnj88%3D
&query=C000
&limit=-1
&signature=v8x1nc%2FtND%2FHf3UgV9nd8Wi0lk4%3D

Sample response

<?xml version="1.0"?>
<listContactsResponse>
  <contactList>
    <contact>
      <clid>C000000042262-KZ</clid>
      <name>Marat Komarov</name>
      <email>marat@webta.net</email>
    </contact>
    <contact>
      <clid>C000-443042426</clid>
      <name>Kazimir Malevich</name>
      <email>kazi@painter.com</email>
    </contact>
  </contactList>
  <total>35</total>
  <transactionId>456b7dc4-aa34-4f28-8e13-361eb1205a7a</transactionId>
</listContactsResponse>

getContactInfo

Get contact information from registry/local database

Changelog

Request parameters

Name Type Version Description
clid string 2011-10-14 Contact CLID
mode string 2011-10-14 Request mode. 'registry' - request registry server, 'local' - EPP-DRS database

Sample request

https://epp-drs.com/api.php?action=getContactInfo
&version=20111014
&keyId=kRFRw0vnj88%3D
&clid=MT-22352477
&mode=registry
&signature=c0TKS6lSiWmwOzLtvXBmabTfID8%3D

Sample response

<?xml version="1.0"?>
<getContactInfoResponse>
  <clid>MT-22352477</clid>
  <name>Egor Pistolet</name>
  <email>me@egor.pistolet.me</email>
  <fields>
    <name>Egor Pistolet</name>
    <org>Kristal smiles</org>
    <street1>ul. Marshala Zhukova 11</street1>
    <street2></street2>
    <cc>KZ</cc>
    <pc>55434</pc>
    <sp>Almaty</sp>
    <city>Almaty</city>
    <email>me@egor.pistolet.me</email>
    <voice>+7634453434</voice>
    <fax></fax>
  </fields>
  <transactionId>01ec0f2c-b6df-4c08-862c-7cafb6887aee</transactionId>
</getContactInfoResponse>

updateContact

Update contact information in registry database

Changelog

Request parameters

Name Type Version Description
clid string 2011-10-14 Contact CLID
fields array 2011-10-14 Assoc array of fields (name ⇒ value)

Sample request

https://epp-drs.com/api.php?action=updateContact
&version=20111014
&keyId=kRFRw0vnj88%3D
&clid=MT-22352477
&fields%5Bname%5D=Egor%20Pistolet
&fields%5Bemail%5D=me@egor.pistolet.me
&fields%5Bstreet1%5D=ul.%20Krasnoarmeitsev%2065
&fields%5Borg%5D=Kristal%20smiles
&fields%5Bcc%5D=KZ
&fields%5Bpc%5D=55434
&fields%5Bsp%5D=Almaaty
&fields%5Bcity%5D=Almaaty
&signature=c0TKS6lSiWmwOzLtvXBmabTfID8%3D

Sample response

<?xml version="1.0"?>
<updateContactResponse>
  <transactionId>01ec0f2c-b6df-4c08-862c-7cafb6887aee</transactionId>
</updateContactResponse>

getBalanceInfo

Get balance rest. This action allowed only for admin

Changelog

Request parameters

Name Type Version Description
userId int 2009-06-22 User ID

Sample request

https://epp-drs.com/api.php?action=getBalanceInfo
&keyId=kRFRw0vnj88%3D
&userId=1
&signature=QeT0rFZcHeZ9zHBdO6SweQykXfw%3D

Sample response

<?xml version="1.0"?>
<getBalanceInfoResponse>
  <balance>
    <total>968.84</total>
    <currency>EUR</currency>
  </balance>
  <transactionId>d436e97f-99a7-44c5-aa9a-d208ce4afbc6</transactionId>
</getBalanceInfoResponse>

Sample API client

// Define constants
define("API_KEY_ID", "xxxxxxxxxxxxxxxx");
define("API_SECRET_KEY", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
define("API_URL", "https://my-reseller-panel.com/api.php");	
define("API_VERSION", "20100524");
 
// Build query arguments list
$params = array(
  'version' => API_VERSION,
  'keyId' => API_KEY_ID,
  'action' => 'getTldInfo',
  'tld' => 'se'
);
 
// Sorg arguments
ksort($params);
 
// Generate string for sign
$string2sign = "";
foreach ($params as $k => $v) {
  $string2sign .= "{$k}{$v}";
}
 
// Generate signature
$params['signature'] = base64_encode(hash_hmac('sha1', $string2sign, API_SECRET_KEY, 1));
 
// Build query
$query = http_build_query($params);
 
// Execute query
$c = file_get_contents(API_URL."?{$query}");
 
// Output result
print "<pre>";
print htmlspecialchars($c);
print "</pre>";
 
epp-drs.api.txt · Last modified: 2011/10/18 12:28 by marat