<?xml version="1.0" encoding="utf-8"?>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<rfc version="3" ipr="trust200902" docName="draft-wullink-restful-epp-json-00" submissionType="IETF" category="std" xml:lang="en" xmlns:xi="http://www.w3.org/2001/XInclude" indexInclude="true" tocDepth="4">

<front>
<title abbrev="XML to JSON for RESTful EPP">XML to JSON conversion rules for RESTful EPP</title><seriesInfo value="draft-wullink-restful-epp-json-00" stream="IETF" status="standard" name="Internet-Draft"></seriesInfo>
<author initials="M." surname="Wullink" fullname="Maarten Wullink"><organization>SIDN Labs</organization><address><postal><street></street>
</postal><email>maarten.wullink@sidn.nl</email>
<uri>https://sidn.nl/</uri>
</address></author><author initials="M." surname="Davids" fullname="Marco Davids"><organization>SIDN Labs</organization><address><postal><street></street>
</postal><email>marco.davids@sidn.nl</email>
<uri>https://sidn.nl/</uri>
</address></author><date/>
<area>Internet</area>
<workgroup>Network Working Group</workgroup>

<abstract>
<t>This document describes the rules for converting an EPP <xref target="RFC5730"></xref> XML message to a JSON <xref target="RFC8259"></xref> message for use with RESTful EPP [REF-TO-REPP-HERE].</t>
</abstract>

</front>

<middle>

<section anchor="introduction"><name>Introduction</name>
<t>The Extensible Provisioning Protocol (EPP) <xref target="RFC5730"></xref> uses an on XML based protocol. The EPP protocol is well defined, using XML Schema Definition (XSD) for validation of XML messages, the XSDs are published as part of the EPP RFCs. This document describes rules for converting valid EPP XML messages to the JavaScript Object Notation (JSON) Data Interchange Format <xref target="RFC8259"></xref>, for use with RESTful EPP (REPP).</t>
</section>

<section anchor="terminology"><name>Terminology</name>
<t>In this document the following terminology is used.</t>
<t>EPP RFCs - This is a reference to the EPP version 1.0
specifications <xref target="RFC5730"></xref>, <xref target="RFC5731"></xref>, <xref target="RFC5732"></xref> and <xref target="RFC5733"></xref>.</t>
<t>RESTful EPP or REPP - The RESTful transport for EPP described in
this document.</t>
</section>

<section anchor="conventions-used-in-this-document"><name>Conventions Used in This Document</name>
<t>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;,
&quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this
document are to be interpreted as described in <xref target="RFC2119"></xref>.</t>
<t>JSON is case sensitive. Unless stated otherwise, JSON specifications and examples provided in this document MUST be interpreted in the
character case presented. The examples in this document assume that request and response messages
are properly formatted JSON documents. Indentation and white space in examples are provided only to illustrate element relationships and for improving readability, and are not REQUIRED features of the protocol.</t>
</section>

<section anchor="conversion-rules"><name>Conversion Rules</name>
<t>A XML element may use one of 7 possible forms, the sections below describe how these forms MUST be translated to valid JSON.</t>

<ol spacing="compact">
<li>Empty</li>
<li>Pure text content</li>
<li>Attributes only</li>
<li>Pure text content and attributes</li>
<li>Child elements with different names</li>
<li>Child elements with identical names</li>
<li>Child element(s) and contiguous text</li>
</ol>

<section anchor="empty"><name>Empty</name>
<t>An empty XML element MUST be mapped to to a key matching the name of the element and a null value.</t>
<t>XML:</t>

<sourcecode type="xml"><![CDATA[<hello/>
]]>
</sourcecode>
<t>JSON:</t>

<sourcecode type="json"><![CDATA[{
    "hello": null
}
]]>
</sourcecode>
</section>

<section anchor="pure-text-content"><name>Pure text content</name>
<t>An XML element containing text only MUST be mapped to a key matching the name of the element and the text MUST be used for the value</t>
<t>XML:</t>

<sourcecode type="xml"><![CDATA[<lang>en</lang>
]]>
</sourcecode>
<t>JSON:</t>

