Suche in diesem Bereich

Skip to end of metadata
Go to start of metadata


Table of Contents

Funktion

The task ContactCreate creates a new contact.

Description

If you need a contact with the same name several times for administrative reasons, this must be indicated in the request.
In XML you have to insert the key <key>force_handle_create></key> below <task>.
When using JSON, append the route like this: /contact?keys[]=force_handle_create in order to force the contact handle to be created.

Route: POST /contact

Request
{
   "alias": "johndoe",
   "type": "PERSON",
   "organization": "Company",
   "title": "Dr.",
   "city": "example city",
   "country": "DE",
   "state": "BY",
   "email": "johndoe@example.com",
   "fname": "john",
   "lname": "doe",
   "address": [
      "123 example street"
   ],
   "pcode": "12345",
   "phone": "+1-123-12345",
   "fax": "+1-123-12345"
}
Response
{
    "stid": "20190628-app3-dev-11529",
    "status": {
        "code": "S0301",
        "text": "Domain contact was created successfully.",
        "type": "SUCCESS"
    },
    "object": {
        "type": "Contact",
        "value": "23151437"
    },
    "data": [
        {
            "created": "2019-06-28T14:52:48.000+0200",
            "updated": "2019-06-28T14:52:48.000+0200",
            "id": 23151437,
            "owner": {
                "context": 4,
                "user": "customer"
            },
            "updater": {
                "context": 4,
                "user": "customer"
            },
            "alias": "johndoe",
            "type": "PERSON",
            "organization": "Company",
            "title": "Dr.",
            "city": "example city",
            "country": "US",
            "state": "",
            "email": "johndoe@example.com",
            "protection": "SHOW_NONE",
            "fname": "john",
            "lname": "doe",
            "address": [
                "example street"
            ],
            "pcode": "12345",
            "phone": "+49-123-12345",
            "fax": "+49-123-12345"
        }
    ]
}

Task code: 0301
Uses Contact object

Request
<request>
    <auth>
        <user>customer</user>
        <password>password</password>
        <context>4</context>
    </auth>
    <task>
        <code>0301</code>
        <handle>
            <alias></alias>
            <type>PERSON</type>
            <fname>john</fname>
            <lname>doe</lname>
            <organization>PDA</organization>
            <address>example stret</address>
            <pcode>12345</pcode>
            <city>example city</city>
            <state></state>
            <country>US</country>
            <phone>+1-12345-12345</phone>
            <fax>+1-12345-12345</fax>
            <email>johndoe@example.com</email>
            <protection>B</protection>
            <nic_ref>us</nic_ref>
            <extension>
                <idnumber>T22000129</idnumber>
            </extension>
        </handle>
        <reply_to>customer@example.com</reply_to>
    </task>
</request>
Response
<response>
	<result>
		<status>
			<code>N0301</code>
			<text>Domain contact request has been started successfully.</text>
			<text></text>
			<type>notify</type>
			<object>
				<type>handle</type>
				<value>9926612</value>
			</object>
		</status>
	</result>
</response>

Possible Error Messages

  • EF03010 Invalid phone number.
  • EF03011 Invalid fax number.
  • EF030110 ID or alias of the domain contact have to be entered.
  • EF03012 Comments are too long.
  • EF03013 Internal error - NIC member ID of the root user could not be inquired.
  • EF03014 Internal error - Invalid domain contact.
  • EF03015 Maximum number of characters has been exceeded.
  • EF03016 User is not authorized for this domain contact.
  • EF03017 Invalid first name.
  • EF03018 Invalid last name.
  • EF03019 Invalid organization.