Newer Version Available

This content describes an older version of this product. View Latest

Batch Response Body

Describes the result of a Batch request.

Batch Results

JSON example
1{
2   "hasErrors" : false,
3   "results" : [{
4      "statusCode" : 204,
5      "result" : null
6      },{
7      "statusCode" : 200,
8      "result": {
9         "attributes" : {
10            "type" : "Account",
11            "url" : "/services/data/v34.0/sobjects/Account/001D000000K0fXOIAZ"
12         },
13         "Name" : "NewName",
14         "BillingPostalCode" : "94105",
15         "Id" : "001D000000K0fXOIAZ"
16      }
17   }]
18}
Properties
Name Type Description
hasErrors Boolean true if at least one of the results in the result set is an HTTP status code in the 400 or 500 range; false otherwise.
results Subrequest Result[] Collection of subrequest results.

Subrequest Result

JSON example
1{
2   "attributes" : {
3      "type" : "Account",
4      "url" : "/services/data/v34.0/sobjects/Account/001D000000K0fXOIAZ"
5   },
6   "Name" : "NewName",
7   "BillingPostalCode" : "94015",
8   "Id" : "001D000000K0fXOIAZ"
9}
Properties
Name Type Description
result The type depends on the response type of the subrequest.

If the result is an error, the type is a collection containing the error message and error code.

Important

The response body of this subrequest.
statusCode Integer An HTTP status code indicating the status of this subrequest.