Skip to main content

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.

info

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.

Who does what:

ActionManagerConsultantAssignor
List the analysis annotationsYesYesNo (use the webhook and the query by key)
Query annotation and documentYesYesYes
AnswerPUT .../annotation/{annotation_key}PUT .../annotation/{annotation_key}PUT .../annotation/{annotation_key}/response

Paginated Annotations Query​

Retrieves the list of annotations for an analysis, allowing the agent to identify what needs to be answered.

Available on
ProfileHostRequired permission
Managermanager-apiRead
Consultantconsultant-apiView Assignors

Base URL for each host: Environments (Hosts).

The assignor does not have this listing: it receives the annotation webhook, which carries the annotation_key, and queries the annotation by key.

Request​

ENDPOINT
/assignor_registry/assignor_registry/ASSIGNOR_REGISTRY_KEY/analysis/ANALYSIS_KEY/annotations
METHOD
GET

Query params​

FieldTypeDescriptionCharacters
limitintegerObject limit per page (default 10, maximum 50).-
pageintegerDesired page (starts at 0).-

Response​

STATUS
200
Response Body
{
"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
}

Errors​

StatusCodeWhen it happens
404ASR000026The authenticated agent is not enabled in the assignor registry.
400—limit above 50 or negative page.

Authentication, permission and host errors: see API Errors.


Annotation Query by Key​

Available on
ProfileHostRequired permission
Managermanager-apiRead
Consultantconsultant-apiView Assignors
Assignorassignor-apiRead

Base URL for each host: Environments (Hosts).

Request​

ENDPOINT
/assignor_registry/assignor_registry/ASSIGNOR_REGISTRY_KEY/analysis/ANALYSIS_KEY/annotation/ANNOTATION_KEY
METHOD
GET

Response​

STATUS
200
Response Body
{
"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"
}
info

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.

Errors​

StatusCodeWhen it happens
404ASR000004assignor_registry_key not found, or the agent has no access to this assignor.
404ASR000033analysis_key not found.
404ASR000043annotation_key does not belong to the analysis indicated.

Authentication, permission and host errors: see API Errors.


Answering an Annotation​

Submits the answer to an open annotation. Optionally, you may attach a PDF document (up to 20 MB) that supports or complements the answer. Once answered, the annotation moves to closed and the annotation webhook is fired.

The manager and the consultant answer through the PUT on the annotation itself; the assignor answers through the PUT on /response. The body and the response are the same.

Available on
ProfileHostRequired permission
Managermanager-apiWrite
Consultantconsultant-apiRegister Assignor

Base URL for each host: Environments (Hosts).

Request (manager and consultant)​

ENDPOINT
/assignor_registry/assignor_registry/ASSIGNOR_REGISTRY_KEY/analysis/ANALYSIS_KEY/annotation/ANNOTATION_KEY
METHOD
PUT
Available on
ProfileHostRequired permission
Assignorassignor-apiWrite

Base URL for each host: Environments (Hosts).

Request (assignor)​

ENDPOINT
/assignor_registry/assignor_registry/ASSIGNOR_REGISTRY_KEY/analysis/ANALYSIS_KEY/annotation/ANNOTATION_KEY/response
METHOD
PUT

Request Body​

Request Body
{
"response": "Case records attached.",
"document_b64": "JVBERi0xLjQK..."
}

Answer Object​

FieldTypeDescriptionCharacters
response *stringAnswer text for the annotation.1 - 3000
document_b64stringPDF file, Base64-encoded. Up to 20 MB.-

*Required fields.

Response​

STATUS
202
Response Body
{
"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"
}

Errors​

StatusCodeWhen it happens
404ASR000004assignor_registry_key not found, or the agent has no access to this assignor.
404ASR000033analysis_key not found.
404ASR000043annotation_key does not belong to the analysis indicated.
400ASR000045The annotation is not open.
400ASR000044The annotation has already been answered. Each annotation accepts a single answer.
400ASR000005document_b64 is not valid Base64.
400ASR000060The content of document_b64 is not a PDF.
400ASR000059The PDF exceeds 20 MB.

Authentication, permission and host errors: see API Errors.


Annotation Document Query​

Retrieves a temporary URL to download the document attached to an annotation. The DOCUMENT_KEY is the annotation's attached_document_key.

Available on
ProfileHostRequired permission
Managermanager-apiRead
Consultantconsultant-apiView Assignors
Assignorassignor-apiRead

Base URL for each host: Environments (Hosts).

Request​

ENDPOINT
/assignor_registry/assignor_registry/ASSIGNOR_REGISTRY_KEY/analysis/ANALYSIS_KEY/annotation/ANNOTATION_KEY/document/DOCUMENT_KEY
METHOD
GET

Response​

STATUS
200
Response Body
{
"document_url": "https://URL_TEMPORARIA_DO_DOCUMENTO"
}
info

The document_url returned is a pre-signed URL valid for 24 hours.

Errors​

StatusCodeWhen it happens
404ASR000004assignor_registry_key not found, or the agent has no access to this assignor.
404ASR000033analysis_key not found.
404ASR000043annotation_key does not belong to the analysis indicated.
404ASR000006DOCUMENT_KEY is not the document attached to the annotation.

Authentication, permission and host errors: see API Errors.


Annotation Object​

FieldTypeDescription
annotation_keystringUnique identifier of the annotation.
analysis_keystringKey of the analysis the annotation belongs to.
assignor_registry_keystringAssignor's key.
statusstringCurrent status of the annotation. See Annotation Status.
origin_typestringOrigin of the annotation. See Annotation Origin Type.
annotation_datetimestringDate and time the annotation was created (ISO 8601).
messagestringAnnotation message recorded by the QI DTVM team.
responsestringAnswer submitted by the agent (present after the answer).
response_datetimestringDate and time of the answer (present after the answer).
attached_document_keystringKey of the document attached to the answer (when there is one).

Annotation Status​

EnumeratorDescription
openOpen and awaiting the agent's answer.
closedAnswered and closed. QI DTVM may reopen it (it goes back to open).

Annotation Origin Type​

EnumeratorDescription
complianceAnnotation originated by the Compliance team (manual analysis).
risk_analysisAnnotation originated by the Risk team.
internalAnnotation originated in the internal validation.