- Home
- API reference
- API documentation (JSON/XML)
- Tasks
- Contact document tasks
Contact document info (download)
Function
The ContactDocumentInfo task determines the data and content of a document for a given contact and document type.
Description
Route: GET /contact/{id}/document/{type}
No body needs to be sent with.
{
}{
"stid": "20210520-app-9059",
"status": {
"code": "S0364",
"text": "The document for the contact has been successfully inquired.",
"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"
}
]
}
Task code 0364
Uses ContactDocument object
<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><?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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>The document for the contact has been successfully inquired.</text>
<type>success</type>
</status>
</result>
<stid>20210520-app-19505</stid>
</response>
cUrl example
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'