<sourcecode type="json"><![CDATA[{
    "lang": "en"
}
]]>
</sourcecode>
</section>

<section anchor="attributes-only"><name>Attributes only</name>
<t>An XML element containing one or more atributes only, MUST be mapped to a JSON object matching the name of the element. Each XML attribute, prefixed using the <tt>@</tt> character, MUST be added as a key-value pair to the object.</t>
<t>XML:</t>

<sourcecode type="xml"><![CDATA[<msgQ count="5" id="12345"/>
]]>
</sourcecode>
<t>JSON:</t>

<sourcecode type="json"><![CDATA[{
    "msgQ": {
        "@count": "5",
        "@id": "12345"
    }
}
]]>
</sourcecode>
</section>

<section anchor="pure-text-content-and-attributes"><name>Pure text content and attributes</name>
<t>An XML element containing one or more atributes and text content only, MUST be mapped to a JSON object matching the name of the element. The text content MUST, prefixed using the string <tt>#text</tt>, MUST be added as a key-value pair to the object.</t>
<t>XML:</t>

<sourcecode type="xml"><![CDATA[<msg lang="en">Command completed successfully</msg>
]]>
</sourcecode>
<t>JSON:</t>

<sourcecode type="json"><![CDATA[{
    "msg": {
        "@lang": "en",
        "#text": "Command completed successfully"
    }
}
]]>
</sourcecode>
</section>

<section anchor="child-elements-with-different-names"><name>Child elements with different names</name>
<t>An XML element containing one or more child elements, where each child uses an unique name, MUST be mapped to a JSON object matching the name of the element. Each child element MUST be added as a key-value pair to the parent object.</t>
<t>XML:</t>

<sourcecode type="xml"><![CDATA[<trID>
    <clTRID>ABC-12345</clTRID>
    <svTRID>54321-XYZ</svTRID>
</trID>
]]>
</sourcecode>
<t>JSON:</t>

<sourcecode type="json"><![CDATA[{
    "trID": {
        "clTRID": "ABC-12345",
        "svTRID": "54321-XYZ"
    }
}
]]>
</sourcecode>
</section>

<section anchor="child-elements-with-identical-names"><name>Child elements with identical names</name>
<t>An XML element containing multiple child elements, where multiple child elements use the same name, MUST be mapped to a JSON object containing an array. The name of the array MUST match the name of the non-unique children, each child element MUST be converted to JSON and added to the array.</t>
<t>XML:</t>

<sourcecode type="xml"><![CDATA[<host>
    <addr>192.0.2.1</addr>
    <addr>192.0.2.2</addr>
</host>
]]>
</sourcecode>
<t>JSON:</t>

<sourcecode type="json"><![CDATA[{
    "host": {
        "addr": [
            "192.0.2.1",
            "192.0.2.2"
        ]
    }
}
]]>
</sourcecode>
</section>

<section anchor="child-elements-and-contiguous-text"><name>Child elements and contiguous text</name>
<t>An XML element containing one or more child elements and contiguous text, MUST be mapped to a JSON object containing a key-value entry for each child element, the text value MUST result in a key named <tt>#text</tt>.</t>
<t>XML:</t>

<sourcecode type="xml"><![CDATA[<msg lang="en">
    Credit balance low.
    <limit>100</limit>
    <bal>5</bal>
</msg>
]]>
</sourcecode>
<t>JSON:</t>

<sourcecode type="json"><![CDATA[{
    "msg": {
        "@lang": "en",
        "limit": 100,
        "bal": 5,
        "#text": "Credit balance low."
    }
}
]]>
</sourcecode>
<t>When child elements are mixed with multiple text segments, the resulting <tt>#text</tt> key-value entry MUST be an array, containing all text segments.</t>
<t>XML:</t>

<sourcecode type="xml"><![CDATA[<msg lang="en">
    Credit balance low.
    <limit>100</limit>
    <bal>5</bal>
    Please increase balance.
</msg>
]]>
</sourcecode>
<t>JSON:</t>

