Upload one batch item

POST/lang2fhir/batch/{job_id}/items
RequiresBearerauthentication

Path parameters

job_idstringrequired

Body parameters

documentobjectoptional
createobjectoptional
filestring (binary)optional
request_idstringoptional
idstringoptional
Returns  

Response fields

job_idstringoptional
request_idstringoptional
statusstringoptional
finalizedbooleanoptional
total_itemsintegeroptional
errorobjectoptional
kindstringoptional
messagestringoptional
created_atstringoptional
updated_atstringoptional
completed_atstringoptional
expires_atstringoptional
item_idstringoptional
idstringoptional
deduplicatedbooleanoptional
POSTRequest
# Get authentication token
PHENOML_TOKEN=$(curl -X POST "https://experiment.app.pheno.ml/v2/auth/token" \
  -u "$PHENOML_CLIENT_ID:$PHENOML_CLIENT_SECRET" \
  | jq -r '.access_token')

curl -X POST "https://experiment.app.pheno.ml/lang2fhir/batch/{job_id}/items" \
  -H "Authorization: Bearer $PHENOML_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "document": {},
  "create": {},
  "file": "example",
  "request_id": "<access_token>",
  "id": "abc-123-def-456"
}'
202 AcceptedExample Response
{
  "job_id": "l2f_batch_6f1d2c3a-8b4e-4f5a-9c7d-0e1f2a3b4c5d",
  "request_id": "submit-2025-09-02-batch-001",
  "status": "pending",
  "finalized": false,
  "total_items": 12,
  "error": {
    "kind": "processing_failed",
    "message": "the item could not be converted"
  },
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z",
  "completed_at": "2024-01-15T09:30:00Z",
  "expires_at": "2024-01-15T09:30:00Z",
  "item_id": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "id": "chart-note-0042",
  "deduplicated": false
}