Mutations
Patching a document should be done by performing a mutation. Mutations will prevent multiple writes to a document from overwriting previous ones. In most cases, a PATCH request will require an array of mutations in the body.
The following mutation types can be performed:
Mutation
Description
A mutation object consists of the following fields:
Property
Type
Contract
Description
action
string
required
Type of mutation, as described above.
field
string
required
Field that will be mutated.
A nested property can be accessed by dots (.).
value
any
required *
The value of the mutation.
* depending on mutation type
An example of what the request's body should look like:
[{
"action": "set_field",
"field": "name",
"value": "New name"
}, {
"action": "remove_field",
"field": "notes"
}]Last updated
Was this helpful?