Skip to main content
POST
Update deals in batch
Update up to 100 existing deals in a group, identified by their id. Each record takes the same fields as update a deal and is updated on its own: a record that fails, for instance because of an unknown custom field, does not prevent the others from being updated. See batch requests for the 100-record limit and how to read the response. Each deal comes back in full, as in the response of update a deal. A batch targets one object type in one group, given by the path. An object type that does not exist in the group fails the whole request with a 404, whose message lists the object types of the group. A record whose id designates an object of another type, or of another group, fails as not found. If the API key cannot update deals in the group, every record fails.
people and companies replace the people and companies of the deal: you must provide the entire list, not just the ones you want to add. Leave them out to keep them unchanged.
People and companies are given by ID, and must already be in the group: an unknown one, or one not in the group, is ignored. The records of one deal are merged into one update, in the order you sent them: the last value given for a field wins, and customFieldValues are merged field by field, the last value given for a custom field winning. The merged update is validated as a whole: if it is invalid, every record of that deal fails with that error. Each of those records gets its own result, with the deal as finally updated. This is not always the same as sending the records one after the other: a record with an invalid custom field value fails every record of its deal, including the earlier ones, which sent on their own would have been applied before it. A record that succeeded but whose people, companies or custom field values could not all be set carries a warnings list explaining what was not applied.

Authorizations

Authorization
string
header
required

API key for authentication

Headers

Idempotency-Key
string

A unique key, such as a UUID, that makes retrying this request safe: a retry with the same key and body returns the original response without running the operation again. Keys are kept for 24 hours after the request completes.

Maximum string length: 255
Example:

"8e03978e-40d5-43e8-bc93-6894a57f9324"

Path Parameters

groupId
string
required

The ID of the group the deals belong to. Can be retrieved from the List groups endpoint.

Required string length: 40
objectType
string
required

The name of a deal custom field that can be retrieved from the List group custom fields endpoint.

Maximum string length: 500

Body

application/json
records
object[]
required
Maximum array length: 100

Response

The outcome of each record, with each updated deal.

data
object
required
Example:
deprecations
string[]
Example: