+ Start a Discussion
govindb1.396432156444516E12govindb1.396432156444516E12 

Sending multiple attachments using BULK API

Hi All,

I want to send multiple attachments to salesforce using Bulk API.

please tell me what should be the endpoint in this case,what should be my CSV format ,what all headers I'll be including and other stuff if you know which could help me

Thanks in advance!!
NehalNehal (Salesforce Developers) 
Hi,

Please refer to link below that will provide you with the details on formats and csv file to send attachemts in salesforce using bulk api.

https://help.salesforce.com/HTViewHelpDoc?id=loader_attachments.htm&language=en_US

Hope this helps.
govindb1.396432156444516E12govindb1.396432156444516E12
Hi Nehal,

Thanks for responding , but the link you shared talks about sending using DataLoader.

I want to know the request body for sending the CSV file. I am writing a Rest API to push multiple attachments to SF. I have created the CSV file as explained, but how to send that file. what should be the URL(end point)?  should I have to create any job? what should be my request body?

Looking for any help. 
Thanks in advance!


NehalNehal (Salesforce Developers) 
Hi,

Please refer below link that will provide you with all the details on how csv should be:
https://developer.salesforce.com/page/Loading_Large_Data_Sets_with_the_Force.com_Bulk_API

I hope this helps
govindb1.396432156444516E12govindb1.396432156444516E12
Hi Nehal,

Thanks for the reply, but I have done with sending the data using CSV to SF objects.
Now I need to send the attachments(as PDF/JPEG image) in bulk.

so for that I am not sure about the CSV structure (i.e. for sending the attachments only) and what should be the URI for this case.
Because it doesnot work same for the attachments as for sending the fields value of an object using CSV (like account/contact etc).

Hope I am a little bit clear now.

Thanks in advance!
govindb1.396432156444516E12govindb1.396432156444516E12

I found what I was looking for ...Thanks for the help :)
New_DeveloperNew_Developer
Iam looking for the same. Can you post what you found!!!

Thanks
rforce2rforce2
The solution is described in the section Load Binary Attachments in the Bulk API Developer Guide:
https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/binary_intro.htm