Creates optional attachment metadata and returns presigned upload URLs for report artifacts (PDF/DICOM SR) for a pending reporting appointment. Upload the raw file bytes with an HTTP PUT to uploadUrl; if contentType was provided, include the same Content-Type header in the upload. Constraints: max 20 items per request, fileName length <= 255 characters, and contentType must be application/pdf or application/dicom when provided. Uploads use a single PUT (supported size up to 2 MB; partners must enforce this limit because the presigned PUT does not enforce content length) and must complete before uploadUrlExpiresAtUtc (metadata is created immediately but content is available only after the PUT succeeds).
Report attachments are optional. Use this endpoint only when sending PDF/DICOM report artifacts; report text can be submitted without attachments. Preferred sequence: create upload URLs, PUT the file bytes, then submit report content.
Idempotency: supports the Idempotency-Key header. Best-effort process-local deduplication only, with a cache lifetime of up to 15 minutes. A cached identical request replays its response; a cached key with a different payload returns 409. Eviction, restarts, different instances or concurrent requests can still create duplicate metadata and upload URLs. Verify existing attachments after an uncertain outcome before retrying; retain the original key and payload.
Upload guidance: send a single PUT to the uploadUrl with Content-Length; if contentType was provided, include the same Content-Type header. Upload URLs are intended for a single successful PUT; request a new URL if an upload fails or expires. Storage locations are managed by QUBS and are not supplied by clients.
Returns 404 when the appointment is not found or is not in the PENDING REPORTING status.
Optional key for best-effort process-local deduplication. Reuse the original key and payload, but duplicates remain possible after eviction, restarts, on another instance or with concurrent requests. See endpoint notes for cache lifetimes and recovery guidance.
- Mock serverhttps://partnerdocs.qubs.io/_mock/openapi/integrations/v1/{domain}/reporting/appointments/{appointmentId}/report/attachments
- Production APIhttps://partners.qubs.io/integrations/v1/{domain}/reporting/appointments/{appointmentId}/report/attachments
- Relative to the current hosthttps://partnerdocs.qubs.io/integrations/v1/{domain}/reporting/appointments/{appointmentId}/report/attachments
curl -i -X POST \
https://partnerdocs.qubs.io/_mock/openapi/integrations/v1/acme/reporting/appointments/200006/report/attachments \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cd4a859c7a1f4b44b765a8fe17bb44c1' \
-H 'X-Correlation-Id: 4b7f0a91b4f54f2a' \
-d '{
"items": [
{
"fileName": "report.pdf",
"contentType": "application/pdf",
"category": "report"
}
]
}'