Stay organized with collections
Save and categorize content based on your preferences.
Full name: projects.locations.datasets.fhirStores.fhir.create
Creates a FHIR resource.
Implements the FHIR standard create interaction (DSTU2, STU3, R4), R5), which creates a new resource with a server-assigned resource ID.
Also supports the FHIR standard conditional create interaction (DSTU2, STU3, R4), R5), specified by supplying an If-None-Exist header containing a FHIR search query. If no resources match this search query, the server processes the create operation as normal.
The request body must contain a JSON-encoded FHIR resource, and the request headers must contain Content-Type: application/fhir+json.
On success, the response body contains a JSON-encoded representation of the resource as it was created on the server, including the server-assigned resource ID and 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.
Required. The name of the FHIR store this resource belongs to.
Authorization requires the following IAM permission on the specified resource parent:
healthcare.fhirResources.create
type
string
Required. The FHIR resource type to create, such as Patient or Observation. For a complete list, see the FHIR Resource Index (DSTU2, STU3, R4, R5). Must match the resource type in the provided content.
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 endpoint, \u003ccode\u003eprojects.locations.datasets.fhirStores.fhir.create\u003c/code\u003e, allows for the creation of a new FHIR resource with a server-assigned ID, implementing the FHIR standard create interaction.\u003c/p\u003e\n"],["\u003cp\u003eConditional creation is supported by using the \u003ccode\u003eIf-None-Exist\u003c/code\u003e header with a FHIR search query; the server will create the resource if no matches are found.\u003c/p\u003e\n"],["\u003cp\u003eThe request must include a JSON-encoded FHIR resource in the body, and the headers must specify \u003ccode\u003eContent-Type: application/fhir+json\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful requests will return a JSON-encoded representation of the created resource, while errors will include a JSON-encoded \u003ccode\u003eOperationOutcome\u003c/code\u003e or a generic GCP error if the request cannot be mapped.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires the \u003ccode\u003ehealthcare.fhirResources.create\u003c/code\u003e IAM permission on the specified FHIR store \u003ccode\u003eparent\u003c/code\u003e resource and must use one of the authorization scopes provided, \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-healthcare\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]