Skip to main content

Analysis Documents

After creating the analysis, upload the vendor's supporting documents. At least one document is required before submitting the analysis for review.

Accepted document types
  • vendor_bylaws — Vendor's articles of association
  • representative_document — Legal representative's identification document
Initial status

Documents sent via API automatically enter with the pending_adm_approval status, awaiting QI Tech review.


Document upload​

ENDPOINT
/vendor_registry/analysis/{analysis_key}/document
METHOD
POST

Path params​

ParameterTypeDescription
analysis_keystringUnique key of the analysis (UUID)
Request Body
{
"name": "Contrato Social - AUDITORES EXEMPLO S.A.",
"document_type": "vendor_bylaws",
"document_b64": "JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwKL0xlbmd0aCAzIDAgUgo..."
}

Body attributes​

FieldTypeRequiredDescription
namestringrequiredDocument name. Maximum of 255 characters.
document_typestringrequiredDocument type: vendor_bylaws or representative_document.
document_b64stringrequiredFile content encoded in Base64.

Response​

STATUS
201
Response Body
{
"document_name": "Contrato Social - AUDITORES EXEMPLO S.A.",
"document_key": "d4e5f6a7-b8c9-0123-def4-567890abcdef",
"document_type": "vendor_bylaws",
"analysis_key": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"status": "pending_adm_approval"
}

Response attributes​

FieldTypeDescription
document_namestringDocument name.
document_keystringUnique key of the document (UUID).
document_typestringDocument type: vendor_bylaws or representative_document.
analysis_keystringKey of the analysis the document belongs to.
statusstringDocument status. Always returns pending_adm_approval.

List the documents of an analysis​

ENDPOINT
/vendor_registry/analysis/{analysis_key}/documents
METHOD
GET

Path params​

ParameterTypeDescription
analysis_keystringUnique key of the analysis (UUID)

Response​

STATUS
200
Response Body
{
"data": [
{
"document_name": "Contrato Social - AUDITORES EXEMPLO S.A.",
"document_key": "d4e5f6a7-b8c9-0123-def4-567890abcdef",
"document_type": "vendor_bylaws",
"analysis_key": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"status": "pending_adm_approval"
},
{
"document_name": "RG - João da Silva",
"document_key": "e5f6a7b8-c9d0-1234-ef56-7890abcdef12",
"document_type": "representative_document",
"analysis_key": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"status": "approved"
}
]
}

Response attributes​

FieldTypeDescription
dataarrayList of documents of the analysis.
data[].document_namestringDocument name.
data[].document_keystringUnique key of the document (UUID).
data[].document_typestringDocument type.
data[].analysis_keystringKey of the analysis.
data[].statusstringDocument status: pending_adm_approval, approved or rejected.

Query document by key​

Retrieve the data of a specific document, including the download URL.

ENDPOINT
/vendor_registry/analysis/{analysis_key}/documents/{document_key}
METHOD
GET

Path params​

ParameterTypeDescription
analysis_keystringUnique key of the analysis (UUID)
document_keystringUnique key of the document (UUID)

Response​

STATUS
200
Response Body
{
"document_name": "Contrato Social - AUDITORES EXEMPLO S.A.",
"document_key": "d4e5f6a7-b8c9-0123-def4-567890abcdef",
"document_type": "vendor_bylaws",
"analysis_key": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"status": "approved",
"document_url": "https://storage.example.com/documents/d4e5f6a7-b8c9-0123-def4-567890abcdef?X-Amz-Expires=86400&..."
}

Additional attributes​

FieldTypeDescription
document_urlstringPre-signed URL to download the file. Valid for 24 hours.

Possible errors​

STATUS
404
Analysis not found

The analysis_key provided in the URL does not correspond to any registered analysis.

{
"title": "Analysis not found",
"description": "Analysis with the key {analysis_key} was not found.",
"translation": "A análise com a chave {analysis_key} não foi encontrada.",
"code": "VRG000007"
}
Document not found

The document_key provided in the URL does not correspond to any document of this analysis.

{
"title": "Document not found",
"description": "Document with the key {document_key} was not found.",
"translation": "O documento com a chave {document_key} não foi encontrada.",
"code": "VRG000003"
}
STATUS
400
Invalid document format

The content in document_b64 is not valid Base64.

{
"title": "Invalid document format",
"description": "Invalid Document format",
"translation": "Formato do documento invalido",
"code": "VRG000004"
}

Next steps​

With at least one document sent, proceed to:

Submit the analysis — forward it for QI Tech review.