Examples of PATCH

Use the PATCH method to update existing objects in your application.

Use the following syntax to partially update objects:

https://your_site_interface/services/rest/connect/version/resource/resource_id

Include the data that you want to update in the request body. Only the fields present in the request JSON data are updated. All other fields remain the same.

For example, using PATCH with the following URI:

https://mysite.example.com/services/rest/connect/v1.4/contacts/2

and the following body:

{
"address": {
    "city": "Boston",
    "postalCode": "02150",
    "stateOrProvince": {
        "lookupName": "MA"
        },
    "street": "123 Beacon Street"
    }
}

returns the status 200 OK. A subsequent GET request for the address data for that contact:

https://mysite.example.com/services/rest/connect/v1.4/contacts/2/address

returns the following:

{
"address": {
    "city": "Boston",
    "country": {
        "links": [
        {
            "rel": "self",
            "href": "https://mysite.example.com/services/rest/connect/v1.4/countries/1"
            },
        {
            "rel": "canonical",
            "href": "https://mysite.example.com/services/rest/connect/v1.4/countries/1"
            },
        {
            "rel": "describedby",
            "href": "https://mysite.example.com/services/rest/connect/v1.4/metadata-catalog/countries"
            }
        ]
    },
    "postalCode": "02150",
    "stateOrProvince": {
        "id": 23,
        "lookupName": "MA"
        },
    "street": "123 Beacon Street"}
}

Refer to Retrieving Data for an Object. The address had been in Bozeman, Montana.