function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Michael MMichael M 

JSON for ContentDocument

I'm working on an integration to push files from Salesfroce to a different API, and am putting together a mockup JSON. Can someone help in how to write the JSON for files (ContentVersion or ContentDocument)? Can you please give an example for a syntax that would make sense, even with a fake example? This would be of great help. 
Best Answer chosen by Michael M
VinayVinay (Salesforce Developers) 
Hi Michael,

Below are few examples on JSON for ContentDocument.

https://stackoverflow.com/questions/57044642/json-syntax-and-code-for-uploading-files-to-contentdocument-object
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_insert_update_blob.htm
https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_json_sample_file.htm

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar

All Answers

VinayVinay (Salesforce Developers) 
Hi Michael,

Below are few examples on JSON for ContentDocument.

https://stackoverflow.com/questions/57044642/json-syntax-and-code-for-uploading-files-to-contentdocument-object
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_insert_update_blob.htm
https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_json_sample_file.htm

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar
This was selected as the best answer
Michael MMichael M
Thank you