Chapter 2. Contact

Table of Contents

Create
Status
Status All
Update
Activate/Deactivate

Contact management API

Handle API to create internal BDOM contact, based on data from this contact will be created

Generic reference:

/contact/OPCODE/HANDLE/USER_ID/

Where:

OPCODE(operation type) availables values:create,status,all,update
HANDLE: Your handle
USER_ID: Your specific id assigned by BDOM system

Create

Description: Create a new Contact handle.

Reference: /bdom/contact/create/-/USER_ID

Operation Type: PUT

Where:

USER_ID: Your specific id assigned by BDOM system

Validation XSD

Validator

Example 2.1. Contact validation XSD:

Source:

      
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified">

    <xs:element name="request">
        <xs:complexType>
            <xs:all>
                <xs:element name="type" type="ContactType" />
                <xs:element name="sex" type="SexType" />
                <xs:element name="first-name" type="NonEmptyString" />
                <xs:element name="last-name" type="NonEmptyString" />
                <xs:element name="middle-name" type="xs:string" minOccurs="0"/>
                <xs:element name="remarks" type="xs:string" minOccurs="0"/>
                <xs:element name="organisation" type="NonEmptyString" />
                <xs:element name="street" type="xs:string" />
                <xs:element name="number" type="xs:string" />
                <xs:element name="postcode" type="xs:string" />
                <xs:element name="city" type="xs:string" />
                <xs:element name="region" type="xs:string" minOccurs="0"/>
                <xs:element name="country" type="CountryType" />
                <xs:element name="phone" type="PhoneType" />
                <xs:element name="extension" type="xs:string" minOccurs="0"/>
                <xs:element name="fax" type="PhoneType" />
                <xs:element name="protection" type="BoolType" minOccurs="0"/>
                <xs:element name="password" type="PasswordType" minOccurs="0"/>
                <xs:element name="email" type="EmailType"/>
                <xs:element name="pin" type="xs:string" minOccurs="0"/>
                <xs:element name="birthdate" type="xs:string" minOccurs="0"/>
                <xs:element name="birthplace" type="xs:string" minOccurs="0"/>
                <xs:element name="birthpostcode" type="xs:string" minOccurs="0"/>
                <xs:element name="birthcountry" type="xs:string" minOccurs="0"/>
                <xs:element name="siret" type="xs:string" minOccurs="0"/>
                <xs:element name="xxx_membership" type="xs:string" minOccurs="0"/>
            </xs:all>
        </xs:complexType>
    </xs:element>

    <xs:simpleType name="PasswordType">
        <xs:restriction base="xs:string">
            <xs:pattern value=".{6,50}" />
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="BoolType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="YES" />
            <xs:enumeration value="NO" />
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="CountryType">
        <xs:restriction base="xs:string">
            <xs:pattern value="[A-Z]{2}" />
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="NonEmptyString">
        <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="255"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="EmailType">
        <xs:restriction base="xs:string">
            <xs:pattern value="[_A-Za-z0-9\-]+(\.[_A-Za-z0-9\-]+)*@[A-Za-z0-9\-]+(\.[A-Za-z0-9\-]+)*(\.[A-Za-z]{2,})" />
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="PhoneType">
        <xs:restriction base="xs:string">
            <xs:pattern value="\+\d+\.\d+" />
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="ContactType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="PERS" />
            <xs:enumeration value="ORG" />
            <xs:enumeration value="ROLE" />
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="SexType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="MALE" />
            <xs:enumeration value="FEMALE" />
            <xs:enumeration value="NA" />
        </xs:restriction>
    </xs:simpleType>

</xs:schema>
      
      

[Important]Important
Required Fields: type, sex, first-name, last-name, organisation, street, number, postcode, city, country, phone, fax, email
Optional Fields: middle-name, remarks, region, extension, protection, pin, birthdate, birthplace, birthpostcode, birthcountry, siret

Example 2.2. Contact Create:valid request

REQUEST:

