How can upload the image for account module using rest API v4_1.
Here is a link to set_entry method for creating and updating records
Specifically for image or file data
in the rest_data name_value_list you need two entries for file or image
- field_name => file_name with extension
- field_name_file => base 64 encoded file content
{
"session": "ucgegpjlpl6gvtvedhcmhrc9ba",
"module_name": "Accounts",
"name_value_list": [
{
"id": "CRM_RECORD_ID",
"passport_copy_c": "FILENAME_WITH_EXTENSION",
"passport_copy_c_file": "BASE64_ENCODED_FILE_CONTENT"
}
]
}
Thanks @abuzarfaris,
We have followed instruction as you suggest but it’s not working please suggest if doing wrong
Are you using soap or rest api ?
No, I am using Rest API
Shouldn’t your name value list be something like
$name_value_list=array(
"id"=>$id,
"job_description_attachment_c"=>$fileName,
"job_description_attachment_c_file"=>$contents
);