Skip to content

Submit an editable draft or request normal report authorisation

Request

Requires an idempotency key and explicit delegation to an active QUBS clinician. Preliminary content enters the Typed worklist; final content follows normal authorisation. Accepts text/plain or strictly validated basic text/html report bodies for radiology appointments in PENDING REPORTING or TYPED. Unsupported HTML returns 400. Attachments are optional.

Creates or updates the linked editable QUBS report. preliminary returns 201 after saving; final returns 202 after requesting normal authorisation and finalisation. Requires interpretingClinicianEmail and explicit partner delegation plus normal clinician permissions. Updates require reportKey and expectedReportRevision. Idempotency-Key is mandatory (maximum 128 characters): identical retries replay the original outcome; changed original content or format under the same key returns 409. An unresolved operation returns 202 with operationId, status pending and a reconciliation message; do not use a new key to repeat it. A failed final submission may already have saved content. No partner endpoint currently retrieves the latest revision or reconciles pending operations; stop automatic writes and contact QUBS support with domain, appointmentId and operationId/correlation ID before creating another operation. Do not guess revisions. Workflow failures can return application/json with operationId, detail and workflowError rather than Problem Details.

Returns 404 when the appointment is not found. New submissions require PENDING REPORTING or TYPED; an unavailable workflow state or revision conflict returns 409.

Security
Bearer
Path
domainstringrequired

Partner domain identifier for the organisation/tenant. Your bearer token is scoped to one or more domains and requests outside that scope are rejected.

Example:acme
appointmentIdstringrequired

Opaque appointment identifier within the specified domain. Preserve the value exactly as returned; values may look numeric but are not guaranteed to be numeric, so do not parse as an integer.

Example:200006
Headers
X-Correlation-Idstring

Request correlation identifier. Echoes the incoming X-Correlation-Id header when provided.

Example:4b7f0a91b4f54f2a
Idempotency-Keystringrequired

Idempotency key for safely retrying POST requests. Use a stable ASCII token (recommend a UUID) up to 128 characters. Reuse the same key with the same request payload to receive the original response; reuse with a different payload returns 409 Conflict. For timeouts or transient errors, retry with the same key and exponential backoff.

Example:cd4a859c7a1f4b44b765a8fe17bb44c1
Bodyapplication/jsonrequired
reportTextstring, [ 1 .. 2097152 ] charactersrequired

Required report body, interpreted only according to reportFormat. Plain text is not inferred as HTML. Accepted HTML is canonicalised and a readable plain-text version is derived. Attachments are optional. The size limit applies to the original submitted content. ReportText must be 2097152 bytes or less when UTF-8 encoded.

Example:"Example reportText"
reportStatusstring, non-emptyrequired

Case-insensitive: preliminary saves an editable draft in the Typed worklist; final requests normal QUBS authorisation and delivery on behalf of the specified clinician. A final submission is not an import of an already-authorised external document.

Enum:"preliminary""final"
Example:"preliminary"
reportFormatnull or string

Optional: text/plain or text/html (case-insensitive). Defaults to text/plain when omitted. HTML must be a report-body fragment. Allowed tags: p, div, span, br, h1-h6, strong, b, em, i, u, ul, ol, li, table, thead, tbody, tfoot, tr, th, td, caption. Only colspan and rowspan attributes on td/th are permitted, with integer values 1-50. All other tags and attributes, CSS, images, links, scripts, comments, declarations and full HTML documents are rejected. Malformed HTML or content without readable text returns 400 before operation receipts, rendering or clinical writes. Errors identify the tag or attribute without echoing clinical text. QUBS templates control fonts, layout and signatures. In the editor, captions become editable paragraphs above their tables, preserving text and inline emphasis.

Default:"text/plain"
Example:"text/plain"
interpretingClinicianNamenull or string

Interpreting clinician display name.

Example:"Example Name"
interpretingClinicianProviderNumbernull or string

Optional source clinician provider number. Does not select the authorising clinician or grant signing permission; QUBS uses the resolved clinician account.

Example:"Example interpretingClinicianProviderNumber"
interpretingClinicianEmailstring, non-emptyrequired

Required email of an active QUBS clinician in the requested tenant. The partner needs explicit clinician or domain-wide delegation, and the clinician must have normal QUBS permissions for the requested action. An email domain alone does not grant access.

Example:"user@example.com"
reportedAtUtcnull or string, (date-time)

Optional source timestamp (UTC). Does not override the QUBS authorisation timestamp.

Example:"2020-01-01T00:00:00Z"
reportKeynull or string

Required when updating an existing draft. Treat this as an opaque value: copy the returned linked QUBS report key unchanged, without constructing or parsing it; a missing or mismatched key returns 409. Omit for first creation.

Example:"Example reportKey"
expectedReportRevisionnull or integer, (int64)

Required when updating an existing draft. Send its current report revision; stale or missing revisions return 409. First creation uses revision 0 when omitted. No partner endpoint currently returns the latest report revision. On conflict, stop automatic writes and contact QUBS support with domain, appointmentId and operationId/correlation ID. Do not guess revisions or use a new key to bypass the conflict; resume only after QUBS confirms the current state and revision.

Example:1
pathologyAcknowledgementnull or string

Acknowledgement required only when the normal QUBS authorisation workflow requests pathology acknowledgement.

Example:"Example pathologyAcknowledgement"
curl -i -X POST \
  https://partnerdocs.qubs.io/_mock/openapi/integrations/v1/acme/reporting/appointments/200006/report \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cd4a859c7a1f4b44b765a8fe17bb44c1' \
  -H 'X-Correlation-Id: 4b7f0a91b4f54f2a' \
  -d '{
    "reportText": "No acute abnormality detected.",
    "reportStatus": "preliminary",
    "reportFormat": "text/plain",
    "interpretingClinicianName": "Dr Smith",
    "interpretingClinicianProviderNumber": "1234567A",
    "interpretingClinicianEmail": "dr.smith@example.com",
    "reportedAtUtc": "2025-01-10T03:04:05Z"
  }'

Responses

Created

Headers
X-Correlation-Idstring

Request correlation identifier. Echoes the incoming X-Correlation-Id header when provided.

Example:"4b7f0a91b4f54f2a"
Bodyapplication/json
reportGuidstringrequired

Identifier of the linked QUBS report. Updating an existing draft does not create an unrelated report record.

Example:"123"
reportStatusstring

Requested submission status: preliminary or final. Use workflowStatus for the QUBS workflow state.

Enum:"preliminary""final"
Example:"preliminary"
reportedAtUtcnull or string, (date-time)

Source timestamp supplied in the request, when present.

Example:"2020-01-01T00:00:00Z"
reportKeystring

Opaque linked QUBS report key. Copy unchanged for subsequent draft updates; do not construct or parse it.

Example:"Example reportKey"
reportRevisioninteger, (int64)

Report revision after this operation. Subsequent updates require the latest revision.

Example:1
workflowStatusstring

QUBS workflow state returned by the save or authorisation action; delivery may still be in progress.

Example:"active"
operationIdstring

Durable submission operation identifier for tracing and reconciliation.

Example:"123"
Response
{ "reportGuid": "9001", "reportStatus": "preliminary", "reportKey": "PT|220000|9001|RT", "reportRevision": 1, "workflowStatus": "TYPED", "operationId": "submission-operation-id", "reportedAtUtc": "2025-01-10T03:04:05Z" }