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
Manoj ThangavelManoj Thangavel 

REST API to insert pdf Document

Hi Everyone,

I have enabled REST API for my org and tried to insert a pdf document into Document object. i have tried https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_insert_update_blob.htm the steps.

Those steps working fine for text file from psotman.

But the PDF documents are not able to insert.
User-added image
User-added image

But, the pdf document is not readable in Salesforce reord.

I have tried another way, and recevied below error message.
User-added image

Is there any proper steps to make this callout succes from postman or any java code to make this callout to insert pdf document ?