Submit a FHIR bundle for ingestion
curl --request POST \
--url 'https://cds.marmar.life/v1/fhir/$submit' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/fhir+json' \
--data '
{
"resourceType": "Bundle",
"entry": [
{
"resource": {
"resourceType": "Patient",
"id": "<string>",
"identifier": [
{
"value": "<string>",
"system": "<string>"
}
],
"name": [
{
"family": "<string>",
"given": [
"<string>"
],
"text": "<string>"
}
],
"gender": "<string>",
"birthDate": "<string>"
}
}
]
}
'import requests
url = "https://cds.marmar.life/v1/fhir/$submit"
payload = {
"resourceType": "Bundle",
"entry": [{ "resource": {
"resourceType": "Patient",
"id": "<string>",
"identifier": [
{
"value": "<string>",
"system": "<string>"
}
],
"name": [
{
"family": "<string>",
"given": ["<string>"],
"text": "<string>"
}
],
"gender": "<string>",
"birthDate": "<string>"
} }]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/fhir+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/fhir+json'},
body: JSON.stringify({
resourceType: 'Bundle',
entry: [
{
resource: {
resourceType: 'Patient',
id: '<string>',
identifier: [{value: '<string>', system: '<string>'}],
name: [{family: '<string>', given: ['<string>'], text: '<string>'}],
gender: '<string>',
birthDate: '<string>'
}
}
]
})
};
fetch('https://cds.marmar.life/v1/fhir/$submit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cds.marmar.life/v1/fhir/$submit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'resourceType' => 'Bundle',
'entry' => [
[
'resource' => [
'resourceType' => 'Patient',
'id' => '<string>',
'identifier' => [
[
'value' => '<string>',
'system' => '<string>'
]
],
'name' => [
[
'family' => '<string>',
'given' => [
'<string>'
],
'text' => '<string>'
]
],
'gender' => '<string>',
'birthDate' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/fhir+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cds.marmar.life/v1/fhir/$submit"
payload := strings.NewReader("{\n \"resourceType\": \"Bundle\",\n \"entry\": [\n {\n \"resource\": {\n \"resourceType\": \"Patient\",\n \"id\": \"<string>\",\n \"identifier\": [\n {\n \"value\": \"<string>\",\n \"system\": \"<string>\"\n }\n ],\n \"name\": [\n {\n \"family\": \"<string>\",\n \"given\": [\n \"<string>\"\n ],\n \"text\": \"<string>\"\n }\n ],\n \"gender\": \"<string>\",\n \"birthDate\": \"<string>\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/fhir+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://cds.marmar.life/v1/fhir/$submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/fhir+json")
.body("{\n \"resourceType\": \"Bundle\",\n \"entry\": [\n {\n \"resource\": {\n \"resourceType\": \"Patient\",\n \"id\": \"<string>\",\n \"identifier\": [\n {\n \"value\": \"<string>\",\n \"system\": \"<string>\"\n }\n ],\n \"name\": [\n {\n \"family\": \"<string>\",\n \"given\": [\n \"<string>\"\n ],\n \"text\": \"<string>\"\n }\n ],\n \"gender\": \"<string>\",\n \"birthDate\": \"<string>\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cds.marmar.life/v1/fhir/$submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/fhir+json'
request.body = "{\n \"resourceType\": \"Bundle\",\n \"entry\": [\n {\n \"resource\": {\n \"resourceType\": \"Patient\",\n \"id\": \"<string>\",\n \"identifier\": [\n {\n \"value\": \"<string>\",\n \"system\": \"<string>\"\n }\n ],\n \"name\": [\n {\n \"family\": \"<string>\",\n \"given\": [\n \"<string>\"\n ],\n \"text\": \"<string>\"\n }\n ],\n \"gender\": \"<string>\",\n \"birthDate\": \"<string>\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"outcome": {
"resourceType": "OperationOutcome",
"issue": [
{
"code": "<string>",
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
},
"summary": {
"patients": 1,
"medicationStatements": 1,
"medicationRequests": 1,
"conditions": 1,
"allergies": 1,
"observations": 1,
"encounters": 1,
"errors": 1,
"warnings": 1,
"ignored": 1
}
}{
"resourceType": "OperationOutcome",
"issue": [
{
"code": "<string>",
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}FHIR
Submit a FHIR bundle for ingestion
Accepts a FHIR bundle containing Patient, MedicationStatement, MedicationRequest, Condition, AllergyIntolerance, Observation, and Encounter resources. Each resource is validated and stored in the tenant’s workspace. The response includes an OperationOutcome and per-resource summary counters.
POST
/
v1
/
fhir
/
$submit
Submit a FHIR bundle for ingestion
curl --request POST \
--url 'https://cds.marmar.life/v1/fhir/$submit' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/fhir+json' \
--data '
{
"resourceType": "Bundle",
"entry": [
{
"resource": {
"resourceType": "Patient",
"id": "<string>",
"identifier": [
{
"value": "<string>",
"system": "<string>"
}
],
"name": [
{
"family": "<string>",
"given": [
"<string>"
],
"text": "<string>"
}
],
"gender": "<string>",
"birthDate": "<string>"
}
}
]
}
'import requests
url = "https://cds.marmar.life/v1/fhir/$submit"
payload = {
"resourceType": "Bundle",
"entry": [{ "resource": {
"resourceType": "Patient",
"id": "<string>",
"identifier": [
{
"value": "<string>",
"system": "<string>"
}
],
"name": [
{
"family": "<string>",
"given": ["<string>"],
"text": "<string>"
}
],
"gender": "<string>",
"birthDate": "<string>"
} }]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/fhir+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/fhir+json'},
body: JSON.stringify({
resourceType: 'Bundle',
entry: [
{
resource: {
resourceType: 'Patient',
id: '<string>',
identifier: [{value: '<string>', system: '<string>'}],
name: [{family: '<string>', given: ['<string>'], text: '<string>'}],
gender: '<string>',
birthDate: '<string>'
}
}
]
})
};
fetch('https://cds.marmar.life/v1/fhir/$submit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cds.marmar.life/v1/fhir/$submit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'resourceType' => 'Bundle',
'entry' => [
[
'resource' => [
'resourceType' => 'Patient',
'id' => '<string>',
'identifier' => [
[
'value' => '<string>',
'system' => '<string>'
]
],
'name' => [
[
'family' => '<string>',
'given' => [
'<string>'
],
'text' => '<string>'
]
],
'gender' => '<string>',
'birthDate' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/fhir+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cds.marmar.life/v1/fhir/$submit"
payload := strings.NewReader("{\n \"resourceType\": \"Bundle\",\n \"entry\": [\n {\n \"resource\": {\n \"resourceType\": \"Patient\",\n \"id\": \"<string>\",\n \"identifier\": [\n {\n \"value\": \"<string>\",\n \"system\": \"<string>\"\n }\n ],\n \"name\": [\n {\n \"family\": \"<string>\",\n \"given\": [\n \"<string>\"\n ],\n \"text\": \"<string>\"\n }\n ],\n \"gender\": \"<string>\",\n \"birthDate\": \"<string>\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/fhir+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://cds.marmar.life/v1/fhir/$submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/fhir+json")
.body("{\n \"resourceType\": \"Bundle\",\n \"entry\": [\n {\n \"resource\": {\n \"resourceType\": \"Patient\",\n \"id\": \"<string>\",\n \"identifier\": [\n {\n \"value\": \"<string>\",\n \"system\": \"<string>\"\n }\n ],\n \"name\": [\n {\n \"family\": \"<string>\",\n \"given\": [\n \"<string>\"\n ],\n \"text\": \"<string>\"\n }\n ],\n \"gender\": \"<string>\",\n \"birthDate\": \"<string>\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cds.marmar.life/v1/fhir/$submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/fhir+json'
request.body = "{\n \"resourceType\": \"Bundle\",\n \"entry\": [\n {\n \"resource\": {\n \"resourceType\": \"Patient\",\n \"id\": \"<string>\",\n \"identifier\": [\n {\n \"value\": \"<string>\",\n \"system\": \"<string>\"\n }\n ],\n \"name\": [\n {\n \"family\": \"<string>\",\n \"given\": [\n \"<string>\"\n ],\n \"text\": \"<string>\"\n }\n ],\n \"gender\": \"<string>\",\n \"birthDate\": \"<string>\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"outcome": {
"resourceType": "OperationOutcome",
"issue": [
{
"code": "<string>",
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
},
"summary": {
"patients": 1,
"medicationStatements": 1,
"medicationRequests": 1,
"conditions": 1,
"allergies": 1,
"observations": 1,
"encounters": 1,
"errors": 1,
"warnings": 1,
"ignored": 1
}
}{
"resourceType": "OperationOutcome",
"issue": [
{
"code": "<string>",
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}Authorizations
API key obtained from the Tenant Dashboard. Use as Authorization: Bearer YOUR_API_KEY
Body
application/fhir+jsonapplication/json
⌘I