Generic Operation: PUT(http://backend.nic-direct.de/bdom/contact/create/-/1/,xml)

Where xml:

        
<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <type>PERS</type>
  <sex>MALE</sex>
  <first-name>Otto</first-name>
  <last-name>Normalverbraucher</last-name> 
  <organisation>Acme Gmbh</organisation>
  <street>Main Strasse</street>
  <number>13</number>
  <postcode>555555</postcode>
  <city>Newe Stad</city>
  <country>DE</country>
  <phone>+040.0123456789</phone>
  <fax>+040.0123456789</fax>
  <password>secret</password>
  <email>hans@nictest.de</email>
</request>
        
        

RESPONSE:

        
<response><handle>ACMEA0003</handle><umsg>Contact created with handle: ACMEA0003</umsg></response>
        
        

Status

Description: Contact status information based on handle and user_id

Reference:/bdom/contact/status/HANDLE/USER_ID/

Operation Type: GET

Where:

HANDLE: Your handle
USER_ID: Your specific id assigned by BDOM system

Example 2.3. Contact Status: Valid request

REQUEST:

Generic Operation: GET(http://backend.nic-direct.de/bdom/contact/status/ACMEA0003/13048/)

RESPONSE:

        
<response >
  <active>1</active>
  <birthcountry></birthcountry>
  <birthplace></birthplace>
  <birthpostcode></birthpostcode>
  <city>Newe Stad</city>
  <country>Germany</country>
  <email>hans@nictest.de</email>
  <fax>+040.0123456789</fax>
  <first-name>Otto</first-name>
  <handle>ACMEA0003</handle>
  <last-name>Normalverbraucher</last-name>
  <middle-name></middle-name>
  <number>13</number>
  <object_id>1392539</object_id>
  <organisation>Acme Gmbh</organisation>
  <password>secret</password>
  <phone>+040.0123456789</phone>
  <pin></pin>
  <postcode>555555</postcode>
  <protection>NO</protection>
  <region></region>
  <remarks></remarks>
  <sex>MALE</sex>
  <siret></siret>
  <street>Main Strasse</street>
  <type>PERS</type>
  <user_id>13048</user_id>
</response>
        
        

Example 2.4. Contact Status: Invalid request - wrong handle

REQUEST:

Generic Operation: GET(http://backend.nic-direct.de/bdom/contact/status/ACMEA003/13048/)

RESPONSE:

        
<error-list>
<error>
<code>401</code>
<msg>[OBJECT_ERROR] Error Handle belongs to different user or does not
exist</msg>
</error>
</error-list>
        
        

Status All

Description: Retrieve status information for all contacts defined for user_id

Reference:/bdom/contact/all/-/USER_ID/

Operation Type: GET

Where:

HANDLE: Your handle
USER_ID: Your specific id assigned by BDOM system

Example 2.5. Contact All: Valid request

REQUEST:

Generic Operation: GET(http://backend.nic-direct.de/bdom/contact/all/-/1/)

RESPONSE:

        
<multiresponse>                                                                                                                                                                   
<response >                                                                                                                                                                       
  <first_name>Otto</first_name>                                                                                                                                                   
  <handle>NOOTA0002</handle>                                                                                                                                                      
  <last_name>Normalverbraucher</last_name>                                                                                                                                        
  <middle_name></middle_name>                                                                                                                                                     
  <organisation>Acme CO</organisation>                                                                                                                                            
</response>                                                                                                                                                                       
<response >                                                                                                                                                                       
  <first_name>Otto</first_name>                                                                                                                                                   
  <handle>ACMEA0003</handle>                                                                                                                                                      
  <last_name>Normalverbraucher</last_name>                                                                                                                                        
  <organisation>Acme Gmbh</organisation>                                                                                                                                          
</response>                                                                                                                                                                       

</multiresponse>
        
        

Example 2.6. Contact Status: Invalid request - no user

REQUEST:

Generic Operation: GET(http://backend.nic-direct.de/bdom/contact/all/-/130480/)

RESPONSE:

        
<error-list>
<error>
<code>401</code>
<msg>[OBJECT_ERROR] Error User not exists</msg>
</error>
</error-list>
        
        

Update

Description: Update a Contact handle data

Reference: /bdom/contact/update/HANDLE/USER_ID/

Operation Type: POST

Where:

HANDLE: Your handle
USER_ID: Your specific id assigned by BDOM system

Validation XSD:

Validator

Example 2.7. Contact Update validation XSD:

Source:

      
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified">

    <xs:element name="request">
        <xs:complexType>
            <xs:all>
                <xs:element name="type" type="ContactType" />
                <xs:element name="sex" type="SexType" />
                <xs:element name="first-name" type="NonEmptyString" />
                <xs:element name="last-name" type="NonEmptyString" />
                <xs:element name="middle-name" type="xs:string" minOccurs="0"/>
                <xs:element name="remarks" type="xs:string" minOccurs="0"/>
                <xs:element name="organisation" type="NonEmptyString" />
                <xs:element name="street" type="xs:string" />
                <xs:element name="number" type="xs:string" />
                <xs:element name="postcode" type="xs:string" />
                <xs:element name="city" type="xs:string" />
                <xs:element name="region" type="xs:string" minOccurs="0"/>
                <xs:element name="country" type="CountryType" />
                <xs:element name="phone" type="PhoneType" />
                <xs:element name="extension" type="xs:string" minOccurs="0"/>
                <xs:element name="fax" type="PhoneType" />
                <xs:element name="protection" type="BoolType" minOccurs="0"/>
                <xs:element name="password" type="PasswordType" minOccurs="0"/>
                <xs:element name="email" type="EmailType"/>
                <xs:element name="pin" type="xs:string" minOccurs="0"/>
                <xs:element name="birthdate" type="xs:string" minOccurs="0"/>
                <xs:element name="birthplace" type="xs:string" minOccurs="0"/>
                <xs:element name="birthpostcode" type="xs:string" minOccurs="0"/>
                <xs:element name="birthcountry" type="xs:string" minOccurs="0"/>
                <xs:element name="siret" type="xs:string" minOccurs="0"/>
                <xs:element name="xxx_membership" type="xs:string" minOccurs="0"/>
            </xs:all>
        </xs:complexType>
    </xs:element>

    <xs:simpleType name="PasswordType">
        <xs:restriction base="xs:string">
            <xs:pattern value=".{6,50}" />
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="BoolType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="YES" />
            <xs:enumeration value="NO" />
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="CountryType">
        <xs:restriction base="xs:string">
            <xs:pattern value="[A-Z]{2}" />
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="NonEmptyString">
        <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="255"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="EmailType">
        <xs:restriction base="xs:string">
            <xs:pattern value="[_A-Za-z0-9\-]+(\.[_A-Za-z0-9\-]+)*@[A-Za-z0-9\-]+(\.[A-Za-z0-9\-]+)*(\.[A-Za-z]{2,})" />
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="PhoneType">
        <xs:restriction base="xs:string">
            <xs:pattern value="\+\d+\.\d+" />
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="ContactType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="PERS" />
            <xs:enumeration value="ORG" />
            <xs:enumeration value="ROLE" />
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="SexType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="MALE" />
            <xs:enumeration value="FEMALE" />
            <xs:enumeration value="NA" />
        </xs:restriction>
    </xs:simpleType>

</xs:schema>
      
      

[Important]Important
Required Fields: type, sex, first-name, last-name, organisation, street, number, postcode, city, country, phone, fax, email
Optional Fields: middle-name, remarks, region, extension, protection, pin, birthdate, birthplace, birthpostcode, birthcountry, siret

Example 2.8. Contact Update:valid(change password)

Change password from multipass to green

REQUEST:

Generic Operation: POST(http://backend.nic-direct.de/bdom/contact/update/DOJOB0001/1/,xml)

Where xml:

        
<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <type>PERS</type>
  <sex>MALE</sex>
  <first-name>Otto</first-name>
  <last-name>Normalverbraucher</last-name> 
  <organisation>Acme Gmbh</organisation>
  <street>Main Strasse</street>
  <number>13</number>
  <postcode>555555</postcode>
  <city>Newe Stad</city>
  <country>DE</country>
  <phone>+040.0123456789</phone>
  <fax>+040.0123456789</fax>
  <email>hans@nictest.de</email>
  <password>new_secret</password>
</request>
        
        

RESPONSE:

        
<response>1 updated</response>
        
        

Activate/Deactivate

Reference: /bdom/contact/activate/HANDLE/USER_ID/

Operation Type: POST

Validation XSD:

Validator

Example 2.9. Contact Activate/Deactivate validation XSD:

Source:

      
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified">

    <xs:element name="request">
        <xs:complexType>
            <xs:all>

                <xs:element name="active" type="xs:int"/>

            </xs:all>
        </xs:complexType>
    </xs:element>

</xs:schema>
      
      

USER_ID: your specific id assigned by BDOM system
HANDLE: your handle

Example 2.10. Contact Activate

Activate specified handle

REQUEST:

Generic Operation:

POST(http://backend.nic-direct.de/bdom/contact/activate/ACMEA0003/13048,xml)

Where xml:

        
<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <active>1</active>
</request>
        
        

RESPONSE:

        
<response>Update OK</response>
        
        

Example 2.11. Contact Deactivate

Deactivate specified handle

REQUEST:

Generic Operation:

POST(http://backend.nic-direct.de/bdom/contact/activate/ACMEA0003/13048,xml)

Where xml:

        
<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <active>0</active>
</request>
        
        

RESPONSE:

        
<response>Update OK</response>