The PATCH API

Update the attributes of an existing Integration Object using a PATCH request.

All Integration Objects have a PATCH endpoint for updating attribute values. The PATCH operation is a partial update that replaces only the attributes values delivered in the payload, with the caveats listed in the PATCH API Constraints section of this topic. This functionality is in contrast to the POST request, which creates a new Integration Object in the Integration API. You can only update one Integration Object per PATCH request. If you do not include existing Integration Object attributes in the payload of a PATCH request, the values for the omitted attributes remain unchanged.

Like the POST request, the PATCH API supports the Content-Language command, as well as the localizedAttributes NavigationProperty, to update attributes for an Integration Object Item in multiple languages. See the Related Link at the end of this topic for more information about localized properties.

To make a successful PATCH request:
  • Be a member of the integrationadmingroup or integrationcreategroup.
  • Include an integration key for the Integration Object in the request URL. For example, PATCH https://localhost:9002/odata2webservices/InboundProduct/Products('Staged|Default|123')

A successful request returns a 200 response code with the updated payload. Inbound Monitoring captures a record of the PATCH request.

PATCH API Constraints

Keep the following considerations in mind when performing PATCH updates.
  • While the service verifies that any part of the integration key you provide in the Integration Object payload matches the integration key in the request URL, you cannot change an integration key using a request.

  • You can only update one item at a time.

  • It is not possible to use query filters with a PATCH request.

  • If a PATCH request includes fewer values than currently exist for an attribute, the service deletes the existing values and persists only the values provided in the PATCH request body. For example, if Mike Smith has three email addresses in the system, the following request sent by an administrator deletes all three addresses and persists only mike@charity.org.
    PATCH https://localhost:9002/odata2webservices/InboundCustomer/Customers('Administrator%7Cadmin')
    {
    "description": "It’s Mike Smith.",
    "addresses": [{
    "firstname": "Mike",
    "lastname": "Smith",
    "email": "mike@charity.org"
    }]
    }
  • Localized fields also update to include only the values present in the PATCH request. For example, if a field has existing en and fr language values, but the PATCH body contains only the values de and es, the attribute updates to include only de and es values. For more information, see the Related Links section of this topic.

  • You can set collections to an empty collection, but you cannot set a collection to null.

  • While you can replace complex types using a PATCH request, you cannot set them to null.

  • You can set primitive types to null.

  • You cannot patch inbound and outbound monitoring records.