Create FHIR resource

POST/fhir-provider/{fhir_provider_id}/fhir/{fhir_path}

Creates a new FHIR resource on the specified provider. The request body should contain a valid FHIR resource in JSON format.

The request is proxied to the configured FHIR server with appropriate authentication headers.

RequiresBearerauthentication

Header parameters

X-Phenoml-On-Behalf-Ofstringoptional

Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity. Must be in the format: Patient/{uuid} or Practitioner/{uuid}

X-Phenoml-Fhir-Providerstringoptional

Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}. Multiple FHIR provider integrations can be provided as comma-separated values.

Path parameters

fhir_provider_idstringrequired

The ID of the FHIR provider to use. Can be either:

  • A UUID representing the provider ID
  • A provider name (legacy support - will just use the most recently updated provider with this name)
fhir_pathstringrequired

The FHIR resource path to operate on. This follows FHIR RESTful API conventions. Examples:

  • "Patient" (for resource type operations)
  • "Patient/123" (for specific resource operations)
  • "Patient/123/_history" (for history operations)
Returns  

Resource created successfully

POSTRequest
curl -X POST 'https://experiment.app.pheno.ml/fhir-provider/%7Bfhir_provider_id%7D/fhir/%7Bfhir_path%7D' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "resourceType": "Patient"
}'
200 OKResponse
{}