<sourcecode type="json"><![CDATA[{
    "msg": {
        "@lang": "en",
        "limit": 100,
        "bal": 5,
        "#text": ["Credit balance low.", "Please increase balance asap."]
    }
}
]]>
</sourcecode>
<t>The rules above are based on the conversion approach found on <xref target="XMLCOM-WEB"></xref></t>
</section>
</section>

<section anchor="examples"><name>Examples</name>
<t>This section lists examples for every EPP command supported by REPP, the examples</t>

<section anchor="hello"><name>Hello</name>
<t>The Hello request message does not exist in the context of REPP.</t>
<t>Example XML response:</t>

<sourcecode type="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp
    xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <greeting>
        <svID>Example EPP server epp.example.com</svID>
        <svDate>2000-06-08T22:00:00.0Z</svDate>
        <svcMenu>
            <version>1.0</version>
            <lang>en</lang>
            <lang>fr</lang>
            <objURI>urn:ietf:params:xml:ns:obj1</objURI>
            <objURI>urn:ietf:params:xml:ns:obj2</objURI>
            <objURI>urn:ietf:params:xml:ns:obj3</objURI>
            <svcExtension>
                <extURI>http://custom/obj1ext-1.0</extURI>
            </svcExtension>
        </svcMenu>
        <dcp>
            <access>
                <all/>
            </access>
            <statement>
                <purpose>
                    <admin/>
                    <prov/>
                </purpose>
                <recipient>
                    <ours/>
                    <public/>
                </recipient>
                <retention>
                    <stated/>
                </retention>
            </statement>
        </dcp>
    </greeting>
</epp>
]]>
</sourcecode>
<t>Example JSON response:</t>
<t>XML namespaces are not converted to JSON and are ignored.</t>

<sourcecode type="json"><![CDATA[{
    "epp": {
        "@xmlns": "urn:ietf:params:xml:ns:epp-1.0",
        "greeting": {
            "svID": "Example REPP server v1.0",
            "svDate": "2000-06-08T22:00:00.0Z",
            "svcMenu": {
                "version": "1.0",
                "lang": [
                    "en",
                    "fr"
                ]
            },
            "dcp": {
                "access": {
                    "all": null
                },
                "statement": {
                    "purpose": {
                        "admin": null,
                        "prov": null
                    },
                    "recipient": {
                        "ours": null,
                        "public": null
                    },
                    "retention": {
                        "stated": null
                    }
                }
            }
        }
    }
}
]]>
</sourcecode>
</section>

<section anchor="login"><name>Login</name>
<t>The Login request and response message are not used for REPP.</t>
</section>

<section anchor="logout"><name>Logout</name>
<t>The Logout request and response message are not used for REPP.</t>
</section>

<section anchor="check"><name>Check</name>
<t>The Check request and responses messages are not used for REPP.</t>
</section>

<section anchor="info"><name>Info</name>
<t>The Info request message is not used for REPP.</t>
<t>Example XML Domain Info response:</t>

<sourcecode type="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp
    xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <response>
        <result code="1000">
            <msg>Command completed successfully</msg>
        </result>
        <resData>
            <domain:infData
                xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
                <domain:name>example.com</domain:name>
                <domain:roid>EXAMPLE1-REP</domain:roid>
                <domain:status s="ok"/>
                <domain:registrant>jd1234</domain:registrant>
                <domain:contact type="admin">sh8013</domain:contact>
                <domain:contact type="tech">sh8013</domain:contact>
                <domain:ns>
                    <domain:hostObj>ns1.example.com</domain:hostObj>
                    <domain:hostObj>ns1.example.net</domain:hostObj>
                </domain:ns>
                <domain:host>ns1.example.com</domain:host>
                <domain:host>ns2.example.com</domain:host>
                <domain:clID>ClientX</domain:clID>
                <domain:crID>ClientY</domain:crID>
                <domain:crDate>1999-04-03T22:00:00.0Z</domain:crDate>
                <domain:upID>ClientX</domain:upID>
                <domain:upDate>1999-12-03T09:00:00.0Z</domain:upDate>
                <domain:exDate>2005-04-03T22:00:00.0Z</domain:exDate>
                <domain:trDate>2000-04-08T09:00:00.0Z</domain:trDate>
                <domain:authInfo>
                    <domain:pw>2fooBAR</domain:pw>
                </domain:authInfo>
            </domain:infData>
        </resData>
        <trID>
            <clTRID>ABC-12345</clTRID>
            <svTRID>54322-XYZ</svTRID>
        </trID>
    </response>
</epp>
]]>
</sourcecode>
<t>Example JSON Domain Info response:</t>

<sourcecode type="json"><![CDATA[{
    "epp": {
        "@xmlns": "urn:ietf:params:xml:ns:epp-1.0",
        "response": {
            "result": {
                "@code": "1000",
                "msg": "Command completed successfully"
            },
            "resData": {
                "domain:infData": {
                    "@xmlns:domain": "urn:ietf:params:xml:ns:domain-1.0",
                    "domain:name": "example.com",
                    "domain:roid": "EXAMPLE1-REP",
                    "domain:status": {
                        "@s": "ok"
                    },
                    "domain:registrant": "jd1234",
                    "domain:contact": [
                        {
                            "@type": "admin",
                            "#text": "sh8013"
                        },
                        {
                            "@type": "tech",
                            "#text": "sh8013"
                        }
                    ],
                    "domain:ns": {
                        "domain:hostObj": [
                            "ns1.example.com",
                            "ns1.example.net"
                        ]
                    },
                    "domain:host": [
                        "ns1.example.com",
                        "ns2.example.com"
                    ],
                    "domain:clID": "ClientX",
                    "domain:crID": "ClientY",
                    "domain:crDate": "1999-04-03T22:00:00.0Z",
                    "domain:upID": "ClientX",
                    "domain:upDate": "1999-12-03T09:00:00.0Z",
                    "domain:exDate": "2005-04-03T22:00:00.0Z",
                    "domain:trDate": "2000-04-08T09:00:00.0Z",
                    "domain:authInfo": {
                        "domain:pw": "2fooBAR"
                    }
                }
            },
            "trID": {
                "clTRID": "ABC-12345",
                "svTRID": "54322-XYZ"
            }
        }
    }
}
]]>
</sourcecode>
</section>

<section anchor="poll"><name>Poll</name>
<t>The Poll request message is not used for REPP.</t>
<t>Example XML response:</t>

<sourcecode type="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp
    xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <response>
        <result code="1301">
            <msg>Command completed successfully; ack to dequeue</msg>
        </result>
        <msgQ count="4" id="12346">
            <qDate>2000-06-08T22:10:00.0Z</qDate>
            <msg lang="en">Credit balance low.
                <limit>100</limit>
                <bal>5</bal>
            </msg>
        </msgQ>
        <trID>
            <clTRID>ABC-12346</clTRID>
            <svTRID>54321-XYZ</svTRID>
        </trID>
    </response>
</epp>
]]>
</sourcecode>
<t>Example JSON response:</t>

<sourcecode type="json"><![CDATA[{
    "epp": {
        "@xmlns": "urn:ietf:params:xml:ns:epp-1.0",
        "response": {
            "result": {
                "@code": "1301",
                "msg": "Command completed successfully; ack to dequeue"
            },
            "msgQ": {
                "@count": "4",
                "@id": "12346",
                "qDate": "2024-01-15T22:10:00.0Z",
                "msg": {
                    "@lang": "en",
                    "limit": "100",
                    "bal": "5",
                    "#text": "Credit balance low."
                }
            },
            "trID": {
                "clTRID": "ABC-12346",
                "svTRID": "54321-XYZ"
            }
        }
    }
}
]]>
</sourcecode>
</section>

<section anchor="poll-ack"><name>Poll Ack</name>
<t>The Poll Ack request message is not used for REPP.</t>
<t>Example XML response:</t>

