top of page

Should an Integration Send a Replacement or a Patch?

Oct 25
3 min read
PUT vs PATCH: Define the Resource Update Contract: Define the intended change; Confirm endpoint semantics; Verify preserved fields.

A connector needs to change one project's display name. It sends a small object containing only the new name, then discovers that other fields changed or disappeared. The developer assumed that a small payload always means a partial update.


The request method and the endpoint's documented contract determine how a payload is interpreted. Before writing an integration, distinguish a replacement representation from instructions that modify an existing resource.


State the intended change independently


Write the business intention as a before-and-after record: change the display name while preserving the owner, status, and other fields outside the requested change. This gives the reviewer something concrete to compare with the API's behavior.


Do not start by selecting PUT or PATCH because one is familiar. First identify what the endpoint actually supports and how it describes omitted fields, null values, arrays, and nested objects.


Confirm the update model


RFC 5789 distinguishes PATCH from PUT: PUT supplies a representation intended to replace the resource state, while PATCH supplies instructions for modifying it. PATCH does not have a universal default document format.


Consequently, an object that works with one PATCH endpoint may not work with another. Some APIs use a specific patch media type; others document their own update representation. The endpoint's schema and examples are essential evidence.


An illustrative unchanged-field fixture


Start with a test project named Draft Portal, owned by Team North, with status planning. The authorized change is a new display name: Intake Portal. The expected result retains Team North and planning.


Use the documented payload for the selected method. After the request, read the authoritative result or use the returned complete entity if the contract provides it. Compare every field relevant to the preservation requirement, not merely the name.


Examine nested changes separately


A request changing one field inside an address or settings object may replace or merge that object according to the API's contract. Arrays can also have replacement, element-operation, or other documented semantics.


Build a fixture with at least one nested field that should remain unchanged. If the contract is ambiguous, resolve the ambiguity through documentation or a safe test environment before touching real records. Do not discover update behavior through speculative production writes.


Test absence, null, and an empty value


These representations can have different meanings. An omitted field may mean preserve it, while null may mean clear it; another API may reject null entirely. An empty string can be a valid value, an invalid value, or a clearing instruction depending on the contract.


Write the expected behavior for each supported case. Keep unsupported cases out of the production request rather than assuming the service will interpret them helpfully.


Consider retries and concurrent changes


PATCH is not inherently idempotent. Setting a value and incrementing a value are different operations when repeated. Review the actual patch instructions and the endpoint's documented retry behavior.


If a change depends on the version previously read, use the service's supported concurrency mechanism where applicable. Sending a replacement built from an old record can overwrite a newer change even when the method and payload are syntactically correct.


Define evidence for successful completion


A successful status confirms what the API contract says it confirms. Your business acceptance check should additionally establish that the intended change occurred and required fields were preserved.


Record the endpoint, method, payload format, relevant version or validator, and verified result. Avoid retaining unnecessary sensitive payloads in the review record.


Leave a precise maintenance note


The handoff should explain why the integration uses replacement or patch semantics and include the unchanged-field fixture. This protects the choice when someone later simplifies the payload.


The useful question is not which method is generally better. It is whether this documented operation produces exactly the authorized change while preserving the state the business expects to remain intact.


Continue with Does an Empty Field Mean Keep, Clear, or Unknown? for the related planning decision.


The published FutureOS introduction describes the project as being in prelaunch. Use this guide to prepare a concrete project discussion; it does not announce an available FutureOS feature.



Prepared with AI assistance. Primary sources checked on October 25, 2026. Examples and procedures are illustrative editorial guidance, not FutureOS product announcements or an independently reviewed assessment.

Recent Posts

See All

Comments


bottom of page