Handling missing and null values in API updates

Prevent an integration from unintentionally clearing or replacing business data during updates.

Discuss integrations and automation

Identify the intended change

Agree whether the integration should leave a field unchanged, replace its value or deliberately clear it. For example, a missing telephone number in a partial customer update might mean the source did not send a change, rather than that the stored number should be deleted.

Read the actual API contract

A missing property, an empty string and a null value are different representations, but the destination defines what each means. RFC 7396 gives null a removal meaning in JSON Merge Patch; do not assume every API using JSON or HTTP PATCH follows that format.

Map the business decision

Record which system owns the field, who can authorise a clear operation and how an ambiguous update is handled. Preserve an auditable reason where the business needs one, and avoid substituting a guessed value for missing information.

Test each case safely

Use fictional customer records and mocked responses to test an omitted property, a null, an empty value and a valid replacement. Check both systems after each case and confirm that an unintended clear is visible for review before enabling the connection.

Explore the service

Start a conversation

Let’s make it
work better.

Tell us about your people, systems or premises. We’ll discuss what you need and agree a practical next step.

This opens a draft in your email application. Review your enquiry and send it when you’re ready.