Stay organized with collections
Save and categorize content based on your preferences.
Full name: projects.locations.datasets.fhirStores.fhir.patch
Updates part of an existing resource by applying the operations specified in a JSON Patch document.
Implements the FHIR standard patch interaction (STU3, R4, R5).
DSTU2 doesn't define a patch method, but the server supports it in the same way it supports STU3.
The request body must contain a JSON Patch document, and the request headers must contain Content-Type: application/json-patch+json.
On success, the response body contains a JSON-encoded representation of the updated resource, including the server-assigned version ID. Errors generated by the FHIR store contain a JSON-encoded OperationOutcome resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-23 UTC."],[[["\u003cp\u003eThis method, \u003ccode\u003eprojects.locations.datasets.fhirStores.fhir.patch\u003c/code\u003e, updates a portion of a FHIR resource using a JSON Patch document.\u003c/p\u003e\n"],["\u003cp\u003eIt supports the FHIR standard patch interaction for STU3 and R4, and also supports it for DSTU2 despite it not being defined in the standard.\u003c/p\u003e\n"],["\u003cp\u003eThe request must include a JSON Patch document in the body and specify \u003ccode\u003eContent-Type: application/json-patch+json\u003c/code\u003e in the headers.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful updates return a JSON-encoded representation of the updated resource, while errors return a JSON-encoded \u003ccode\u003eOperationOutcome\u003c/code\u003e resource.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization to use this method requires the \u003ccode\u003ehealthcare.fhirResources.patch\u003c/code\u003e IAM permission, along with one of the required OAuth scopes.\u003c/p\u003e\n"]]],[],null,["# Method: fhir.patch\n\n**Full name**: projects.locations.datasets.fhirStores.fhir.patch\n\nUpdates part of an existing resource by applying the operations specified in a [JSON Patch](http://jsonpatch.com/) document.\n\nImplements the FHIR standard patch interaction ([STU3](https://hl7.org/fhir/STU3/http.html#patch), [R4](https://hl7.org/fhir/R4/http.html#patch), [R5](https://hl7.org/fhir/R5/http.html#patch)).\n\nDSTU2 doesn't define a patch method, but the server supports it in the same way it supports STU3.\n\nThe request body must contain a JSON Patch document, and the request headers must contain `Content-Type: application/json-patch+json`.\n\nOn success, the response body contains a JSON-encoded representation of the updated resource, including the server-assigned version ID. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead.\n\nFor samples that show how to call `patch`, see [Patching a FHIR resource](https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#patching_a_fhir_resource).\n\n### HTTP request\n\n`PATCH https://healthcare.googleapis.com/v1/{name=projects/*/locations/*/datasets/*/fhirStores/*/fhir/*/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains an instance of [HttpBody](/healthcare-api/docs/reference/rest/Shared.Types/HttpBody).\n\n### Response body\n\nIf successful, the response is a generic HTTP response whose format is defined by the method.\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-healthcare`\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]