Newer Version Available
Update a Batch of Records
Update multiple records. You can create, update, and delete up to 200 records in a
single request.
- Resource
-
1/ui-api/records/batch - Available Version
- 59.0
- HTTP Method
- POST
- Example
- This example updates multiple
records.
1POST /ui-api/records/batch1{ 2 "allOrNone": false, 3 "operations": [ 4 { 5 "type": "Update", 6 "records": [ 7 { 8 "fields": { 9 "Id": "001xx000003Gaf9AAC", 10 "NumberOfEmployees": 1000 11 } 12 }, 13 { 14 "fields": { 15 "Id": "001xx000003GanDAAS", 16 "NumberOfEmployees": 5000 17 } 18 }, 19 ] 20 }, 21 ] 22} - Request Body
-
Name Type Description Required or Optional Available Version recordInput Batch Record Input The batch of record input. Required 59.0 - Request Parameters
-
Name Type Description Required or Optional Available Version useDefaultRule Boolean For a Case or Lead, specifies whether to use the default (active) assignment rule. If you specify useDefaultRule, don’t specify an assignmentRuleId.
For an Account, specifies whether to apply the default territory assignment rules.
The default value is false.
See AssignmentRuleHeader in SOAP API Developer Guide.
Optional 64.0 - Response Body
- Batch Results
- Usage
- When updating a batch of records, you must include the Id field. Don’t include the apiName field in Batch Operation Input.
- You can’t perform multiple operations on the same record in one request. An update operation using an Id value that’s used in another update or delete operation can’t be processed. Otherwise, a 400 HTTP status code with an INVALID_BATCH_REQUEST error is returned.
- Receiving a 400 HTTP status code with an INVALID_INPUT error can be caused by one of these reasons.
- The operations field is missing or empty.
- The operation type is missing.
- The operations field doesn’t contain a records field or the records field is empty.