Read (GET) Files Associated with a Contact
Use this API to read all files associated with a contact in the Contacts hub.
To get all files associated with a contact:
Execute a GET command on the endpoint
{{url}}/contact/{{Key1}}/files where
Key1 is the
ContactID for the
contact, whose files you want to retrieve.
For example, using cURL to submit the GET request, here is an example of how to get all of the file objects for the specified contact:
curl --request GET \ --url 'https://{{url}}/contact/{{Key1}}/files' \ --header 'authorization: Bearer {{oauth_token}}' \ --header 'content-type: application/json'
The call returns one JSON structure like the following for each file object in the Contacts hub. Double quotes in the returned JSON indicate that the field has no data.
{ "PKey": "12390eae3f1c428e8319fa4ce8a4044a", "FileID": "35995042-4768-4c14-a4f1-34bf9088aa27", "Key1": "CONTACT1017948475581", "Key2": "", "Key3": "", "ContactID": "CONTACT1017948475581", "CategoryCode": "", "CategoryDescription": "", "FileName": "FileName.PNG", "FileDescription": "FileName.PNG", "FileSize": 10228, "Application": "Contacts", "ContentType": "image/png" }