Merge patch (RFC 7396)
Connect’s PATCH endpoints follow RFC 7396 JSON Merge Patch. This applies anywhere you PATCH a resource with a partial body — most relevantly on PATCH /connect/table_entries/:id for the data and customFieldData fields.
The three rules
Section titled “The three rules”| Body has key with… | Result |
|---|---|
| Non-null value | Set or replace the key |
null value | Delete the key entirely |
| Key omitted | Leave it untouched |
For nested objects (e.g., inside customFieldData), the merge is deep — you can update a single nested field without overwriting siblings.
Examples
Section titled “Examples”Starting state:
{ "data": { "email": "old@example.com", "phone": "+49 30 1234567", "notes": "Interested in beginner course" }}Replace one field
Section titled “Replace one field”PATCH /connect/table_entries/<id>Content-Type: application/json
{ "data": { "email": "new@example.com" } }Result: email updated, phone and notes untouched.
Delete a field
Section titled “Delete a field”{ "data": { "notes": null } }Result: notes removed entirely. email and phone untouched.
Replace AND delete in one request
Section titled “Replace AND delete in one request”{ "data": { "email": "new@example.com", "notes": null } }Both apply atomically.
Caveat: no full-replace operation
Section titled “Caveat: no full-replace operation”Merge patch can’t express “replace data entirely” in a single request. If you need to clear all keys, you have to:
- List the existing keys (e.g., from a
GETfirst). - Send a PATCH with
nullfor each key you want to delete. - Send the new keys in the same PATCH.
In practice this almost never matters — you usually want to update or delete specific fields, not nuke the whole object.
Related
Section titled “Related”- Leads resource — primary place merge-patch shows up.
- Workflows — common patch patterns (move to lead state, archive a value).