<sourcecode type="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp
    xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <response>
        <result code="1000">
            <msg>Command completed successfully</msg>
        </result>
        <msgQ count="0" id="12345"/>
        <trID>
            <clTRID>ABC-12345</clTRID>
            <svTRID>XYZ-12345</svTRID>
        </trID>
    </response>
</epp>
]]>
</sourcecode>
<t>Example JSON response:</t>

<sourcecode type="json"><![CDATA[{
    "epp": {
        "@xmlns": "urn:ietf:params:xml:ns:epp-1.0",
        "response": {
            "result": {
                "@code": "1000",
                "msg": "Command completed successfully"
            },
            "msgQ": {
                "@count": "0",
                "@id": "12345"
            },
            "trID": {
                "clTRID": "ABC-12345",
                "svTRID": "XYZ-12345"
            }
        }
    }
}
]]>
</sourcecode>
</section>

<section anchor="transfer-query"><name>Transfer Query</name>
<t>The Domain Transfer Query request message is not used for REPP.</t>
<t>Example XML  Domain Transfer Query response:</t>

<sourcecode type="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp
    xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <response>
        <result code="1000">
            <msg>Command completed successfully</msg>
        </result>
        <resData>
            <domain:trnData
                xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
                <domain:name>example.com</domain:name>
                <domain:trStatus>pending</domain:trStatus>
                <domain:reID>ClientX</domain:reID>
                <domain:reDate>2000-06-06T22:00:00.0Z</domain:reDate>
                <domain:acID>ClientY</domain:acID>
                <domain:acDate>2000-06-11T22:00:00.0Z</domain:acDate>
                <domain:exDate>2002-09-08T22:00:00.0Z</domain:exDate>
            </domain:trnData>
        </resData>
        <trID>
            <clTRID>ABC-12345</clTRID>
            <svTRID>54322-XYZ</svTRID>
        </trID>
    </response>
</epp>
]]>
</sourcecode>
<t>Example JSON Domain Transfer Query response:</t>

<sourcecode type="json"><![CDATA[{
    "epp": {
        "@xmlns": "urn:ietf:params:xml:ns:epp-1.0",
        "response": {
            "result": {
                "@code": "1000",
                "msg": "Command completed successfully"
            },
            "resData": {
                "domain:trnData": {
                    "@xmlns:domain": "urn:ietf:params:xml:ns:domain-1.0",
                    "domain:name": "example.com",
                    "domain:trStatus": "pending",
                    "domain:reID": "ClientX",
                    "domain:reDate": "2000-06-06T22:00:00.0Z",
                    "domain:acID": "ClientY",
                    "domain:acDate": "2000-06-11T22:00:00.0Z",
                    "domain:exDate": "2002-09-08T22:00:00.0Z"
                }
            },
            "trID": {
                "clTRID": "ABC-12345",
                "svTRID": "54322-XYZ"
            }
        }
    }
}
]]>
</sourcecode>
</section>

<section anchor="create"><name>Create</name>
<t>Example XML Domain Create request:</t>

<sourcecode type="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp
    xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <command>
        <create>
            <domain:create
                xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
                <domain:name>example.com</domain:name>
                <domain:period unit="y">2</domain:period>
                <domain:ns>
                    <domain:hostObj>ns1.example.net</domain:hostObj>
                    <domain:hostObj>ns2.example.net</domain:hostObj>
                </domain:ns>
                <domain:registrant>jd1234</domain:registrant>
                <domain:contact type="admin">sh8013</domain:contact>
                <domain:contact type="tech">sh8013</domain:contact>
                <domain:authInfo>
                    <domain:pw>2fooBAR</domain:pw>
                </domain:authInfo>
            </domain:create>
        </create>
        <clTRID>ABC-12345</clTRID>
    </command>
</epp>
]]>
</sourcecode>
<t>Example JSON Domain Create request:</t>

