POST
/transactional-api/file-investigation-reportFile Investigation Report
Files a PENDING investigation report by resolving the associated review task. Optional filing comments may be provided for specific groups or results. Investigation request items may be marked as fulfilled.
Authorization: Bearer token (JWT). See Authentication.
Request
curl -L -X POST 'https://{tenantId}.api.england.medicus.health/transactional-api/file-investigation-report' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"reportId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"groupFilingComments": [
{
"groupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"comment": "string"
}
],
"resultFilingComments": [
{
"resultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"comment": "string"
}
],
"fulfilledInvestigationRequestIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"reportFilingComment": "string"
}'
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
reportId | string<uuid> | Yes | The investigation report to file. |
groupFilingComments | array<object> | No | Optional filing comments to attach to specific investigation groups. |
resultFilingComments | array<object> | No | Optional filing comments to attach to specific investigation results. |
fulfilledInvestigationRequestIds | array<string<uuid>> | No | IDs of investigation request items fulfilled by this report. |
reportFilingComment | string (nullable) | No | Optional free-text comment attached to the report as a whole. |
Responses
204 Investigation report filed successfully.
400 Validation error.
4 possible code values
| Code | Description | When |
|---|---|---|
invalid-report-id | The reportId is not a UUID. | reportId is missing or not a UUID |
invalid-group-id | Each groupFilingComment must contain a valid UUID groupId. | a groupFilingComments entry has an invalid groupId |
invalid-result-id | Each resultFilingComment must contain a valid UUID resultId. | a resultFilingComments entry has an invalid resultId |
invalid-investigation-request-item-id | Each fulfilledInvestigationRequestIds entry must be a valid UUID. | a fulfilledInvestigationRequestIds entry is not a UUID |
{
"errors": [
{
"code": "invalid-report-id",
"description": "The reportId is not a UUID."
}
]
}
403 Forbidden: the calling application does not have the required permission.
{
"errors": [
{
"code": "forbidden",
"description": "The calling application does not have permission to use this endpoint."
}
]
}
404 The report, a group, or a result was not found.
3 possible code values
| Code | Description | When |
|---|---|---|
investigation-report-not-found | Investigation report not found for this reportId. | no report exists for the given reportId |
investigation-group-not-found | Investigation group not found or does not belong to this report. | a groupId does not exist or does not belong to this report |
investigation-result-not-found | Investigation result not found or does not belong to this report. | a resultId does not exist or does not belong to this report |
{
"errors": [
{
"code": "investigation-report-not-found",
"description": "Investigation report not found for this reportId."
}
]
}
409 The report exists but is not in PENDING status.
{
"errors": [
{
"code": "investigation-report-not-pending",
"description": "This investigation report is not in PENDING status and cannot be filed."
}
]
}
422 The report contains free-text results and cannot be filed via this API.
{
"errors": [
{
"code": "investigation-report-has-text-results",
"description": "This investigation report contains free-text results and cannot be filed via this API."
}
]
}