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
bharath kumar 52bharath kumar 52 

Json format that salesforce sends to external systems

Hi All,

I am working on integrations and in order to make sure that the external system receivess and consumes the json data posted by salesforce we need provide the format so that they can using it as a specification to build code to parse the request.
Can you please confirm if salesforce always provides data in the below format when sending data(single sobject) to an external system ?
//Sample json request for a single sobject record

{
  "totalSize" : 1,
  "done" : true,
  "records" : [ {
    "attributes" : {
      "type" : "Account",
      "url" : "/services/data/v47.0/sobjects/Account/0010K00002IlcJwQAJ"
    },
    "Id" : "0010K00002IlcJwQAJ",
    "Name" : "TeslaSpax123"
  } ]
}

 
VinayVinay (Salesforce Developers) 
Hi Bharath,

Try to use Postman to test your API and make POST request to confirm the payload format which you have provided is correct also once you receive the response you can use same in your logic and parse values accordingly.

http://amitsalesforce.blogspot.com/2017/06/test-salesforce-api-by-postman-rest.html
https://jdspaceit.wordpress.com/2016/09/26/using-postman-for-testing-salesforce-rest-apis/

Hope above information was helpful.

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

Thanks,
Vinay Kumar