<sourcecode type="json"><![CDATA[{
    "epp": {
        "@xmlns": "urn:ietf:params:xml:ns:epp-1.0",
        "command": {
            "create": {
                "domain:create": {
                    "@xmlns:domain": "urn:ietf:params:xml:ns:domain-1.0",
                    "domain:name": "example.com",
                    "domain:period": {
                        "@unit": "y",
                        "#text": "2"
                    },
                    "domain:ns": {
                        "domain:hostObj": [
                            "ns1.example.net",
                            "ns2.example.net"
                        ]
                    },
                    "domain:registrant": "jd1234",
                    "domain:contact": [
                        {
                            "@type": "admin",
                            "#text": "sh8013"
                        },
                        {
                            "@type": "tech",
                            "#text": "sh8013"
                        }
                    ],
                    "domain:authInfo": {
                        "domain:pw": "2fooBAR"
                    }
                }
            },
            "clTRID": "ABC-12345"
        }
    }
}
]]>
</sourcecode>
<t>Example XML Domain Create response:</t>

<sourcecode type="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp
    xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <response>
        <result code="1000">
            <msg>Command completed successfully</msg>
        </result>
        <resData>
            <domain:creData
                xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
                <domain:name>example.com</domain:name>
                <domain:crDate>1999-04-03T22:00:00.0Z</domain:crDate>
                <domain:exDate>2001-04-03T22:00:00.0Z</domain:exDate>
            </domain:creData>
        </resData>
        <trID>
            <clTRID>ABC-12345</clTRID>
            <svTRID>54321-XYZ</svTRID>
        </trID>
    </response>
</epp>
]]>
</sourcecode>
<t>Example JSON Domain Create response:</t>

<sourcecode type="json"><![CDATA[{
    "epp": {
        "@xmlns": "urn:ietf:params:xml:ns:epp-1.0",
        "response": {
            "result": {
                "@code": "1000",
                "msg": "Command completed successfully"
            },
            "resData": {
                "domain:creData": {
                    "@xmlns:domain": "urn:ietf:params:xml:ns:domain-1.0",
                    "domain:name": "example.com",
                    "domain:crDate": "1999-04-03T22:00:00.0Z",
                    "domain:exDate": "2001-04-03T22:00:00.0Z"
                }
            },
            "trID": {
                "clTRID": "ABC-12345",
                "svTRID": "54321-XYZ"
            }
        }
    }
}
]]>
</sourcecode>
</section>

<section anchor="delete"><name>Delete</name>
<t>The Delete request message is not used for REPP.</t>
<t>Example XML Domain Delete response:</t>

<sourcecode type="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp
    xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <response>
        <result code="1000">
            <msg>Command completed successfully</msg>
        </result>
        <trID>
            <clTRID>ABC-12345</clTRID>
            <svTRID>54321-XYZ</svTRID>
        </trID>
    </response>
</epp>
]]>
</sourcecode>
<t>Example JSON Domain Delete response:</t>

<sourcecode type="json"><![CDATA[{
    "epp": {
        "@xmlns": "urn:ietf:params:xml:ns:epp-1.0",
        "response": {
            "result": {
                "@code": "1000",
                "msg": "Command completed successfully"
            },
            "trID": {
                "clTRID": "ABC-12345",
                "svTRID": "54321-XYZ"
            }
        }
    }
}
]]>
</sourcecode>
</section>

<section anchor="renew"><name>Renew</name>
<t>The Renew request message is not used for REPP.</t>
<t>Example XML Domain Renew response:</t>

<sourcecode type="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp
    xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <response>
        <result code="1000">
            <msg>Command completed successfully</msg>
        </result>
        <resData>
            <domain:renData
                xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
                <domain:name>example.com</domain:name>
                <domain:exDate>2005-04-03T22:00:00.0Z</domain:exDate>
            </domain:renData>
        </resData>
        <trID>
            <clTRID>ABC-12345</clTRID>
            <svTRID>54322-XYZ</svTRID>
        </trID>
    </response>
</epp>
]]>
</sourcecode>
<t>Example JSON Domain Renew response:</t>

