Store instances (STOW-RS)
post /dicomweb/studies
Stores DICOM instances (PS3.18 §10.5). The body is
multipart/related; type="application/dicom" with one instance per part,
streamed straight to storage, so Content-Length is required. The request is answered
with 202 as soon as the body is stored; instances are parsed, de-duplicated by SOP Instance UID
and added to the worklist in the background. Use STOW uploads for one instance larger than a
request may be.
Partner tokens (partner_stow) call this on app.pacspilot.com. Site
gateways call it on the ingest host with mTLS; their tokens are not accepted here.
Scope: stow:write (partner_stow tokens).
Rate limit: 60 requests per minute per token.
Audited as stow.receive in the practice's audit log.
Request body
One DICOM Part 10 instance per part
multipart/related; type="application/dicom"
Responses
202
Accepted for asynchronous processing. Poll the batch at Location until
status is done or failed.
| Header | Description |
|---|---|
Location |
URL of the batch status (GET /dicomweb/stow/{batchId}) |
Warning |
299 - "Accepted for asynchronous processing; status at …" |
application/dicom+json
{}
400
Problem: validation, incomplete-body
401
Problem: unauthenticated
403
Problem: forbidden, tenant-suspended, trial-expired,
trial-cap
411
Problem: length-required
413
Problem: payload-too-large
415
Problem: unsupported-media-type
429
Problem: rate-limited
500
Problem: internal
503
Problem: tenant-migrating
Errors
| Status | Type | Meaning |
|---|---|---|
| 401 |
unauthenticated
|
Not authenticated |
| 403 |
forbidden
|
Not allowed |
| 500 |
internal
|
Internal error |
| 429 |
rate-limited
|
Rate limited |
| 503 |
tenant-migrating
|
Practice is being moved |
| 403 |
tenant-suspended
|
Practice is read-only |
| 403 |
trial-expired
|
Trial has ended |
| 403 |
trial-cap
|
Trial limit reached |
| 400 |
validation
|
Invalid request |
| 415 |
unsupported-media-type
|
Unsupported content type |
| 411 |
length-required
|
Content-Length required |
| 413 |
payload-too-large
|
Body too large |
| 400 |
incomplete-body
|
Incomplete body |
Examples
curl
curl -X POST 'https://app.pacspilot.com/dicomweb/studies' \
-H "Authorization: Bearer $PACSPILOT_TOKEN" \
-H 'Content-Type: multipart/related; type="application/dicom"; boundary=pp-boundary' \
--data-binary @instances.multipart
JavaScript
import { readFile } from "node:fs/promises";
const res = await fetch("https://app.pacspilot.com/dicomweb/studies", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PACSPILOT_TOKEN}`,
"Content-Type": "multipart/related; type=\"application/dicom\"; boundary=pp-boundary",
},
body: await readFile("instances.multipart"),
});
console.log(res.status, await res.text());
Python
import os
import requests
with open("instances.multipart", "rb") as f:
data = f.read()
res = requests.request(
"POST",
"https://app.pacspilot.com/dicomweb/studies",
headers={"Authorization": f"Bearer {os.environ['PACSPILOT_TOKEN']}", "Content-Type": "multipart/related; type=\"application/dicom\"; boundary=pp-boundary"},
data=data,
)
print(res.status_code, res.text)