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 you can find in the General API Basics and the XML API Basics  and JSON API Basics.

Process overview

Flow chart


Task names, codes and routes

TaskCodeRoute
DomainCancelationCreate

0103101

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

Process

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

For more details on system notifications, see page System Notifications

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>

Receive notifications

The  DomainCancelationCreate task creates a cancelation request.
This triggers the creation of a second cancelation request, which is processed at the time defined in the cancelation (asynchronous processing).
Once this second request has been processed, a system notification is sent, indicating whether the deletion was successful or not.
The notification can be retrieved using the Polling and Push methods.

Since the second cancelation request 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".