Search in this section

Skip to end of metadata
Go to start of metadata

Instructions for the complete automation of the deletion of a domain.

Table of Contents

Basics of the JSON and XML API

All important information for the use of the JSON and XML API can be found under the following links:

Process Overview

Flow Chart


Tasks Names, Codes and Routes

TaskCodeRoute
DomainCancelationCreate

0103101

POST /domain/ {name} / cancelation
PollInfo0905GET /poll
PollConfirm0906PUT /poll/$id

Process

Deleting domains is an asynchronous process because the registry is involved in the processing of the request. The request notifications are made available in the system upon receipt and can be retrieved by polling.

For more details on asynchronous notifications, see :

Starting a Domain Cancelation Create Request

To delete a domain create a cancelation request (DomainCancelationCreate) with the cancelation type DELETE.
There are three options for the time of deletion (execution type):

  • EXPIRE: Deletion at expiration date oof the domain
  • NOW: immediate deletion
  • DATE: Deletion on the specified date
    For XML, the date is set in the execdate (=execution date) tag. Format : yyyy-MM-dd or yyyy-MM-dd hh:mm:ss Example : 2019-06-18 16:33:24
    For JSON, it is specified as the value of the registryWhen field. Format : yyyy-MM-dd'T'HH:mm:ssSSSZ Example : 2019-06-18T16:33:24.000+02

Example: Deleting a domain at the expiration date - execution type EXPIRE

Request
POST /domain/{name}/cancelation
{
  "execution": "EXPIRE",
  "type": "DELETE"
}
Response
{
    "stid": "20180927-stid",
    "messages": [
        {
            "text": "The task will be executed at domain expiration.",
            "messageCode": "MSG010315",
            "status": "NOTICE"
        }
    ],
    "status": {
        "code": "S0103101",
        "text": "Domain cancelation has been created successfully.",
        "type": "SUCCESS"
    },
    "object": {
        "type": "domain",
        "value": "example.com"
    },
    "data": [
        {
            "created": "2018-09-27T15:10:30.000+0200",
            "updated": "2018-09-27T15:10:30.000+0200",
            "owner": {
                "user": "USER",
                "context": CONTEXT
            },
            "updater": {
                "user": "USER",
                "context": CONTEXT
            },
            "domain": "example.com",
            "type": "DELETE",
            "execution": "EXPIRE",
            "registryWhen": "2019-06-18T16:33:24.000+0200",
            "logId": 213218
        }
    ]
}
Request
<request>
  <auth>
    <user>USER</user>
    <password>PASSWORD</password>
    <context>CONTEXT</context>
  </auth>
  <task>
    <code>0103101</code>
    <cancelation>
      <execdate>EXPIRE</execdate>
      <type>delete</type>
      <domain>example.com</domain>
    </cancelation>
  </task>
</request>
Response
<response>
  <result>
    <data>
      <cancelation>
        <execdate>expire</execdate>
        <changed>2018-09-27 16:00:49</changed>
        <domain>example.com</domain>
        <type>DELETE</type>
        <registry_when_date>2019-06-18 16:37:39</registry_when_date>
        <log_id>213221</log_id>
        <created>2018-09-27 16:00:49</created>
      </cancelation>
    </data>
    <msg>
      <text>The task will be executed at domain expiration.</text>
      <code>MSG010315</code>
      <type>notice</type>
    </msg>
    <status>
      <code>S0103101</code>
      <text>Domain cancelation has been created successfully.</text>
      <type>success</type>
      <object>
        <type>domain</type>
        <value>example.com</value>
      </object>
    </status>
  </result>
  <ctid />
 <stid>20180927-stid</stid>
</response>

Example: Deleting a domain immediately - cancelation type NOW

Request
POST /domain/{name}/cancelation
{
  "execution": "NOW",
  "type": "DELETE"
}
Response
{
    "stid": "20180927-stid",
    "status": {
        "code": "S0103101",
        "text": "Domain cancelation has been created successfully.",
        "type": "SUCCESS"
    },
    "object": {
        "type": "domain",
        "value": "example.com"
    },
    "data": [
        {
            "created": "2018-09-27T15:08:29.000+0200",
            "updated": "2018-09-27T15:08:29.000+0200",
            "owner": {
                "user": "USER",
                "context": CONTEXT
            },
            "updater": {
                "user": "USER",
                "context": 4
            },
            "domain": "example.com",
            "type": "DELETE",
            "execution": "NOW",
            "registryWhen": "2018-09-27T15:08:28.000+0200",
            "logId": 213217
        }
    ]
}
Request
<request>
  <auth>
    <user>USER</user>
    <password>PASSWORD</password>
    <context>CONTEXT</context>
  </auth>
  <task>
    <code>0103101</code>
    <cancelation>
      <execdate>NOW</execdate>
      <type>delete</type>
      <domain>example.com</domain>
    </cancelation>
  </task>
