Inhaltsverzeichnis dieser Seite

Funktion

Der Auftragstyp ContactDocumentInfo ermittelt die Daten und den Inhalt eines Dokuments für einen bestimmten Kontakt und Dokumenttyp.

Beschreibung

Route:  GET /contact/{id}/document/{type}

Es muss kein Body mitgeschickt werden

Request
{
}
Response
{
    "stid": "20210520-app-9059",
    "status": {
        "code": "S0364",
        "text": "Das Dokument für den Kontakt konnte erfolgreich ermittelt werden.",
        "type": "SUCCESS"
    },
    "data": [
        {
            "created": "2021-05-20T12:30:00.000+0200",
            "updated": "2021-05-20T14:30:00.000+0200",
            "contact": {
                "id": 6346
            },
            "document": {
                "created": "2021-05-20T12:30:00.000+0200",
                "updated": "2021-05-20T12:30:00.000+0200",
                "id": 23433,
                "comment": "owner:1",
                "type": "contactDocument",
                "mimeType": "application/pdf",
                "data": "PGNvbnRlbnQ+Sl ... 9PC9jb250ZW50Pg==",
                "size": 112,
                "name": "document.pdf"
            },
            "type": "IDCARD",
            "verification": "NOT_SET",
            "expire": "2023-05-20T12:30:00.000+0200"
        }
    ]
}

Auftragstyp-Code: 0364
Verwendet Objekt ContactDocument

Request
<request>
	<auth>
		<user>customer</user>
		<password>password</password>
		<context>4/context>
	</auth>
    <task>
        <code>0364</code>
        <contact_document>
            <contact>
                <id>6346</id>
            </contact>
            <type>IDCARD</type>
        </contact_document>
    </task>
</request>
Response
<response>
    <result>
        <data>
            <contact_document>
                <content_name>document.pdf</content_name>
                <content_type>application/pdf</content_type>
                <content>                    
					<![CDATA[PGNvbnRlbnQ+Sl ... 9PC9jb250ZW50Pg==]]>
                </content>
                <contact>
                    <id>6346</id>
                </contact>
                <document>
                    <id>23433</id>
                    <comment>owner:1</comment>
                    <addon/>
                    <type>contactDocument</type>
                    <mime_type>application/pdf</mime_type>
                    <data>                        
						<![CDATA[PGNvbnRlbnQ+Sl ... 9PC9jb250ZW50Pg==]]>
                    </data>
                    <size>112</size>
                    <name>document.pdf</name>
                    <created>2021-05-20 12:30:00</created>
                    <updated>2021-05-20 12:30:00</updated>
                </document>
                <type>IDCARD</type>
                <verification>NOT_SET</verification>
                <expire>2023-05-20 12:30:00</expire>
                <id>71</id>
                <created>2021-05-20 12:30:00</created>
                <updated>2021-05-20 14:30:00</updated>
            </contact_document>
        </data>
        <status>
            <code>S0364</code>
            <text>Das Dokument für den Kontakt konnte erfolgreich ermittelt werden.</text>
            <type>success</type>
        </status>
    </result>
    <stid>20210520-app-19505</stid>
</response>

cURL-Beispiel

curl -v --request GET 'https://gateway.autodns.com/v1/contact/12345678/document/id_card' --header 'X-Domainrobot-Context: 4' --header 'Content-Type: multipart/form-data' --user 'exampleuser:examplepassword'