<sourcecode type="json"><![CDATA[{
    "epp": {
        "@xmlns": "urn:ietf:params:xml:ns:epp-1.0",
        "response": {
            "result": {
                "@code": "1000",
                "msg": "Command completed successfully"
            },
            "resData": {
                "domain:renData": {
                    "@xmlns:domain": "urn:ietf:params:xml:ns:domain-1.0",
                    "domain:name": "example.com",
                    "domain:exDate": "2005-04-03T22:00:00.0Z"
                }
            },
            "trID": {
                "clTRID": "ABC-12345",
                "svTRID": "54322-XYZ"
            }
        }
    }
}
]]>
</sourcecode>
</section>

<section anchor="transfer-request"><name>Transfer Request</name>
<t>The Transfer request message is not used for REPP.</t>
<t>Example XML Domain Transfer response:</t>

<sourcecode type="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp
    xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <response>
        <result code="1001">
            <msg>Command completed successfully; action pending</msg>
        </result>
        <resData>
            <domain:trnData
                xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
                <domain:name>example.com</domain:name>
                <domain:trStatus>pending</domain:trStatus>
                <domain:reID>ClientX</domain:reID>
                <domain:reDate>2000-06-08T22:00:00.0Z</domain:reDate>
                <domain:acID>ClientY</domain:acID>
                <domain:acDate>2000-06-13T22:00:00.0Z</domain:acDate>
                <domain:exDate>2002-09-08T22:00:00.0Z</domain:exDate>
            </domain:trnData>
        </resData>
        <trID>
            <clTRID>ABC-12345</clTRID>
            <svTRID>54322-XYZ</svTRID>
        </trID>
    </response>
</epp>
]]>
</sourcecode>
<t>Example JSON Domain Transfer response:</t>

<sourcecode type="json"><![CDATA[{
    "epp": {
        "@xmlns": "urn:ietf:params:xml:ns:epp-1.0",
        "response": {
            "result": {
                "@code": "1001",
                "msg": "Command completed successfully; action pending"
            },
            "resData": {
                "domain:trnData": {
                    "@xmlns:domain": "urn:ietf:params:xml:ns:domain-1.0",
                    "domain:name": "example.com",
                    "domain:trStatus": "pending",
                    "domain:reID": "ClientX",
                    "domain:reDate": "2000-06-08T22:00:00.0Z",
                    "domain:acID": "ClientY",
                    "domain:acDate": "2000-06-13T22:00:00.0Z",
                    "domain:exDate": "2002-09-08T22:00:00.0Z"
                }
            },
            "trID": {
                "clTRID": "ABC-12345",
                "svTRID": "54322-XYZ"
            }
        }
    }
}
]]>
</sourcecode>
</section>

<section anchor="transfer-cancel"><name>Transfer Cancel</name>
<t>The Transfer Cancel request message is not used for REPP.</t>
<t>Example XML Domain Cancel Transfer response:</t>

<sourcecode type="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp
    xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <response>
        <result code="1000">
            <msg>Command completed successfully</msg>
        </result>
        <trID>
            <clTRID>ABC-12345</clTRID>
            <svTRID>XYZ-12345</svTRID>
        </trID>
    </response>
</epp>
]]>
</sourcecode>
<t>Example JSON Domain Cancel Transfer response:</t>

<sourcecode type="json"><![CDATA[{
    "epp": {
        "@xmlns": "urn:ietf:params:xml:ns:epp-1.0",
        "response": {
            "result": {
                "@code": "1000",
                "msg": "Command completed successfully"
            },
            "trID": {
                "clTRID": "ABC-12345",
                "svTRID": "XYZ-12345"
            }
        }
    }
}
]]>
</sourcecode>
</section>

<section anchor="transfer-reject"><name>Transfer Reject</name>
<t>The Transfer Reject request message is not used for REPP and the response message is the same as for the Transfer Cancel command.</t>
</section>

<section anchor="transfer-approve"><name>Transfer Approve</name>
<t>The Transfer Approve request message is not used for REPP and the response message is the same as for the Transfer Cancel command.</t>
</section>

<section anchor="update"><name>Update</name>
<t>Example XML Domain Update request:</t>

