MrDomain's API

    MrDomain SDK for PHP

    MrDomain SDK for PHP User Manual
    MrDomain

    Download from Github

    1 Introduction

    This is the user manual for the MrDomain SDK for PHP.

    The MrDomain SDK for PHP allows you to create custom applications using MrDomain's API in an easy way under PHP5. Includes support for all the available actions on the MrDomain's API and is updated in a regular basis to implement all the latest changes.

    1.1 Getting started

    The MrDomain SDK for PHP allows you to use the MrDomain's API in your application. In order to access the API, you need an active API account.

    Check the MrDomain's API documentation for more information on API accounts and requesting access.

    1.2 Limits

    Please, before using the MrDomain SDK for PHP or the MrDomain's API, read the Usage Policy.

    2  Installation

    There are two methods available to install the SDK onto your application.

    2.1 Composer

    Composer is the easiest and fastest way to install the SDK. Edit (or create) a composer.json file and add the SDK to the require section:

    {
        "require": {
            "dondominio/api-sdk-php": "@stable"
        }
    }

    Then, execute composer install or composer update to download and install the library.

    2.2 Manual installation

    You can also download the source code in a ZIP file from our Github repository, copy it to a folder in your project and include the DonDominioAPI.php file:

    require_once("/path/to/lib/DonDominioAPI.php");

    3 Usage

    You can use the SDK in two differente ways.

    3.1 Basic usage

    Recommended method The DonDominio class provides wrappers for all MrDomain's API actions, without the need for you to add additional code.

    For example, to get the account information:

    require_once("/path/to/lib/DonDominioAPI.php");
    
    $dondominio = new DonDominioAPI( array(
        'apiuser' => '00000-XXX',
        'apipasswd' => 'XXXXXXXXXXXX'
    ));
    
    $response = $dondominio->account_info();
    
    print_r( $response->getResponseData());

    3.2 Advanced usage

    You can also perform manual API calls using the DonDominio class. This methos requires you to process requests and responses manually. Using this method you will get a JSON string response.

    For example, the previous example would be written as follows:

    require_once("/path/to/lib/DonDominioAPI.php");
    
    $dondominio = new DonDominioAPI( array(
        'apiuser' => '00000-XXX',
        'apipasswd' => 'XXXXXXXXXXXX'
    ));
    
    $data = $dondominio->call( 'account/info/', array());
    
    $response = json_decode( $data, true );
    
    print_r( $response['responseData'] );

    The result of these two snippets should be the same.

    The advanced method is not covered by this user manual. To use it, you need to call the API using the same URIs as defined on the API Documentation. Input parameters should get passed in the second argument of the call method and have the same name as defined in the documentation. You can then decode the response using json_decode or other methods that suit your needs.

    3.3 Testing the SDK

    The SDK includes a method, info, to test the settings and check for missing requirements (cURL or JSON libraries for PHP). A file called config-check.php is included in the default SDK package from Github. Edit this file with your API username and password and open it from your web browser or command line interface to check for requirements and valid settings.

    4 Module: Tool

    The Tool module provides general purpose tools.

    All methods in this module are prefixed with tool_.


    4.1 tool_hello()

    Checks if the API is working correctly and is reachable.

    Request:

    $response = $dondominio->tool_hello();

    Request parameters:

    Parameter Type Required Default Description
    None        

    Response fields description:

    Field Type Description
    ip string IP address being used to access the API
    lang string Language being used by the API
    version string Current API version

    4.2 tool_idnConverter()

    Converts a domain name from Unicode to Punycode ( IDNA format) , and vice-versa..

    Request:

    $response = $dondominio->tool_idnConverter( 'example.com' );

    Request parameters:

    Parameter Type Required Default Description
    query string Yes Domain name to convert

    Response fields description:

    Field Type Description
    query string Original query
    unicode string Domain name in Unicode
    punycode string Domain name in Punycode

    4.3 tool_domainSuggests()

    version >= 1.3
    Suggests available domains based on a provided word or text.

    Request:

    $response = $dondominio->tool_domainSuggests( array(
        'query' => 'example',
        'language' => 'en,es,fr,de,pt',
        'tlds' => 'com,net,tv,cc'
    ));

    Request parameters:

    Parameter Type Required Default Description
    query string Yes Text to search
    language string No es Languages for suggestions. One or many (comma-separated) from: es, en, zh, fr, de, kr, pt, tr
    tlds string No com,net,tv,es TLDs to use to generate suggestions. One or many (comma-separated) from: com,net,tv,cc,es,org,info,biz,eu

    Response fields description:

    Field Type Description
    suggests Array Domain suggestions
    suggests/word Array Domain suggestions for word
    suggests/word/tld boolean Whether word.tld is available or not

    4.4 tool_getTable()

    Retrieves information from a code table used in the API.

    Request:

    $response = $dondominio->tool_getTable( 'countries' );

    Request parameters:

    Parameter Type Required Default Description
    tableType string Yes   Name of the table to obtain
    countries: List of country codes
    es_juridic: List of type of organizations used by Spanish government.

    Response fields description:

    Field Type Description
    items array Array containing table information

    Más información
    See the corresponding section in the API documentation for more information.


    4.5 tool_csrDecode

    Decodes information from a CSR.

    Request:

    $response = $dondominio->tool_csrDecode( '-----BEGIN CERTIFICATE REQUEST-----\nMIIC7zCCAdcCAQAwgakxGzAZBgNVBAMMEmV4YW1wbGUuZG9tYWluLmNvbTEbMBkG\nA1UECgwSVGVjaCBTb2x1dGlvbnMgSW5jMRowGAYDVQQLDBFHb3RoYW0gRGVwYXJ0\nbWVudDELMAkGA1UEBhMCVVMxEDAOBgNVBAgMB0FyaXpvbmExETAPBgNVBAcMCEJh\ncGNodWxlMR8wHQYJKoZIhvcNAQkBFhBpbmZvQGV4YW1wbGUuY29tMIIBIjANBgkq\nhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6HWtKvCB\/v\/bE5mD9ZpQuuI1Hbx9FsvJ\nO4mFUj+1kzH4bJTIWEKt3qiwpy+HirqonHvgriXyZyq52uhJANrXh13c2qJrd5zQ\ndL2Cvi301+C7QH5grA2RfMxNAfLRDEOYI+uw5xxMM8YNZexJeQlAmq6bFPZUUqEO\nw4JzT4kw1HK6umxV8ycOyOh50gYckzdzlrOHDrdCJ3+H31CFCRjEe3KVTcvpG6Nf\nI5czXLIUYWmHw7i9e0uQIbBMiDkMRVQ9RvS5rjPK+kHPLHblapAJPs2xm5Ow+FSg\n805uDqmjZ1sz7u1aw9cPkNGDmHXTyStJu440byRnZtto7dIFF8pKcQIDAQABoAAw\nDQYJKoZIhvcNAQEFBQADggEBAHVPoIXS0vtwt8QoQ7iAoa9T+Ypn7hEErbw1amLT\nrYy5GtzIN6fesTZcCv\/1OuOXTQFXQYGMtVVjUCsF50qLdaHRV8jTl7f0b9raP+Fv\nb7d0VLtQx3o3LeSR4IS\/C7VpxXqm6lSOSs2R6W5eZ0ot+4K+8wxJZmaY4trCe2dY\nOVrEcQbLIWc1lTl71wrbIIzyfiGz9xAK+\/Sqf8uv8wtylcTvL1pgBUVJ7XcFzSsl\nBBGXsjseGF9+\/uIZH0mEgO8GN0UC+deNc71KZTwhpuFwo\/hXF7sJtGVt5szX8HBD\nJ724\/s79fnNYwqowoKBXm1bIMZS2D0IEX\/M7nX2\/u1EQE0k=\n-----END CERTIFICATE REQUEST-----');

    Request parameters:

    Parameter Type Required Default Description
    csrData string Yes CSR Data (including -----BEGIN----- and -----END-----)

    Response fields description:

    Field Type Description
    csrData string CSR Data provided
    commonName string Common name
    organizationName string Organization name
    organizationalUnitName string Organization unit name
    countryName string Country code
    stateOrProvinceName string State or province
    localityName string Locality
    emailAddress string Email address

    4.6 tool_dig()

    Checks the status of DNS Servers for a domain.

    Request:

    $response = $dondominio->tool_dig( array(
        'query' => 'example.com',
        'type' => 'SOA',
        'nameserver' => '8.8.8.8'
    ));

    Request parameters:

    Parameter Type Required Default Description
    query string Yes Domain name to check
    type string Yes Query type to perform. One of: A, AAAA, ANY, CNAME, MX, NS, SOA, TXT, SPF, or CAA.
    nameserver string Yes IPv4 address of the DNS server to use to perform the check

    Response fields description:

    Field Type Description
    domain string Domain name
    query string Query
    nameserver string DNS server
    type string Query type
    result string Query result in plain text

    4.7 tool_zonecheck()

    Checks whether a domain zone passes the required settings for a TLD.

    Request:

    $response = $dondominio->tool_zonecheck(
        'example.com',
        array(
            'nameservers' => '8.8.8.8,8.8.4.4'
        )
    );

    Request parameters:

    Parameter Type Required Default Description
    domain string Yes   Domain name
    nameservers string Yes   Comma-separated list of DNS Servers to be used (min. 2)

    Response fields description:

    Field Type Description
    domain string Domain name
    nameservers string DNS Server used
    result string Results information
    result/zonepass boolean true if required conditions are met
    result/report string Plain-text result of the query

    5 Module: Account

    The Account module allows you to retrieve information about your the user account currently associated to your API username.

    All methods in this module are prefixed with account_.


    5.1 account_info()

    Gets general information from the user account.

    Request:

    $response = $dondominio->account_info();

    Request parameters:

    Parameter Type Required Default Description
    None    

    Response fields description:

    Field Type Description
    clientName string Customer name
    apiuser string API Username
    balance float Balance into account
    threshold float Balance threshold to be notified
    currency string Currency used for balance
    ip string IP Address used to connect to the API

    5.2 account_zones()

    Gets the available TLDs list and the prices associated to them.

    Request:

    $response = $dondominio->account_zones( array(
        'pageLength' => 100,
        'page' => 1,
        'tld' => 'com',
        'tldtop' => 'es'
    ));

    Request parameters:

    Parameter Type Required Default Description
    pageLength integer No 100 Items per page
    page integer No 1 Number of page to get
    tld string No Filter by TLD (full or part)
    tldtop string No Filter by Top TLD (full or part)

    Response fields description:

    Field Type Description
    queryInfo array Array containing request data
    queryInfo/page integer Current page
    queryInfo/pageLength integer Items per page
    queryInfo/results integer Items obtained
    queryInfo/total integer Total items available
    zones array Array containing all TLDs available
    zones/tld string TLD name
    zones/tldtop string Top TLD name
    zones/authcodereq boolean Indicates if TLD requires authcode for transfers
    zones/requirements string If exists, indicates special requisites for this TLD
    zones/create array Register details. If not exists, TLD does not allow register.
    zones/create/price float Register price
    zones/create/years string Periods, in years, that allow registration
    zones/renew array Renewal details. If not exists, TLD does not allow renewal.
    zones/renew/price float Renewal price
    zones/renew/years string Periods, in years, that allow renewal
    zones/transfer array Transfer details. If not exists, TLD does not allow transfers.
    zones/transfer/price float Transfer price
    zones/transfer/years string Periods, in years, that allow transfer

    6 Module: Domain

    The Domain module allows you to list and manage domains in your MrDomain account.

    All methods in this module are prefixed with domain_.


    6.1 domain_check()

    Checks whether a domain can be registered.

    Request:

    $response = $dondominio->domain_check( 'example.com' );

    Request parameters:

    Parameter Type Required Default Description
    domain string Yes Domain name to check

    Response fields description:

    Field Type Description
    name string Domain name in Unicode
    punycode string Domain name in Punycode
    tld string Domain TLD
    available boolean If true the domain is available to register
    premium boolean If true the domain is premium
    price float Register price
    currency string Currency of price

    6.2 domain_checkForTransfer()

    Checks whether a domain can be transferred.

    Request:

    $response = $dondominio->domain_checkForTransfer( 'example.com' );

    Request parameters:

    Parameter Type Required Default Description
    domain string Yes   Domain name to check

    Response fields description:

    Field Type Description
    name string Domain name in Unicode
    punycode string Domain name in Punycode
    tld string Domain TLD
    transferavail boolean If true the domain is available to transfer
    transfermsg string Additional messages if can't be transferred
    price float Price
    currency string Currency of price

    6.3 domain_create()

    Registers a new domain in MrDomain.

    Request:

    $response = $dondominio->domain_create(
        'example.com',
        array(
            'period' => 1,
            'premium' => false,
            'nameservers' => '8.8.8.8,8.8.4.4',
            'ownerContactID' => 'XXX-00000'
        )
    );

    Request parameters:

    Parameter Type Required Default Description
    domain string Yes Domain name
    period integer No Minimum of years (depending on TLD; usually 1) Number of years of the registration
    premium boolean No false Must be true to register premium domains
    nameservers string No parking DNS Servers list
    If parking, parking and redirection service will be enabled.
    If not, a comma-separated list of DNS servers (min. 2, max. 7):
    ns1.dns.com,ns2.dns.com
    ownerContact[Data] N/A *Yes Owner contact data (See next table)
    adminContact[Data] N/A No Admin contact data. If not specified, will use owner contact data
    techContact[Data] N/A No Tech contact data. If not specified, will use admin contact data
    billingContact[Data] N/A No Billing contact data. If not specified, will use admin contact data

    Response fields description:

    Field Type Description
    billing array Cost information
    billing/total float Total cost of the operation
    billing/currency string Currency used for costs
    domains array Data of registered domain
    domains/name string Domain name
    domains/status string Domain status
    domains/tld string Domain TLD
    domains/tsExpir string Expiration date of the domain
    domains/domainID string Domain ID
    domains/period integer Registration period

    6.3.1 Defining domain contacts

    The information for ownerContact[Data], techContact[Data], techContact[Data] and/or billingContact[Data] may be provided in two different ways:

    (1) Using the Contact ID: (example for owner)

    Request parameters:

    Parameter Type Required Default Description
    ownerContactID string Yes Contact ID on MrDomain account. For example: XXX-23423

    (2) Using all the information fields: (example for owner)

    In this case don't provide a ownerContactID or all these fields will be ignored.

    Request parameters:

    Parameter Type Required Default Description
    ownerContactType string Yes Contact type: individual or organization
    ownerContactFirstName string Yes First name
    ownerContactLastName string Yes Last name
    ownerContactOrgName string Yes
    if ownerContactType = organization
    Organization name
    ownerContactOrgType string Yes
    if ownerContactType = organization
    and ownerCountry = ES
    Spanish organization code (see tables)
    ownerContactIdentNumber string Yes ID Number, VAT Number, passport...
    ownerContactEmail string Yes Email
    ownerContactPhone string Yes Phone number in +DD.DDDDDDDD format
    ownerContactFax string Yes Fax number in +DD.DDDDDDDDD format
    ownerContactAddress string Yes Address
    ownerContactPostalCode string Yes Postal code
    ownerContactCity string Yes City
    ownerContactState string Yes State/Province
    ownerContactCountry string Yes Country code (see tables)

    Other contacts may be specified changing owner by the appropriate prefix: admin, tech, and billing.


    6.4 domain_transfer()

    Transfer a domain from other registrar to MrDomain.

    Request:

    $response = $dondominio->domain_transfer(
        'example.com',
        array(
            'nameservers' => '8.8.8.8,8.8.4.4',
            'authcode' => 'aaaaaaaaaa',
            'ownerContactID' => 'XXX-00000'
        )
    );

    Request parameters:

    Parameter Type Required Default Description
    domain string Yes Domain name
    authcode string No Authcode (EPP Code), if needed
    nameservers string No parking DNS Servers
    If parking, parking and redirection service will be activated
    If keepns, domain will retain current Nameservers
    If not, specify a comma-separated list of nameservers (Min. 2, Max. 7)
    ns1.dns.com,ns2.dns.com
    ownerContact[Data] N/A Yes Owner contact data
    adminContact[Data] N/A No Administrative contact data. If missing, owner contact data will be used instead.
    techContact[Data] N/A No Technical contact data. If missing, administrative contact data will be used instead.
    billingContact[Data] N/A No Billing contact data. If missing, administrative contact data will be used instead.

    Response fields description:

    Field Type Description
    billing array Billing information
    billing/total float Total cost of the operation
    billing/currency string Currency used for the operation
    domains array Transferred domain information
    domains/name string Domain name
    domains/status string Domain status
    domains/tld string Domain TLD
    domains/tsExpir string Domain expiration date
    domains/domainID string Domain ID

    6.5 domain_transferRestart()

    Restart the domain transfer process.

    Request:

    $response = $dondominio->domain_transferRestart(
        'example.com',
        array(
            'authcode' => 'XXXXX'
        )
    );

    Request parameters:

    Parameter Type Required Default Description
    domain string Yes Domain name or Domain ID
    authcode string No New authcode

    Response fields description:

    Field Type Description
    name string Domain name
    status string Domain status
    tld string Domain TLD
    tsExpir string Expiration date
    domainID string Domain ID

    6.6 domain_update()

    Update domain information.

    Request:

    $response = $dondominio->domain_update(
        'example.com',
        array(
            'updateType' => 'contact',
            'ownerContactID' => 'XXX-00000'
        )
    );

    Request parameters:

    Parameter Type Required Default Description
    domain string Yes Domain name or Domain ID
    updateType string Yes Type of information to update
    contact: Update contacts
    nameservers: Update Nameservers
    transferBlock: Enable/disable transfer block
    block: Enable/Disable modification block
    whoisPrivacy: Enable/Disable whois privacy service
    renewalMode: Type of renewal for the domain
    updateType = contact      
    ownerContact[Data] N/A No Owner contact data
    adminContact[Data] N/A No Administrative contact data
    techContact[Data] N/A No Technical contact data
    billingContact[Data] N/A No Billing contact data
    updateType = nameservers        
    nameservers string Yes List of DNS Servers
    If default, MrDomain DNS Servers will be used.
    If not, provide a comma-separated list of DNS Servers (min. 2, max. 7)
    ns1.dns.com,ns2.dns.com
    updateType = transferBlock        
    transferBlock boolean Yes false New transfer block status
    updateType = block        
    block boolean Yes false New modification block status
    updateType = whoisPrivacy        
    whoisPrivacy boolean Yes false New whois privacy service status
    updateType = renewalMode      
    renewalMode string Yes Type of renewal (check table)
    updateType = tag
    tag array Yes Tags for the domain

    Response fields description:

    Field Type Description
    name string Domain name
    status string Domain status
    tld string Domain TLD
    tsExpir string Expiration date
    domainID string Domain ID

    6.7 domain_updateNameServers()

    Update DNS servers for a domain. Equivalent to domain_update() with updateType = nameservers.

    Request:

    $response = $dondominio->domain_updateNameServers(
        'example.com',
        array('8.8.8.8', '8.8.4.4')
    );

    Request parameters:

    Parameter Type Required Default Description
    domain string Yes Domain name or Domain ID
    nameservers string Yes List of DNS Servers
    If default, MrDomain DNS Servers will be used.
    If not, provide a comma-separated list of DNS Servers (min. 2, max. 7)
    ns1.dns.com,ns2.dns.com

    Response fields description:

    Field Type Description
    name string Domain name
    status string Domain status
    tld string Domain TLD
    tsExpir string Expiration date
    domainID string Domain ID

    6.8 domain_updateContacts()

    Update contacts for a domain. Equivalent to domain_update() with updateType = contacts.

    Request:

    $response = $dondominio->domain_updateContacts(
        'example.com',
        array(
            'ownerContactID' => 'XXX-00000'
        )
    );

    Request parameters:

    Parameter Type Required Default Description
    domain string Yes Domain name or Domain ID
    ownerContact[Data] N/A No Owner contact data
    adminContact[Data] N/A No Administrative contact data
    techContact[Data] N/A No Technical contact data
    billingContact[Data] N/A No Billing contact data

    Response fields description:

    Field Type Description
    name string Domain name
    status string Domain status
    tld string Domain TLD
    tsExpir string Expiration date
    domainID string Domain ID

    6.9 domain_glueRecordCreate()

    Creates a DNS record associated with a domain (Gluerecord).

    Request:

    $response = $dondominio->domain_glueRecordCreate(
        'example.com',
        array(
            'name' => 'test.example.com',
            'ipv4' => '212.20.40.200',
            'ipv6' => '2e02:2670:3:0:21a:4aff:fe24:c49f'
        )
    );

    Request parameters:

    Parameter Type Required Default Description
    domain string Yes   Domain name or Domain ID
    name string Yes Name of the gluerecord
    ipv4 string Yes   IPv4 of the DNS/gluerecord server
    ipv6 string No   IPv6 of the DNS/gluerecord server

    Response fields description:

    Field Type Description
    name string Domain name
    status string Domain status
    tld string Domain TLD
    tsExpir string Domain expiration date
    domainID string Domain ID
    gluerecords array Information about DNS servers/gluerecords
    gluerecords/name string Name of the DNS server/gluerecord
    gluerecords/ipv4 string IPv4 address of the DNS server/gluerecord
    gluerecords/ipv6 string IPv4 address of the DNS server/gluerecord

    6.10 domain_glueRecordUpdate()

    Updates the information of a DNS record associated with a domain (Gluerecord).

    Request:

    $response = $dondominio->domain_glueRecordUpdate(
        'example.com',
        array(
            'name' => 'test.example.com',
            'ipv4' => '212.20.40.200',
            'ipv6' => '2e02:2670:3:0:21a:4aff:fe24:c49f'
        )
    );

    Request parameters:

    Parameter Type Required Default Description
    domain string Yes   Domain name or Domain ID
    name string Yes Name of the gluerecord to be updated
    ipv4 string Yes   IPv4 of the DNS/gluerecord server
    ipv6 string No   IPv6 of the DNS/gluerecord server

    Response fields description:

    Field Type Description
    name string Domain name
    status string Domain status
    tld string Domain TLD
    tsExpir string Domain expiration date
    domainID string Domain ID
    gluerecords array Information about DNS servers/gluerecords
    gluerecords/name string Name of the DNS server/gluerecord
    gluerecords/ipv4 string IPv4 address of the DNS server/gluerecord
    gluerecords/ipv6 string IPv4 address of the DNS server/gluerecord

    6.11 domain_glueRecordDelete()

    Deletes a DNS record associated with a domain (Gluerecord).

    Request:

    $response = $dondominio->domain_glueRecordDelete(
        'example.com',
        array(
            'name' => 'test.example.com'
        )
    );

    Request parameters:

    Parameter Type Required Default Description
    domain string Yes   Domain name or Domain ID
    name string Yes Name of the gluerecord to be deleted

    Response fields description:

    Field Type Description
    name string Domain name
    status string Domain status
    tld string Domain TLD
    tsExpir string Domain expiration date
    domainID string Domain ID
    gluerecords array Information about DNS servers/gluerecords
    gluerecords/name string Name of the DNS server/gluerecord
    gluerecords/ipv4 string IPv4 address of the DNS server/gluerecord
    gluerecords/ipv6 string IPv4 address of the DNS server/gluerecord

    6.12 domain_getInfo()

    Retrieves the information of a domain registered in the MrDomain account.

    Request:

    $response = $dondominio->domain_getInfo(
        'example.com',
        array(
            'infoType' => 'status'
        )
    );

    Request parameters:

    Parameter Type Required Default Description
    domain string Yes Domain name or Domain ID
    infoType string Yes   Type of information to retrieve
    status: Domain general information
    contact: Domain contacts (whois)
    nameservers: DNS Servers
    authcode: Authcode (EPP Code)
    service: Information about hosting and services related to the domain
    gluerecords: Domain gluerecords

    Response fields description:

    Field Type Description
    name string Domain name
    status string Domain status
    tld string Domain TLD
    tsExpir string Domain expiration date
    domainID string Domain unique identifier (Domain ID)
    infoType = status  
    tsCreate string Creation date
    renewable boolean Indicates whether the domain can be renewed
    modifyBlock boolean Indicates whether the domain has modifications blocked
    transferBlock boolean Indicates whether the domain has transfers blocked
    whoisPrivacy boolean Indicates whether the domain has whois privacy enabled
    authcodeCheck boolean Indicates whether the authcode can be retrieved with infoType = authcode
    serviceAssociated boolean Indicates whether the domain has associated services
    tag string Domain tag
    infoType = contact  
    contactOwner N/A Owner contact data. See Contact data.
    contactAdmin N/A Admin contact data. See Contact data.
    contactTech N/A Tech contact data. See Contact data.
    contactBilling N/A Billing contact data. See Contact data.
    infoType = nameservers    
    nameservers N/A DNS Servers. See [DNS Servers][DNS Servers].
    infoType = authcode    
    authcode string Authcode (EPP code)
    infoType = service    
    service array Arrays containing services information
    service/type string Service type
    service/status string Service status
    service/tsExpir string Expiration date
    infoType = gluerecords    
    gluerecords array Arrays containing gluerecords information
    gluerecords/name string Gluerecord name
    gluerecords/ipv4 string IPv4 address of the NS/Gluerecord server
    gluerecords/ipv6 string IPv6 address of the NS/Gluerecord server

    6.13 domain_getGlueRecords()

    Retrieves the NS Servers (Gluerecords) for a domain. Equivalent to domain_getInfo() with infoType = gluerecords.

    Request:

    $response = $dondominio->domain_getGlueRecords( 'example.com' );

    Request parameters:

    Parameter Type Required Default Description
    domain string Yes Domain name or Domain ID

    Response fields description:

    Field Type Description
    name string Domain name
    status string Domain status
    tld string Domain TLD
    tsExpir string Domain expiration date
    domainID string Domain unique identifier (Domain ID)
    gluerecords array Multiple arrays containing the gluerecords information (one array per gluerecord)
    gluerecords/name string Gluerecord name
    gluerecords/ipv4 string IPv4 address of the NS/Gluerecord server
    gluerecords/ipv6 string IPv6 address of the NS/Gluerecord server

    6.14 domain_renew()

    Renews an existing domain in the MrDomain account.

    Request:

    $response = $dondominio->domain_renew(
        'example.com',
        array(
            'curExpDate' => '2015-01-01',
            'period' => 1
        )
    );

    Request parameters:

    Parameter Type Required Default Description
    domain string Yes Domain name or Domain ID
    curExpDate string Yes Current expiration date
    period integer Yes Period to be renewed

    Response fields description:

    Field Type Description
    billing array Billing information
    billing/total float Total cost of the operation
    billing/currency string Currency used for the operation
    domains array Renewed domain information
    domains/name string Domain name
    domains/status string Domain status
    domains/tld string Domain TLD
    domains/tsExpir string Domain expiration date
    domains/renewPeriod integer Period renewed

    6.15 domain_whois()

    Retrieves the information from the public whois for a domain.

    Request:

    $response = $dondominio->domain_whois( 'example.com' );

    Request parameters:

    Parameter Type Required Default Description
    domain string Yes Domain name or Domain ID

    Response fields description:

    Field Type Description
    domain string Domain name
    whoisData string Response with whois data for the domain

    6.16 Contact data

    All calls that return domain contact information do so with the following fields:

    Response fields description:

    Field Type Description
    contactID string Contact ID
    contactType string Contact type
    individual: Individual
    organization: Organization or company
    firstName string Contact first name
    lastName string Contact last name
    orgName string Name of the organization or company
    orgType string If country = ES, organization type
    identNumber string NIF, CIF, VAT Number, Passport or other kind of personal identification number
    email string Email address
    phone string Phone number (in +DD.DDDDDDD format)
    fax string Fax number (in +DD.DDDDDDD format)
    address string Postal address
    postalCode string Postal code
    city string City
    state string State or province
    country string Country code
    verificationstatus string Contact information verification status
    daaccepted boolean Whether the Designated Agent (DA) has been accepted or not
    esNicHandle string NIC Handle for .ES domains

    6.17 Nameserver information

    All calls that return nameservers information do so in the following format:

    Response fields description:

    Field Type Description
    order integer Order number of the nameserver
    name string Server name
    ipv4 string IPv4 address of the server

    7 Module: Contact

    The Contact module allows you to retrieve information about domain contacts stored in your MrDomain account.

    All methods in this module are prefixed with contact_.


    7.1 contact_getList()

    Performs a domain contact listing or search under your MrDomain account.

    Request:

    $response = $dondominio->contact_getList();

    Request parameters:

    Parameter Type Required Default Description
    pageLength integer No 1000 Items per page
    page integer No 1 Number of page to get
    name string No   String to search in name or organization
    email string No   Filter by email
    country string No   Filter by country code
    identNumber string No   Filter by ID number
    verificationstatus string No Filter by contact information verification status. One of: verified, notapplicable, inprocess, or failed
    daaccepted boolean No Filter by Designated Agent (DA) acceptation status

    Response fields description:

    Field Type Description
    queryInfo array Array containing request data
    queryInfo/page integer Current page
    queryInfo/pageLength integer Items per page
    queryInfo/results integer Items obtained
    queryInfo/total integer Total items available
    contacts array Contact data obtained
    contacts/contactID string Contact unique ID
    contacts/contactType string Contact type
    individual: Individual
    organization: Organization or Company
    contacts/contactName string Contact name
    contacts/email string Email
    contacts/country string Country

    7.2 contact_getInfo()

    Gets information from a contact stored in the MrDomain account.

    Request:

    $response = $dondominio->contact_getInfo( 'XXX-00000' );

    Request parameters:

    Parameter Type Required Default Description
    contactID string Yes   Contact ID
    infoType string No data Type of information to get
    data: Contact data

    Response fields description:

    Field Type Description
    infoType = data    
    contacto N/A Contact data. See Contact data.

    8 Module: Service

    version >= 1.3
    The Service module allows to retrieve information from services associated to the MrDomain's account and perform diverse actions on them. It also allows to purchase new services and associate them with the user account.

    All methos in this module are prefixed with service_.


    8.1 service_list()

    Peforms a listing/search of services in the account.

    Request:

    $response = $dondominio->service_list( array(
        'pageLength' => 1000,
        'page' => 1,
        'name' => 'example.com',
        'word' => 'example',
        'tld' => 'com',
        'renewable' => true,
        'status' => 'active'
    ));

    Request parameters:

    Parameter Type Required Default Description
    pageLength integer No  1000 Results per page
    page integer No 1 Current page
    name string No Exact name of the service/hosting to find
    word string No Filter by text
    tld string No Filter by TLD
    renewable boolean No Filter by renewable services
    status string No Filter by status (check table)

    Response fields description:

    Field Type Description
    queryInfo Array Information about the query made
    queryInfo/page integer Current page
    queryInfo/pageLength integer Results per page
    queryInfo/results integer Number of results retrieved
    queryInfo/total integer Total number of results available
    services Array Information retrieved
    services/name string Name of the service
    services/status string Status of the service
    services/type string Type of service
    services/productKey string Product type code
    services/tsExpir string Expiration date for the service/hosting

    8.2 service_getInfo()

    Retrieves information about a service in the user account.

    Request:

    $response = $dondominio->service_getInfo( 'example.com', array(
        'infoType' => 'status'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    infoType string Yes Type of information to retrieve:
    status: General information about the service/hosting
    resources: Information about available resources on the service/hosting
    serverinfo: Information about servers and paths

    Response fields description:

    Field Type Description
    name string Name of the service/hosting
    status string Status of the service/hosting
    type string Type of service/hosting (check table)
    tsExpir string Expiration date of the service/hosting
    infoType = status
    tsCreate string Creation date of the service/hosting
    renewable boolean Whether the service/hosting can be renewed or not
    renewalMode string Type of renovation currently being used for the service (check table)
    infoType = resources  
    resources Array Information about available resources on the server
    resources/ftpusage Array Information about FTP usage
    resources/ftpusage/value integer Storage used by FTP accounts
    resources/ftpusage/max integer Maximum storage available by FTP accounts
    resources/ftpusage/unit string Unit used to measure storage (bytes)
    resources/webtraffic Array Information about webtraffic
    resources/webtraffic/value integer Web traffic
    resources/webtraffic/max integer Maximum possible web traffic
    resources/webtraffic/unit string Unit used to measure web traffic (bytes)
    resources/ftp Array Information about FTP accounts
    resources/ftp/value integer Number of FTP accounts active
    resources/ftp/max integer Maximum number of FTP accounts that can be registered
    resources/ftp/unit string N/A
    resources/ddbb Array Information about databases
    resources/ddbb/value integer Number of databases active
    resources/ddbb/max integer Maximum number of databases that can be created
     resources/ddbb/unit string N/A
    resources/ddbbusage Array Information about database storage
    resources/ddbbusage/value integer Storage being used by databases
    resources/ddbbusage/max integer Maximum storage available for databases
     resources/ddbbusage/unit string Unit used to measure database storage (bytes)
    resources/subdomain Array Information about subdomains
    resources/subdomain/value integer Number of subdomains currently active
     resources/subdomain/max integer Maximum number of subdomains that can be created
    resources/subdomain/unit string N/A
    resources/email Array Information about email accounts
    resources/email/value integer Number of active email accounts
     resources/email/max integer Maximum number of email accounts that can be created
    resources/email/unit string N/A
    resources/emailalias Array Information about email alias
    resources/emailalias/value integer Current number of active email alias
    resources/emailalias/max integer Maximum number of email alias that can be created
    resources/emailalias/unit string N/A
    infoType = serverinfo  
    serverinfo Array Information about servers
    serverinfo/ftpServer string Name of the FTP server
    serverinfo/ftpAbsolutePath string Path of the FTP home
    serverinfo/ftpWebServer string URL to access the Web FTP service
    serverinfo/smtpServer string Name of the SMTP server for outgoing email
    serverinfo/pop3server string Name of the POP3 email server 
    serverinfo/imapserver string Name of the IMAP email server
    serverinfo/webmail string URL to access the Web Mail service
    serverinfo/ddbbserver string Name of the database server
     serverinfo/PHPMyAdmin string URL to access the PHPMyAdmin management interface

    8.3 service_create()

    Creates a new service associated to the user account.

    Request:

    $response = $dondominio->service_create( array(
        'serviceName' => 'example.com',
        'productKey' => 'advanced',
        'period' => 1
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    productKey string Yes Product code (check table)
    period integer  No 1 Duration of the service, in years  

    Response fields description:

    Field Type Description
    billing Array Billing information
    billing/total float Cost of the operation
    billing/currency string Currency used
     services Array Information about the service purchased
    services/name string Name of the service
    services/status string Status of the service (check table)
    services/type string Type of service
    services/productKey string Product code (check table)
    services/tsExpir string Service expiration date

    8.4 service_renew()

    Renews a service to extend its duration.

    Request:

    $response = $dondominio->service_renew( 'example.com', array(
        'period' => 1
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    period integer No 1 Period to extend the service, in years

    Response fields description:

    Field Type Description
    billing Array Billing information
    billing/total float Cost of the operation
    billing/currency string Currency used
     services Array Information about the service purchased
    services/name string Name of the service
    services/status string Status of the service (check table)
    services/type string Type of service
    services/productKey string Product code (check table)
    services/tsExpir string Service expiration date

    8.5 service_upgrade()

    Upgrade the service to a higher plan.

    Request:

    $response = $dondominio->service_upgrade( 'example.com', array(
        'productKey' => 'advanced'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    productKey string Yes New product code (check table)

    Response fields description:

    Field Type Description
    billing Array Billing information
    billing/total float Cost of the operation
    billing/currency string Currency used
     services Array Information about the service purchased
    services/name string Name of the service
    services/status string Status of the service (check table)
    services/type string Type of service
    services/productKey string Product code (check table)
    services/tsExpir string Service expiration date

    8.6 service_update()

    Updates global settings for a service.

    Request:

    $response = $dondominio->service_update( 'example.com', array(
        'updateType' => 'renewalMode',
        'renewalMode' => 'autorenew'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    updateType string Yes Type of information to update:
    renewalMode: Type of renewal
    updateType = renewalMode
    renewalMode string Yes Renewal type (check table)

    Response fields description:

    Field Type Description
    name string Name of the service
    status string Status of the service (check table)
    type string Type of service
    productKey string Product code (check table)
    tsExpir string Service expiration date

    8.7 service_parkingGetInfo()

    Retrieves information about the parking service.

    Request:

    $response = $dondominio->service_parkingGetInfo( 'example.com' );

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service

    Response fields description:

    Field Type Description
    parking Array Information about the item
    parking/enabled boolean Whether the parking service is enabled or not

    8.8 service_parkingUpdate()

    Updates settings and parameters of the parking service.

    Request:

    $response = $dondominio->service_parkingUpdate( 'example.com', array(
        'enabled' => true
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    enabled boolean Yes Enable or disable the parking service

    Response fields description:

    Field Type Description
    parking Array Information about the item
    parking/enabled boolean Whether the parking service is enabled or not

    8.9 service_webconstructorLogin()

    Retrieves the URL to log in the WebConstructor service for a subdomain.

    Request:

    $response = $dondominio->service_webconstructorLogin( 'example.com', array(
        'subdomain' => 'web.example.com',
        'loginlang' => 'en'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    subdomain string Yes Subdomain where the website will be published to
    loginlang string No en Default language for the WebConstructor; user may change it later

    Response fields description:

    Field Type Description
    webconstructor Array Information about the item Información sobre el servicio de WebConstrucor
    webconstructor/loginURL string URL to access the WebConstructor service

    8.10 service_ftpList()

    Perform a listing/search of FTP accounts in a service.

    Request:

    $response = $dondominio->service_ftpList( 'example.com', array(
        'pageLength' => 1000,
        'page' => 1,
        'filter' => 'text'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    pageLength integer No  1000 Results per page
    page integer No 1 Current page
    filter string No Filter results by text

    Response fields description:

    Field Type Description
    queryInfo Array Information about the query made
    queryInfo/page integer Current page
    queryInfo/pageLength integer Results per page
    queryInfo/results integer Number of results retrieved
    queryInfo/total integer Total number of results available
    ftp/entityID string Item unique identifier
    ftp/name string Name of the FTP account
    ftp/ftpPath  string Path of the FTP home
     ftp/password string  Password of the FTP account
    ftp/quota integer  Quota assigned to the FTP account, in bytes

    8.11 service_ftpGetInfo()

    Retrieves information about an existing FTP account.

    Request:

    $response = $dondominio->service_ftpGetInfo( 'example.com', 'SRV0000214277-000396074' );

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier

    Response fields description:

    Field Type Description
    ftp Array Information about the item
    ftp/entityID string Item unique identifier
    ftp/name string Name of the FTP account
    ftp/ftpPath string Path to the FTP home
    ftp/password string Password of the FTP account
    ftp/quota integer Quota assigned to the FTP account, in bytes

    8.12 service_ftpCreate()

    Creates a new FTP account.

    Request:

    $response = $dondominio->service_ftpCreate( 'example.com', array(
        'name' => 'example',
        'ftpPath' => '/',
        'password' => 'xxxxxx',
        'quota' => 1048576
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    name string Yes Name of the FTP account
    ftpPath string Yes Path of the FTP home
    password string Yes Password of the FTP account
    quota integer Yes Quota assigned to the FTP account, in bytes (minimum 1048576 bytes / 1 MByte)

    Response fields description:

    Field Type Description
    ftp Array Information about the item
    ftp/entityID string Item unique identifier
    ftp/name string Name of the FTP account
    ftp/ftpPath  string Path of the FTP home
     ftp/password string  Password of the FTP account
    ftp/quota integer  Quota assigned to the FTP account, in bytes

    8.13 service_ftpUpdate()

    Updates the settings and parameters from an existing FTP account.

    Request:

    $response = $dondominio->service_ftpUpdate( 'example.com', 'SRV0000214277-000396074', array(
        'ftpPath' => '/',
        'password' => 'xxxxxx',
        'quota' => 1048576
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier
    ftpPath string Yes Path of the FTP home
    password string Yes Password of the FTP account
    quota integer Yes Quota assigned to the FTP account, in bytes (minimum 1048576 bytes / 1 MByte)

    Response fields description:

    Field Type Description
    ftp Array Information about the item
    ftp/entityID string Item unique identifier
    ftp/name string Name of the FTP account
    ftp/ftpPath  string Path of the FTP home
     ftp/password string  Password of the FTP account
    ftp/quota integer  Quota assigned to the FTP account, in bytes

    8.14 service_ftpDelete()

    Deletes an FTP account.

    Request:

    $response = $dondominio->service_ftpDelete( 'example.com', 'SRV0000214277-000396074' );

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier

    This call does not return any information.


    8.15 service_databaseList()

    Performs a listing/search of databases in a service.

    Request:

    $response = $dondominio->service_databaseList( 'example.com', array(
        'pageLength' => 1000,
        'page' => 1,
        'filter' => 'text'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    pageLength integer No  1000 Results per page
    page integer No 1 Current page
    filter string No Filter results by text

    Response fields description:

    Field Type Description
    queryInfo Array Information about the query made
    queryInfo/page integer Current page
    queryInfo/pageLength integer Results per page
    queryInfo/results integer Number of results retrieved
    queryInfo/total integer Total number of results available
     ddbb Array Information retrieved
    ddbb/entityID string Item unique identifier
    ddbb/name string Name of the database
    ddbb/user string Username of the database
    ddbb/password string Password of the database
    ddbb/externalAccess boolean Indicates whether the database can be accessed from the outside or not

    8.16 service_databaseGetInfo()

    Retrieves information about a database.

    Request:

    $response = $dondominio->service_databaseGetInfo( 'example.com', 'SRV0000214277-000396074' );

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier

    Response fields description:

    Field Type Description
    ddbb Array Information retrieved
    ddbb/entityID string Item unique identifier
    ddbb/name string Name of the database
    ddbb/user string Name of the username
    ddbb/password string Password to access the database
    ddbb/externalAccess boolean Indicates whether the database can be accessed from the outside or not

    8.17 service_databaseCreate()

    Creates a new database.

    Request:

    $response = $dondominio->service_databaseCreate( 'example.com', array(
        'password' => 'xxxxx',
        'externalAccess' => false
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    password  string Yes   Password for the database
    externalAccess boolean No false Enable or disable external access to the database

    Response fields description:

    Field Type Description
    ddbb Array Information about the item
    ddbb/entityID string Item unique identifier
    ddbb/name string Name of the database
    ddbb/user  string Username for the database
     ddbb/password string Password to access the database
    ddbb/externalAccess boolean Indicates whether the database can be accessed from the outside or not

    8.18 service_databaseUpdate()

    Updates settings and parameters from an existing database.

    Request:

    $response = $dondominio->service_databaseUpdate( 'example.com', 'SRV0000214277-000396074', array(
        'password' => 'xxxxxx',
        'externalAccess' => false
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier
    password  string Yes   Password of the database
    externalAccess boolean No false Enable or disable external access for the database

    Response fields description:

    Field Type Description
    ddbb Array Information about the item
    ddbb/entityID string Item unique identifier
    ddbb/name string Name of the database
    ddbb/user  string Username of the database
     ddbb/password string Password of the database
    ddbb/externalAccess boolean Indicates whether the database can be accessed from the outside or not

    8.19 service_databaseDelete()

    Deletes a database.

    Request:

    $response = $dondominio->service_databaseDelete( 'example.com', 'SRV0000214277-000396074' );

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier

    This call does not return any information.


    8.20 service_subdomainList()

    Performs a listing/search of subdomains in a service.

    Request:

    $response = $dondominio->service_subdomainList( 'example.com', array(
        'pageLength' => 1000,
        'page' => 1,
        'filter' => 'text'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    pageLength integer No  1000 Results per page
    page integer No 1 Current page
    filter string No Filter results by text

    Response fields description:

    Field Type Description
    queryInfo Array Information about the query made
    queryInfo/page integer Current page
    queryInfo/pageLength integer Results per page
    queryInfo/results integer Number of results retrieved
    queryInfo/total integer Total number of results available
    subdomain Array Information about the item
    subdomain/entityID string Item unique identifier
    subdomain/name string Name of the subdomain
    subdomain/ftpPath string FTP path for the subdomain

    8.21 service_subdomainGetInfo()

    Retrieves information about an existing subdomain.

    Request:

    $response = $dondominio->service_subdomainGetInfo( 'example.com', 'SRV0000214277-000396074' );

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier

    Response fields description:

    Field Type Description
    subdomain Array Information about the item
    subdomain/entityID string Item unique identifier
    subdomain/name string Name of the subdomain
    subdomain/ftpPath string FTP path for the subdomain

    8.22 service_subdomainCreate()

    Creates a new subdomain.

    Request:

    $response = $dondominio->service_subdomainCreate( 'example.com', array(
        'name' => 'test.example.com',
        'ftpPath' => 'public-test/'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    name string Yes Name of the subdomain
    ftpPath string  Yes FTP path for the subdomain

    Response fields description:

    Field Type Description
    subdomain Array Information about the item
    subdomain/entityID string Item unique identifier
    subdomain/name string Name of the subdomain
    subdomain/ftpPath string FTP path for the subdomain

    8.23 service_subdomainUpdate()

    Updates settings and parameters from an existing subdomain.

    Request:

    $response = $dondominio->service_subdomainUpdate( 'example.com', 'SRV0000214277-000396074', array(
        'ftpPath' => 'public-test/',
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier
    ftpPath string  Yes FTP path for the subdomain

    Response fields description:

    Field Type Description
    subdomain Array Information about the item
    subdomain/entityID string Item unique identifier
    subdomain/name string Name of the subdomain
    subdomain/ftpPath string FTP path for the subdomain

    8.24 service_subdomainDelete()

    Deletes a subdomain.

    Request:

    $response = $dondominio->service_subdomainDelete( 'example.com', 'SRV0000214277-000396074' );

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier

    This call does not return any information.


    8.25 service_redirectList()

    Performs a listing/search of redirections in a service.

    Request:

    $response = $dondominio->service_redirectList( 'example.com', array(
        'pageLength' => 1000,
        'page' => 1,
        'filter' => 'text'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    pageLength integer No  1000 Results per page
    page integer No 1 Current page
    filter string No Filter results by text

    Response fields description:

    Field Type Description
    queryInfo Array Information about the query made
    queryInfo/page integer Current page
    queryInfo/pageLength integer Results per page
    queryInfo/results integer Number of results retrieved
    queryInfo/total integer Total number of results available
    redirect Array Information about the item
    redirect/entityID string Item unique identifier
    redirect/origin string Redirection origin (from) 
    redirect/destination string  Redirection destination (to)
    redirect/type string Redirection type (check table)

    8.26 service_redirectGetInfo()

    Retrieves information about an existing redirection.

    Request:

    $response = $dondominio->service_subdomainGetInfo( 'example.com', 'SRV0000214277-000396074' );

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier

    Response fields description:

    Field Type Description
    redirect Array Information about the item
    redirect/entityID string Item unique identifier
    redirect/origin string Redirection origin (from) 
    redirect/destination string  Redirection destination (to)
    redirect/type string Redirection type (check table)

    8.27 service_redirectCreate()

    Creates a new redirection.

    Request:

    $response = $dondominio->service_redirectCreate( 'example.com', array(
        'origin' => 'http://example.com/example01/',
        'destination' => 'http://example.com/example02/',
        'type' => '301'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    origin string Yes Redirection origin (from)
    destination string Yes Redirection destination (to)
    type string Yes Redirection type (check table)

    Response fields description:

    Field Type Description
    redirect Array Information about the item
    redirect/entityID string Item unique identifier
    redirect/origin string Redirection origin (from) 
    redirect/destination string  Redirection destination (to)
    redirect/type string Redirection type (check table)

    8.28 service_redirectUpdate()

    Updates settings and parameters from an existing redirection.

    Request:

    $response = $dondominio->service_redirectUpdate( 'example.com', 'SRV0000214277-000396074', array(
        'destination' => 'http://example.com/example02',
        'type' => '301'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier
    destination string Yes Redirection destination (to)
    type string Yes Redirection type (check table)

    Response fields description:

    Field Type Description
    redirect Array Information about the item
    redirect/entityID string Item unique identifier
    redirect/origin string Redirection origin (from) 
    redirect/destination string  Redirection destination (to)
    redirect/type string Redirection type (check table)

    8.29 service_redirectDelete()

    Deletes a redirection.

    Request:

    $response = $dondominio->service_redirectDelete( 'example.com', 'SRV0000214277-000396074' );

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier

    This call does not return any information.


    8.30 service_mailList()

    Performs a listing/search of email accounts in a service.

    Request:

    $response = $dondominio->service_mailList( 'example.com', array(
        'pageLength' => 1000,
        'page' => 1,
        'filter' => 'text'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    pageLength integer No  1000 Results per page
    page integer No 1 Current page
    filter string No Filter results by text

    Response fields description:

    Field Type Description
    queryInfo Array Information about the query made
    queryInfo/page integer Current page
    queryInfo/pageLength integer Results per page
    queryInfo/results integer Number of results retrieved
    queryInfo/total integer Total number of results available
    mail Array Information about the item
    mail/entityID string Item unique identifier
    mail/name string Name of the email account
    mail/password  string Password for the email account

    8.31 service_mailGetInfo()

    Retrieves information about an existing email account.

    Request:

    $response = $dondominio->service_subdomainGetInfo( 'example.com', 'SRV0000214277-000396074' );

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier

    Response fields description:

    Field Type Description
    mail Array Information about the item
    mail/entityID string Item unique identifier
    mail/name string Name of the email account
    mail/password  string Password for the email account

    8.32 service_mailCreate()

    Creates a new Email account.

    Request:

    $response = $dondominio->service_redirectCreate( 'example.com', array(
        'name' => 'john.doe@example.com',
        'password' => 'xxxxxx'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    name string Yes Name of the email account
    password string Yes Password for the email account

    Response fields description:

    Field Type Description
    mail Array Information about the item
    mail/entityID string Item unique identifier
    mail/name string Name of the email account
    mail/password  string Password for the email account

    8.33 service_mailUpdate()

    Updates settings and parameters from an existing email account.

    Request:

    $response = $dondominio->service_mailUpdate( 'example.com', 'SRV0000214277-000396074', array(
        'password' => 'xxxxxx'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier
    password string Yes Password for the email account

    Response fields description:

    Field Type Description
    mail Array Information about the item
    mail/entityID string Item unique identifier
    mail/name string Name of the email account
    mail/password  string Password for the email account

    8.34 service_mailDelete()

    Deletes an existing email account.

    Request:

    $response = $dondominio->service_mailDelete( 'example.com', 'SRV0000214277-000396074' );

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier

    This call does not return any information.


    8.35 service_mailaliasList()

    Performs a listing/search of email alias in a service.

    Request:

    $response = $dondominio->service_mailaliasList( 'example.com', array(
        'pageLength' => 1000,
        'page' => 1,
        'filter' => 'text'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    pageLength integer No  1000 Results per page
    page integer No 1 Current page
    filter string No Filter results by text

    Response fields description:

    Field Type Description
    queryInfo Array Information about the query made
    queryInfo/page integer Current page
    queryInfo/pageLength integer Results per page
    queryInfo/results integer Number of results retrieved
    queryInfo/total integer Total number of results available
    mailalias Array Information about the item
    mailalias/entityID string Item unique identifier
    mailalias/name string Name of the email alias
    mailalias/target string Destination email account

    8.36 service_mailaliasGetInfo()

    Retrieves information about an email alias.

    Request:

    $response = $dondominio->service_mailaliasGetInfo( 'example.com', 'SRV0000214277-000396074' );

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier

    Response fields description:

    Field Type Description
    mailalias Array Information about the item
    mailalias/entityID string Item unique identifier
    mailalias/name string Name of the email alias
    mailalias/target string Destination email account

    8.37 service_mailaliasCreate()

    Creates a new email alias

    Request:

    $response = $dondominio->service_mailaliasCreate( 'example.com', array(
        'name' => 'jane.doe@example.com',
        'target' => 'john.doe@example.com'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    name string Yes Name of the email alias
    target string Yes Destination email account

    Response fields description:

    Field Type Description
    mailalias Array Information about the item
    mailalias/entityID string Item unique identifier
    mailalias/name string Name of the email alias
    mailalias/target string Destination email account

    8.38 service_mailaliasUpdate()

    Updates settings and parameters from an existing email account.

    Request:

    $response = $dondominio->service_mailaliasUpdate( 'example.com', 'SRV0000214277-000396074', array(
        'target' => 'jane.doe@example.com'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier
    target string Yes Destination email account

    Response fields description:

    Field Type Description
    mailalias Array Information about the item
    mailalias/entityID string Item unique identifier
    mailalias/name string Name of the email alias
    mailalias/target string Destination email account

    8.39 service_mailaliasDelete()

    Deletes an existing email alias.

    Request:

    $response = $dondominio->service_mailDelete( 'example.com', 'SRV0000214277-000396074' );

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier

    This call does not return any information.


    8.40 service_dnsList()

    Perform a list/search of DNS zones in a service.

    Request:

    $response = $dondominio->service_dnsList( 'example.com', array(
        'pageLength' => 1000,
        'page' => 1,
        'filter' => 'text'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    pageLength integer No  1000 Results per page
    page integer No 1 Current page
    filter string No Filter results by text

    Response fields description:

    Field Type Description
    queryInfo Array Information about the query made
    queryInfo/page integer Current page
    queryInfo/pageLength integer Results per page
    queryInfo/results integer Number of results retrieved
    queryInfo/total integer Total number of results available
     dns Array Information retrieved
    dns/entityID string Item unique identifier
     dns/name  string Name of the DNS zone
    dns/type string Type of the DNS zone (check table)
    dns/ttl string Time To Live ("-" = Default)
    dns/priority string Priority of the DNS zone ("-" = Default)
    dns/value string Value of the DNS zone depending on its type

    8.41 service_dnsGetInfo()

    Retrieves information from a DNS zone.

    Request:

    $response = $dondominio->service_mailaliasGetInfo( 'example.com', 'SRV0000214277-000396074' );

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier

    Response fields description:

    Field Type Description
    dns Array Information about the item
    dns/entityID string Item unique identifier
    dns/name string Name of the DNS zone
    dns/type  string Type of the DNS zone (check table)
    dns/ttl string Time To Live ("-" = Default)
    dns/priority string Priority of the zone ("-" = Default)
    dns/value string Value of the DNS zone depending on its type

    8.42 service_dnsCreate()

    Creates a new DNS zone.

    Request:

    $response = $dondominio->service_dnsCreate( 'example.com', array(
        'name' => 'example.com',
        'type' => 'A',
        'value' => '0.0.0.0'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    name string Yes Name of the DNS zone
    type string Yes Type of the DNS zone (check table)
    value string Yes Value of the DNS zone depending on its type
    ttl integer No Time To Live
    priority integer No 10 for MX and SRV types Priority of the DNS zone

    Response fields description:

    Field Type Description
    dns Array Information about the item
    dns/entityID string Item unique identifier
    dns/name string Name of the DNS zone
    dns/type  string  Type of the DNS zone (check table)
    dns/ttl string  Time to Live ("-" = Default)
    dns/priority string  Priority of the DNS zone ("-" = Default)
    dns/value string Value of the DNS zone depending on its type

    8.43 service_dnsUpdate()

    Updates settings and parameters of an existing DNS zone.

    Request:

    $response = $dondominio->service_dnsUpdate( 'example.com', 'SRV0000214277-000396074', array(
        'value' => '0.0.0.0'
    ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier
    value string Yes Value of the DNS zone depending on its type
    ttl integer No Time To Live
    priority integer No 10 for MX and SRV types Priority of the DNS zone

    Response fields description:

    Field Type Description
    dns Array Information about the item
    dns/entityID string Item unique identifier
    dns/name string Name of the DNS zone
    dns/type  string  Type of the DNS zone (check table)
    dns/ttl string  Time to Live ("-" = Default)
    dns/priority string  Priority of the DNS zone ("-" = Default)
    dns/value string Value of the DNS zone depending on its type

    8.44 service_dnsDelete()

    Deletes a DNS zone.

    Request:

    $response = $dondominio->service_dnsDelete( 'example.com', 'SRV0000214277-000396074' );

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    entityID string Yes Item unique identifier

    This call does not return any information.


    8.45 service_dnsRestore()

    Restore all DNS zones to default values for a service. Destroys all previous DNS zones.

    Request:

    $response = $dondominio->service_dnsRestore( 'example.com' );

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service

    This call does not return any information.


    8.46 service_dnsSetZone()

    Set multiple DNS zones for a service with a single call. Destroys all previous DNS zones in the service.

    Request:

    $response = $dondominio->service_dnsSetZone( 'example.com', array( ... ));

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service
    dnsZoneData Array Yes Array with the DNS zones (check table)

    Format for dnsZoneData (Multi-dimensional Array, one item for each zone)

    Parámetro  Tipo Descripción
    name string Name of the DNS zone
    type string Type of the DNS zone (check table)
    ttl string Time To Live ("-" = Default)
    priority string Priority of the DNS zone ("-" = Default)
    value string  Value of the DNS zone depending on its type

    Example for dnsZoneData

    $dnsZoneData = array(
        array(
            'name' => 'example.com',
            'type' => 'A',
            'ttl' => '-',
            'priority' => '-',
            'value' => '0.0.0.0'
        ),
    
        array(
            'name' => '*.example.com',
            'type' => 'CNAME',
            'ttl' => '-',
            'priority' => '-',
            'value' => 'srv1.example1.com'
        )
    );

    This call does not return any information.


    8.47 service_dnsDeleteAll()

    Deletes all DNS zones in a service.

    Request:

    $response = $dondominio->service_dnsDeleteAll( 'example.com' );

    Request parameters:

    Parameter Type Required Default Description
    serviceName string Yes Name of the service

    This call does not return any information.


    8.48 Tables

    Tables with values indicated in fields with "(check table)" are available on the MrDomain API documentation.