Bulk Patch Records

Bulk Patch works similarly to Bulk Update, except that it allows for selectively updating fields inside the records you are editing.

When providing an array of objects to patch, each object must contain the ID of the record being patched. You can then provide different fields that need to be patched for each record.

Do not provide empty or null values to Bulk Patch unless you want these values to be written to the database. Only provide the values that you want updated.

As an example, here's the current data set we're working with.

[
    {
        "id": 1,
        "name": "Chris",
        "email": "chris@email.com",
        "city": "Chicago"
        },
    {
        "id": 2,
        "name": "Cameron",
        "email": "cameron@email.com",
        "city": "Phoenix"
        }
]

We want to run a bulk patch operation on this table, and this is the JSON we are providing.

[
    {
        "id": 1,
        "city": "Seattle"
        },
    {
        "id": 2,
        "email": "camerons_new_email@email.com",
        }
]

Bulk Patch gives us the flexibility to change different fields in each of the records we are patching.

Last updated