Back to Collection Items
var
begin
CkHttpRequest_putHttpVerb(req,'GET');CkHttpRequest_putPath(req,'/crm/v2/{{custom_module_api_name}}/{{record_id}}/photo');CkHttpRequest_putContentType(req,'multipart/form-data');success := CkHttpRequest_AddFileForUpload2(req,'file',' path to file','application/octet-stream');success := CkHttp_HttpSReq(http,'domain.com',443,True,req,resp);
Curl Command
curl -X GET
-H "Authorization: Bearer <access_token>"
--form 'file=@"/path/to/file"'
https://domain.com/crm/v2/{{custom_module_api_name}}/{{record_id}}/photo
Postman Collection Item JSON
{
"name": "Custom",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access-token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"type": "file",
"src": "/Users/sneha-9300/Desktop/image.jpg"
}
]
},
"url": {
"raw": "{{api-domain}}/crm/v2/{{custom_module_api_name}}/{{record_id}}/photo",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2",
"{{custom_module_api_name}}",
"{{record_id}}",
"photo"
]
},
"description": "To download a photo associated with a module."
},
"response": [
]
}