Compliance Annotations
During the Assignor's registration analysis, the Compliance, Risk or internal validation teams may record annotations. An annotation is a request or question addressed to the agent responsible for the registration, which must be answered for the analysis to proceed.
Whenever an annotation is created, it starts in the open status and, if configured, an Annotation Webhook is fired notifying the opening. An e-mail is also sent to the recipients configured for the agent. After the agent answers the annotation, it moves to the closed status and a new webhook is fired.
Annotations only exist while the analysis is in one of the in_manual_analysis, pending_internal_validation or in_risk_analysis statuses. Each annotation accepts only one answer.
Paginated Annotations Query
Retrieves the list of annotations for an analysis, allowing the agent to identify what needs to be answered.
Request
Query params
| Field | Type | Description | Characters |
|---|---|---|---|
limit | integer | Object limit per page (default 10, maximum 50). | - |
page | integer | Desired page (starts at 0). | - |
Response
{
"data": [
{
"annotation_key": "1f2e3d4c-5b6a-4c8d-9e0f-1a2b3c4d5e6f",
"analysis_key": "41d6ff41-1dac-4df7-9e50-d15210ec57f3",
"assignor_registry_key": "35ff6e5c-a3e7-4b04-a8be-6e49a3a906e4",
"status": "open",
"origin_type": "compliance",
"annotation_datetime": "2025-01-22T20:30:23Z",
"message": "Attach details of case XXXXXXXXXXX."
}
],
"limit": 10,
"page": 0,
"is_last_page": true
}
Treatable Errors
| Code | HTTP | Cause | How to resolve |
|---|---|---|---|
| ASR000026 | 404 | Agent not found for the AGENT-KEY provided. | Check whether the authenticated agent's key is correct. |
Annotation Query by Key
Request
Response
{
"annotation_key": "1f2e3d4c-5b6a-4c8d-9e0f-1a2b3c4d5e6f",
"analysis_key": "41d6ff41-1dac-4df7-9e50-d15210ec57f3",
"assignor_registry_key": "35ff6e5c-a3e7-4b04-a8be-6e49a3a906e4",
"status": "closed",
"origin_type": "compliance",
"annotation_datetime": "2025-01-22T20:30:23Z",
"message": "Attach details of case XXXXXXXXXXX.",
"response": "Case records attached.",
"response_datetime": "2025-01-23T14:05:11Z",
"attached_document_key": "8e515a17-8b4d-49a3-aed6-47c9574e426a"
}
The response, response_datetime and attached_document_key fields are only returned when the annotation has already been answered and/or has a document attached.
Treatable Errors
| Code | HTTP | Cause | How to resolve |
|---|---|---|---|
| ASR000026 | 404 | Agent not found for the AGENT-KEY provided. | Check whether the authenticated agent's key is correct. |
| ASR000004 | 404 | Assignor not found for the assignor_registry_key provided. | Check whether the assignor_registry_key is correct and belongs to the authenticated agent. |
| ASR000033 | 404 | Analysis not found for the analysis_key provided. | Check whether the analysis_key is correct. |
| ASR000043 | 404 | Annotation not found for the annotation_key provided. | Check whether the annotation_key belongs to the analysis indicated. |
Answering an Annotation
Submits the agent's answer to an annotation. Optionally, you may attach a PDF document that supports or complements the answer.
Request
{
"response": "Case records attached.",
"document_b64": "aGVsbG8gd29ybGQgaWYgeW91IGRlY29kZWQgbWUsIGJlIGNhcmVmdWwuIEl0IG11c3QgYmUgYSBQREYgRmlsZSBvdGhlcndpc2UgSSB3aWxsIHJhaXNlIGFuIEVycm9yLg=="
}
Answer Object
| Field | Type | Description | Characters |
|---|---|---|---|
response * | string | Answer text for the annotation. | 1 - 3000 |
document_b64 | string | Binary of the PDF file, Base64-encoded. | - |
*Required fields.
Response
{
"annotation_key": "1f2e3d4c-5b6a-4c8d-9e0f-1a2b3c4d5e6f",
"analysis_key": "41d6ff41-1dac-4df7-9e50-d15210ec57f3",
"assignor_registry_key": "35ff6e5c-a3e7-4b04-a8be-6e49a3a906e4",
"status": "closed",
"origin_type": "compliance",
"annotation_datetime": "2025-01-22T20:30:23Z",
"message": "Attach details of case XXXXXXXXXXX.",
"response": "Case records attached.",
"response_datetime": "2025-01-23T14:05:11Z",
"attached_document_key": "8e515a17-8b4d-49a3-aed6-47c9574e426a"
}
Treatable Errors
| Code | HTTP | Cause | How to resolve |
|---|---|---|---|
| ASR000026 | 404 | Agent not found for the AGENT-KEY provided. | Check whether the authenticated agent's key is correct. |
| ASR000004 | 404 | Assignor not found for the assignor_registry_key provided. | Check whether the assignor_registry_key is correct and belongs to the authenticated agent. |
| ASR000033 | 404 | Analysis not found for the analysis_key provided. | Check whether the analysis_key is correct. |
| ASR000043 | 404 | Annotation not found for the annotation_key provided. | Check whether the annotation_key belongs to the analysis indicated. |
| ASR000045 | 400 | The annotation is no longer in the open status and no longer accepts answers. | Only annotations with the open status can be answered. |
| ASR000044 | 400 | The annotation has already been answered. | Each annotation accepts only one answer. |
| ASR000005 | 400 | Invalid file format. | Send document_b64 as a valid base64 string. |
| ASR000060 | 400 | The file submitted is not a valid PDF. | The decoded content of document_b64 must be a PDF. |
| ASR000059 | 400 | File size exceeds the limit. | Reduce the PDF size before submitting (the limit is stated in the error message). |
Annotation Document Query
Retrieves a temporary URL to download the document attached to an annotation.
Request
Response
{
"document_url": "https://assignor-bucket.s3.amazonaws.com/8e515a17-8b4d-49a3-aed6-47c9574e426a?..."
}
The document_url returned is a pre-signed URL valid for 24 hours.
Treatable Errors
| Code | HTTP | Cause | How to resolve |
|---|---|---|---|
| ASR000026 | 404 | Agent not found for the AGENT-KEY provided. | Check whether the authenticated agent's key is correct. |
| ASR000004 | 404 | Assignor not found for the assignor_registry_key provided. | Check whether the assignor_registry_key is correct and belongs to the authenticated agent. |
| ASR000033 | 404 | Analysis not found for the analysis_key provided. | Check whether the analysis_key is correct. |
| ASR000043 | 404 | Annotation not found for the annotation_key provided. | Check whether the annotation_key belongs to the analysis indicated. |
| ASR000006 | 404 | Document not found for the document_key provided. | Check whether the document_key corresponds to the document attached to the annotation. |
Annotation Object
| Field | Type | Description |
|---|---|---|
annotation_key | string | Unique identifier of the annotation. |
analysis_key | string | Key of the analysis the annotation belongs to. |
assignor_registry_key | string | Assignor's key. |
status | string | Current status of the annotation. See Annotation Status. |
origin_type | string | Origin of the annotation. See Annotation Origin Type. |
annotation_datetime | string | Date and time the annotation was created (ISO 8601). |
message | string | Annotation message recorded by the QI DTVM team. |
response | string | Answer submitted by the agent (present after the answer). |
response_datetime | string | Date and time of the answer (present after the answer). |
attached_document_key | string | Key of the document attached to the answer (when there is one). |
Annotation Status
| Enumerator | Description |
|---|---|
| created | Annotation created, not yet made available. |
| open | Open and awaiting the agent's answer. |
| closed | Answered and closed. |
Annotation Origin Type
| Enumerator | Description |
|---|---|
| compliance | Annotation originated by the Compliance team (manual analysis). |
| risk_analysis | Annotation originated by the Risk team. |
| internal | Annotation originated in the internal validation. |