Stay organized with collections
Save and categorize content based on your preferences.
Full name: projects.locations.datasets.fhirStores.fhir.Resource-validate
Validates an input FHIR resource's conformance to its profiles and the profiles configured on the FHIR store.
Implements the FHIR extended operation $validate (DSTU2, STU3, R4. or R5).
The request body must contain a JSON-encoded FHIR resource, and the request headers must contain Content-Type: application/fhir+json. The Parameters input syntax is not supported.
The profile query parameter can be used to request that the resource only be validated against a specific profile. If a profile with the given URL cannot be found in the FHIR store then an error is returned.
Errors generated by validation 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.
HTTP request
POST https://healthcare.googleapis.com/v1/{parent=projects/*/locations/*/datasets/*/fhirStores/*}/fhir/{type}/$validate
Required. The name of the FHIR store that holds the profiles being used for validation.
Authorization requires the following IAM permission on the specified resource parent:
healthcare.fhirResources.get
type
string
Required. The FHIR resource type of the resource being validated. For a complete list, see the FHIR Resource Index (DSTU2, STU3, R4, or R5). Must match the resource type in the provided content.
Query parameters
Parameters
profile
string
Optional. The canonical URL of a profile that this resource should be validated against. For example, to validate a Patient resource against the US Core Patient profile this parameter would be http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient. A StructureDefinition with this canonical URL must exist in the FHIR store.
Request body
The request body contains an instance of HttpBody.
Response body
If successful, the response is a generic HTTP response whose format is defined by the method.
[[["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 API endpoint validates a FHIR resource against its profiles and those configured on the FHIR store, utilizing the FHIR $validate operation for DSTU2, STU3, or R4.\u003c/p\u003e\n"],["\u003cp\u003eValidation requires a JSON-encoded FHIR resource in the request body with the header \u003ccode\u003eContent-Type: application/fhir+json\u003c/code\u003e, and the \u003ccode\u003eParameters\u003c/code\u003e input syntax is not supported.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eprofile\u003c/code\u003e query parameter allows for validation against a specific profile, identified by its canonical URL, which must exist within the FHIR store.\u003c/p\u003e\n"],["\u003cp\u003eThe request must specify the FHIR store in the \u003ccode\u003eparent\u003c/code\u003e path parameter and the resource type in the \u003ccode\u003etype\u003c/code\u003e path parameter.\u003c/p\u003e\n"],["\u003cp\u003eValidation errors are returned as a JSON-encoded \u003ccode\u003eOperationOutcome\u003c/code\u003e resource, or a GCP error if the request cannot be mapped to a valid API method, and specific OAuth scopes are needed for authorization.\u003c/p\u003e\n"]]],[],null,["# Method: fhir.Resource-validate\n\n**Full name**: projects.locations.datasets.fhirStores.fhir.Resource-validate\n\nValidates an input FHIR resource's conformance to its profiles and the profiles configured on the FHIR store.\n\nImplements the FHIR extended operation $validate ([DSTU2](https://hl7.org/fhir/DSTU2/resource-operations.html#validate), [STU3](https://hl7.org/fhir/STU3/resource-operations.html#validate), [R4](https://hl7.org/fhir/R4/resource-operation-validate.html). or [R5](https://hl7.org/fhir/R5/resource-operation-validate.html)).\n\nThe request body must contain a JSON-encoded FHIR resource, and the request headers must contain `Content-Type: application/fhir+json`. The `Parameters` input syntax is not supported.\n\nThe `profile` query parameter can be used to request that the resource only be validated against a specific profile. If a profile with the given URL cannot be found in the FHIR store then an error is returned.\n\nErrors generated by validation 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\n### HTTP request\n\n`POST https://healthcare.googleapis.com/v1/{parent=projects/*/locations/*/datasets/*/fhirStores/*}/fhir/{type}/$validate`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query 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)."]]