Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Step 6: Retrieve Batch Results
Retrieve the results for an individual batch by running the following cURL command:
curl https://instance.salesforce.com/services/async/67.0/job/jobId/batch/batchId/result -H "X-SFDC-Session: sessionId"
instance is the portion of the <serverUrl> element and sessionId is the <sessionId> element that you noted in the login response. jobId is the job ID that was returned when you created the job. batchId is the batch ID that was returned when you added a batch to the job.
Salesforce returns a response with data such as this:
1"Id","Success","Created","Error"
2"003x0000004ouM4AAI","true","true",""
3"003x0000004ouM5AAI","true","true",""The response body is a CSV file with a row for each row in the batch request. If a record was created, the ID is contained in the row. If a record was updated, the value in the Created column is false. If a record failed, the Error column contains an error message.