</request>
Response
<response>
  <result>
    <data>
      <cancelation>
        <execdate>now</execdate>
        <changed>2018-09-27 15:58:58</changed>
        <domain>example.com</domain>
        <type>DELETE</type>
        <registry_when_date>2018-09-27 15:58:58</registry_when_date>
        <log_id>213220</log_id>
        <created>2018-09-27 15:58:58</created>
      </cancelation>
    </data>
    <status>
      <code>S0103101</code>
      <text>Domain cancelation has been created successfully.</text>
      <type>success</type>
      <object>
        <type>domain</type>
        <value>example.com</value>
      </object>
    </status>
  </result>
  <ctid />
 <stid>20180927-stid</stid>
</response>

Example: Deleting a domain at a specific date - execution type DATE

Request
POST /domain/{name}/cancelation
{
  "execution": "DATE",
  "type": "DELETE",
  "registryWhen": "2018-09-27T08:31:38.126Z"
}
Response
{
    "stid": "20180927-app2-dev-12144",
    "messages": [
        {
            "text": "The task will be executed at the given date.",
            "messageCode": "MSG010316",
            "status": "NOTICE"
        }
    ],
    "status": {
        "code": "S0103101",
        "text": "Domain cancelation has been created successfully.",
        "type": "SUCCESS"
    },
    "object": {
        "type": "domain",
        "value": "example.com"
    },
    "data": [
        {
            "created": "2018-09-27T12:08:52.000+0200",
            "updated": "2018-09-27T12:08:52.000+0200",
            "owner": {
                "user": "USER",
                "context": CONTEXT
            },
            "updater": {
                "user": "USER",
                "context": CONTEXT
            },
            "domain": "example.com",
            "type": "DELETE",
            "execution": "DATE",
            "registryWhen": "2018-10-27T10:31:38.126+0200",
            "logId": 213211
        }
    ]
}
Request
<request>
  <auth>
    <user>USER</user>
    <password>PASSWORD</password>
    <context>CONTEXT</context>
  </auth>
  <task>
    <code>0103101</code>
    <cancelation>
      <execdate>2018-09-28 12:00:00</execdate>
      <type>delete</type>
      <domain>example.com</domain>
    </cancelation>
  </task>
</request>
Response
<response>
  <result>
    <data>
      <cancelation>
        <execdate>2018-09-28 12:00:00</execdate>
        <changed>2018-09-27 10:49:48</changed>
        <domain>example.com</domain>
        <type>DELETE</type>
        <registry_when_date>2018-09-28 12:00:00</registry_when_date>
        <log_id>213207</log_id>
        <created>2018-09-27 10:49:48</created>
      </cancelation>
    </data>
    <msg>
      <text>The task will be executed at the given date.</text>
      <code>MSG010316</code>
      <type>notice</type>
    </msg>
    <status>
      <code>S0103101</code>
      <text>Domain cancelation has been created successfully.</text>
      <type>success</type>
      <object>
        <type>domain</type>
        <value>example.com</value>
      </object>
    </status>
  </result>
  <ctid />
 <stid>20180927-stid</stid>
</response>

Checking and confirming Notifications

The order type DomainCancelationCreate creates a cancelation request. This triggers the creation of a second cancelation request, which is processed asynchronously at the time defined in the cancelation.
Once this second requst has been processed, a request notification is sent, indicating whether the deletion was successful or not.
You must call the notification with the PollInfo task.  You must confirm the retrieval with the PollConfirm task.

Since the asynchronous order does not exist at the time the notice is created, the system can not inform you of the JobID in advance.  To determine whether this is the request for the desired deletion, check whether these keywords contain the values specified here in the system response sent later:

  • data / job / action = delete
  • data / job / type = domain
  • data / object / name

These three lines indicate that it is the action "Delete", the object type that was deleted is a domain, and the name of the domain here is "example.com".

PollInfo - Examples

