Create Resource
CRUD Operations
Create Resource
Create a new FHIR resource with server-assigned ID
POST
Create Resource
Creates a new FHIR resource. The server assigns a unique ID and returns the created resource with metadata.
Endpoint
The FHIR resource type (e.g.,
Patient, Observation, Encounter)Headers
Must be
application/fhir+json or application/fhir+xmlResponse format:
application/fhir+json (default) or application/fhir+xmlResponse style:
return=representation(default) - Return full resourcereturn=minimal- Return headers onlyreturn=OperationOutcome- Return OperationOutcome
Conditional create. Search parameters to check for existing resource.Example:
identifier=http://hospital.example/mrn|12345Request Body
ID in Body: Any
id field in the request body is ignored. The server always assigns IDs for POST requests. Use PUT if you need to specify the ID.Response
201 Created
Resource created successfully. Returns the new resource with server-assigned metadata.Server-assigned unique identifier (typically UUID)
Version number (starts at “1”)
ISO 8601 timestamp of creation
200 OK (Conditional Create - Existing Resource)
When usingIf-None-Exist and a matching resource already exists.
400 Bad Request
Validation failed or malformed request.412 Precondition Failed
Conditional create found multiple matching resources (ambiguous).422 Unprocessable Entity
Resource violates business rules or profile constraints.Examples
See Also
Update Resource
Update with PUT (can create with custom ID)
Read Resource
Retrieve created resource
Batch Create
Create multiple resources in one request
Learn FHIR CRUD
Understand FHIR’s create operation
Authorizations
Bearer token authentication
Path Parameters
The FHIR resource type (e.g., Patient, Observation, Encounter)
Body
The FHIR resource to create