Skip to main content
Upload document
curl --request POST \
  --url https://{tenantId}.api.nestmed.com/api/v1/episodes/{episodeId}/documents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form documentType=referral \
  --form 'title=<string>' \
  --form 'description=<string>' \
  --form priority=low
{
  "documentId": "<string>",
  "taskId": "<string>",
  "status": "queued"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string<uuid>

A unique key (e.g., UUID) to ensure a POST request is processed only once. If a request with the same key is received again within 24 hours, the original response will be returned without creating a new resource.

Path Parameters

episodeId
string
required

Body

multipart/form-data
file
file
required
documentType
enum<string>
required
Available options:
referral,
physicianOrder,
carePlan,
labResult,
imaging,
dischargeSummary,
medicationList,
insurance,
consent,
other
title
string
required
description
string
priority
enum<string>
Available options:
low,
normal,
high,
urgent

Response

202 - application/json

Document accepted for processing.

documentId
string
required

The unique identifier for the uploaded document.

taskId
string
required

Task ID to poll for processing status.

status
enum<string>
required

Initial processing status.

Available options:
queued,
processing