<sourcecode type="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp
    xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <command>
        <update>
            <domain:update
                xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
                <domain:name>example.com</domain:name>
                <domain:chg>
                    <domain:registrant>sh8013</domain:registrant>
                    <domain:authInfo>
                        <domain:pw>2BARfoo</domain:pw>
                    </domain:authInfo>
                </domain:chg>
            </domain:update>
        </update>
        <clTRID>ABC-12345</clTRID>
    </command>
</epp>
]]>
</sourcecode>
<t>Example JSON Domain Update request:</t>

<sourcecode type="json"><![CDATA[{
    "epp": {
        "@xmlns": "urn:ietf:params:xml:ns:epp-1.0",
        "command": {
            "update": {
                "domain:update": {
                    "@xmlns:domain": "urn:ietf:params:xml:ns:domain-1.0",
                    "domain:name": "example.com",
                    "domain:chg": {
                        "domain:registrant": "sh8013",
                        "domain:authInfo": {
                            "domain:pw": "2BARfoo"
                        }
                    }
                }
            },
            "clTRID": "ABC-12345"
        }
    }
}
]]>
</sourcecode>
<t>Example XML Domain Update response:</t>

<sourcecode type="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp
    xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <response>
        <result code="1000">
            <msg>Command completed successfully</msg>
        </result>
        <trID>
            <clTRID>ABC-12345</clTRID>
            <svTRID>XYZ-12345</svTRID>
        </trID>
    </response>
</epp>
]]>
</sourcecode>
<t>Example JSON Domain Update response:</t>

<sourcecode type="json"><![CDATA[{
    "epp": {
        "@xmlns": "urn:ietf:params:xml:ns:epp-1.0",
        "response": {
            "result": {
                "@code": "1000",
                "msg": "Command completed successfully"
            },
            "trID": {
                "clTRID": "ABC-12345",
                "svTRID": "XYZ-12345"
            }
        }
    }
}
]]>
</sourcecode>
</section>
</section>

<section anchor="iana-considerations"><name>IANA Considerations</name>
<t>The new <tt>application/epp+json</tt> MIME media type is used in this document, the registration template is included in Appendix A.</t>
</section>

<section anchor="internationalization-considerations"><name>Internationalization Considerations</name>
<t>TODO</t>
</section>

<section anchor="security-considerations"><name>Security Considerations</name>
<t>TODO</t>
</section>

<section anchor="acknowledgments"><name>Acknowledgments</name>
<t>TODO</t>
</section>

</middle>

<back>
<references><name>References</name>
<references><name>Normative References</name>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5730.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5731.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5732.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5733.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8259.xml"/>
</references>
<references><name>Informative References</name>
<reference anchor="XMLCOM-WEB" target="https://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html">
  <front>
    <title>Converting Between XML and JSON</title>
    <author>
      <organization>XML.com</organization>
    </author>
    <date year="2006"></date>
  </front>
</reference>
</references>
</references>

<section anchor="appendix-a-media-type-registration-application-epp-json"><name>Appendix A.  Media Type Registration: application/epp+json</name>
<t>MIME media type name: application</t>
<t>MIME subtype name: epp+json</t>
<t>Required parameters: none</t>
<t>Optional parameters: Same as the charset parameter of application/json
   as specified in <xref target="RFC8259"></xref>.</t>
<t>Encoding considerations: Same as the encoding considerations of
   application/xml as specified in <xref target="RFC8259"></xref>.</t>
<t>Security considerations: This type has all of the security
   considerations described in <xref target="RFC8259"></xref> plus the considerations
   specified in the Security Considerations section of this document.</t>
<t>Published specification: This document.</t>
<t>Applications that use this media type: RESTful EPP client and server implementations.</t>
<t>Additional information: None</t>
<t>Magic number(s): None.</t>
<t>File extension(s): .json</t>
<t>Macintosh file type code(s): &quot;TEXT&quot;</t>
<t>Person &amp; email address for further information: See the &quot;Author's
   Address&quot; section of this document.</t>
<t>Intended usage: COMMON</t>
<t>Author/Change controller: IETF</t>
</section>

</back>

</rfc>