Request
GET /poll
Response
{
    "stid": "20180926-stid",
    "status": {
        "code": "S0905",
        "text": "The notification was polled successfully.",
        "type": "SUCCESS"
    },
    "object": {
        "type": "message",
        "value": "1819917"
    },
    "data": [
        {
            "summary": 1,
            "message": {
                "id": 1819917,
                "job": {
                    "id": 4295609745,
                    "domain": {
                        "created": "2018-09-26T15:11:21.000+0200",
                        "owner": {},
                        "updater": {},
                        "name": "example.com",
                        "expire": "2019-09-26T15:11:20.000+0200",
                        "payable": "2019-09-26T15:11:21.000+0200",
                        "ownerc": {
                            "id": 100
                        },
                        "adminc": {
                            "id": 100
                        },
                        "techc": {
                            "id": 100
                        },
                        "registryStatus": "LOCK",
                        "nameServers": [
                            {
                                "name": "a.ns14.net"
                            },
                            {
                                "name": "b.ns14.net"
                            },
                            {
                                "name": "c.ns14.net"
                            },
                            {
                                "name": "d.ns14.net"
                            }
                        ],
                        "lastAction": "CREATE",
                        "authinfo": "gg9o3FFL/hzNbuPw",
                        "autoRenewStatus": "TRUE",
                        "registrarStatus": "ACTIVE",
                        "rddsOptIn": "NOT_SET"
                    }
                },
                "stid": "20180926-stid",
                "object": {
                    "type": "domain",
                    "value": "example.com"
                },
                "status": {
                    "code": "S0101",
                    "type": "SUCCESS"
                }
            }
        }
    ]
}
Request
<request>
    <auth>
        <user>USER</user>
        <context>CONTEXT</context>
        <password>PASSWORD</password>
    </auth>
    <task>
        <code>0905</code>
    </task>
</request>
Response
<response>
    <result>
        <data>
            <summary>1</summary>
            <message>
                <id>1855680</id>
                <owner>
                    <user>customer</user>
                    <context>4</context>
                </owner>
                <job>
                    <domain>
                        <name>example.com</name>
                        <expire>2019-10-15 14:02:40</expire>
                        <payable>2019-10-15 14:02:41</payable>
                        <ownerc>100</ownerc>
                        <adminc>100</adminc>
                        <techc>100</techc>
                        <nic_member_label>VGRS-TEST</nic_member_label>
                        <registry_status>LOCK</registry_status>
                        <nserver>
                            <name>a.ns14.net</name>
                        </nserver>
                        <nserver>
                            <name>b.ns14.net</name>
                        </nserver>
                        <nserver>
                            <name>c.ns14.net</name>
                        </nserver>
                        <nserver>
                            <name>d.ns14.net</name>
                        </nserver>
                        <period>1</period>
                        <authinfo>S0Lygv+ZkNbniICm</authinfo>
                        <autorenew>true</autorenew>
                        <confirm_order>1</confirm_order>
                        <confirm_owner_consent>0</confirm_owner_consent>
                        <registrar_status>ACTIVE</registrar_status>
                        <rdds_opt_in>NOT_SET</rdds_opt_in>
                        <owner/>
                        <updater/>
                        <created>2018-10-15 14:02:41</created>
                    </domain>
                    <job_id>4295625406</job_id>
                    <status>
                        <code>S0101</code>
                        <type>success</type>
                        <object>
                            <type>domain</type>
                            <value>example.com</value>
                        </object>
                    </status>
                    <stid>20181015-app1-3788</stid>
                </job>
                <created>2018-10-15 14:03:02</created>
            </message>
        </data>
        <status>
            <code>S0905</code>
            <text>The notification was polled successfully.</text>
            <type>success</type>
            <object>
                <type>message</type>
                <value>1855680</value>
            </object>
        </status>
    </result>
   <stid>20181015-app1-3805</stid>
</response>


PollConfirm - Examples

Request
PUT /poll/{id}
Response
{
    "stid": "20180926-stid",
    "status": {
        "code": "S0906",
        "text": "The notification was confirmed successfully.",
        "type": "SUCCESS"
    },
    "object": {
        "type": "message",
        "value": "1819853"
    }
}
Request
<request>
    <auth>
        <user>USER</user>
        <context>CONTEXT</context>
        <password>PASSWORD</password>
    </auth>
    <task>
        <code>0906</code>
       <message>
            <id>650664</id>
        </message>
    </task>
</request>
Response
<response>
    <result>
        <data>
            <summary>0</summary>
            <message>
                <id>650664</id>
            </message>
        </data>
        <status>
            <code>S0906</code>
            <text>The notification was confirmed successfully.</text>
            <type>success</type>
            <object>
                <type>message</type>
                <value>650664</value>
            </object>
        </status>
     </result>
  <stid>20181015-app1-3162</stid>
</response>