Submitting a Document
Submitting a Document for Standard Analysis
To start document analysis, send a POST request to the /document endpoint using the multipart/form-data format.
Endpoint: https://api.caas.qitech.app/document_analysis/document
Request Format
The request must be sent as multipart/form-data and include data fields and a file field. The required fields for an analysis are id, document_analysis_type, and document_bytes.
Request example:
curl -X POST "https://api.caas.qitech.app/document_analysis/document" \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "id=request-abc-12345" \
-F "document_analysis_type=proof_of_address_default" \
-F "document_bytes=@/path/to/your/proof.pdf"
Submission Attributes Description
| Attribute | Description |
|---|---|
| id (required) | A unique identifier for the request, provided by you. This ID can be used later to retrieve the analysis results. |
| document_analysis_type (required) | A string that specifies the type of analysis to be performed on the document. See the table below for supported types. |
| document_bytes (required) | The document file to be analyzed. Must be sent as a file in the multipart request body. Note: Do not send this field as a base64-encoded string. |
| async (optional, default=false) | A boolean (true or false) that defines the processing mode. - false (synchronous): The API will attempt to process the document and return the result in the same request. - true (asynchronous): The API will acknowledge receipt and process in the background. The result will be sent via webhook to a previously configured URL (see more in the webhooks section). |
The async field must be used to indicate an asynchronous request. Synchronous requests should only be used for small documents and quick analyses where an immediate response is critical. If the analysis does not finish within the synchronous request time limit, the return status will be 202 Accepted and the result must be retrieved with a GET request, as described below. No webhook is sent in this case: the webhook is exclusive to asynchronous analyses.
Supported Analysis Types
The document_analysis_type field determines which data extraction model will be applied to your document. Below are the types currently supported.
| Analysis Type | Document Type | Description |
|---|---|---|
proof_of_address_default | Proof of address (utility, gas and internet bills, government letters, declarations) | Extracts and validates name, structured address, raw address, issue date and document type. |
company_statute_default | Articles of association or company statute | Basic extraction and validation: company data, share capital, registration office and partnership structure. |
company_statute_credit_right_assignment | Articles of association or company statute | Advanced extraction with validation of signing authority for credit rights assignment: signer groups, financial limits and whether human review is required. |
power_of_attorney_default | Power of attorney | Extracts grantors, grantees, powers granted, scope, expiration, irrevocability and notary data. |
invoice_default | Invoices and DANFEs | Extracts issuer, contracting party, invoice type and taxation, number, dates, line items and amounts. |
bankslip_default | Bank slips | Extracts payee, payee CNPJ, barcode, amount and due date. |
ccb_default | Bank Credit Notes (CCB) | Extracts contract number, issuer data, guarantees, financed amount, interest rate, installments and due dates. |
portability_retention_evidence_analysis | Portability retention evidence | Validates the evidence: contract number, issuer document and phone, portability number, presence of a signature and whether it is a valid confirmation. |
Expand each type below to see the fields the analysis returns in analysis_result, with the type and meaning of each one. Nested fields are shown with their full path (address.street) and lists are marked with [].
proof_of_address_default — fields returned in analysis_result
| Field | Type | Description |
|---|---|---|
name | string | The full name of the individual as extracted from the document. |
address | object | The structured residential address as extracted from the document. If some information is not found, indicate with empty string. |
address.street | string | The name of the street as extracted from the document. |
address.number | string | The building or house number as extracted from the document. |
address.complement | string | Additional address details like apartment, suite, or floor, if any. |
address.neighborhood | string | The neighborhood or district as extracted from the document. |
address.city | string | The city of the address as extracted from the document. |
address.state | string | The state or federal district of the address. |
address.cep | string | The postal code (CEP) of the address. |
raw_address | string | The complete residential address as extracted from the document. |
issue_date | string | The issue date of the document in YYYY-MM-DD format. |
document_type | enum: utility_bill, bank_statement, address_declaration, rental_agreement, government_letter … | The type of document provided (e.g., 'utility_bill', 'address_declaration', 'other'). |
company_statute_default — fields returned in analysis_result
| Field | Type | Description |
|---|---|---|
company_name_official | string | Full Official Company Name |
company_name_trade | string | Trade Name |
cnpj | string | Brazilian Company Tax ID in XX.XXX.XXX/XXXX-XX format |
nire | string | Company Registry Identification Number |
headquarters_address_full | string | Full headquarters address |
incorporation_date | string | Company incorporation date |
last_consolidated_amendment_date | string | Date of the last consolidated amendment |
corporate_purpose_summary | string | Main corporate purpose |
share_capital_value | number | TOTAL value of the Share Capital |
share_capital_currency | string | Currency of the share capital (e.g., 'BRL') |
registration_office_name | string | Name of the registration office (e.g., JUCESP) |
registration_office_number | string | Registration number at the competent authority |
registration_office_date | string | Date of registration/filing at the competent authority |
requires_power_of_attorney_check | boolean | True if signing powers are unclear or if 'procuração' is mentioned, indicating a need to check for an additional document |
partners_data[] | object | A model representing a single partner's data extracted from the Articles of Incorporation. |
partners_data[].name | string | Partner's full name |
partners_data[].cpf | string | Partner's CPF in XXX.XXX.XXX-XX format |
partners_data[].is_administrator | boolean | True if the partner is explicitly named as an administrator |
partners_data[].role_powers | string | Position or powers, ONLY IF the partner is an administrator |
partners_data[].share_quantity | integer | Number of shares/quotas held by the partner |
partners_data[].share_value | number | Total value in BRL of the shares/quotas |
partners_data[].participation_percentage | number | Partner's participation percentage in the company |
clauses_of_interest | object | A model for specific clauses of interest from the document. |
clauses_of_interest.administration_clause_summary | string | Summary of the clause defining who represents and signs for the company |
company_statute_credit_right_assignment — fields returned in analysis_result
| Field | Type | Description |
|---|---|---|
requires_review | boolean | Whether the document is complex, contains many clauses or sub-clauses about administration, or requires other documents alongside it (such as meeting or election minutes). |
company_data | object | Complete registration and ownership data of the analysed entity. |
company_data.company_name_official | string | Full official company name |
company_data.company_name_trade | string | Trade name |
company_data.cnpj | string | CNPJ in XX.XXX.XXX/XXXX-XX format |
company_data.nire | string | NIRE — company registry identification number |
company_data.headquarters_address_full | string | Full headquarters address |
company_data.incorporation_date | string | Company incorporation date |
company_data.last_consolidated_amendment_date | string | Date of these articles of association or of the amendment |
company_data.corporate_purpose_summary | string | Main corporate purpose |
company_data.share_capital_value | number | TOTAL value of the share capital |
company_data.share_capital_currency | string | Currency of the share capital (e.g. 'BRL') |
company_data.registration_office_name | string | Name of the registration office (e.g. JUCESP) |
company_data.partners_data[] | object | Data of a single partner extracted from the articles of association. |
company_data.partners_data[].name | string | Partner's full name |
company_data.partners_data[].cpf | string | Partner's CPF in XXX.XXX.XXX-XX format |
company_data.partners_data[].cnpj | string | CNPJ of the partner company, when the partner is a legal entity, in XX.XXX.XXX/XXXX-XX format |
company_data.partners_data[].is_representative | boolean | True when the partner may represent the company. |
company_data.partners_data[].role_powers | enum: president, partner, administrator, director, manager … | Position or powers. Use 'other' when it refers to a company, organisation or similar. |
company_data.partners_data[].share_quantity | integer | Number of shares or quotas held by the partner |
company_data.partners_data[].share_value | number | Total value of the shares or quotas |
company_data.partners_data[].participation_percentage | number | Partner's participation percentage in the company |
analyzed_operation | string | The specific legal act or transaction whose representation is being analysed. |
source_documents[] | string | Corporate documents underpinning the analysis (e.g. 'Articles of Association', 'Election Minutes'). |
allows_proxies | boolean | Whether the entity's articles allow representation through attorneys-in-fact. |
signer_groups[] | object | The different signing groups and rules valid for the entity. |
signer_groups[].group_id | integer | A unique numeric identifier for the signing group. |
signer_groups[].description | string | A clear summary of the business rule this group represents. |
signer_groups[].source_clause | string | The full text of the clause or article establishing this rule. |
signer_groups[].representation_type | enum: Conjunta, Individual, Conforme Mandato | Whether representation is joint or individual. When both are allowed, use individual. |
signer_groups[].minimum_signers | integer | The minimum number of members of this group who must sign. For joint signing this value must be greater than 1. |
signer_groups[].limitations | object | The conditions and restrictions applicable to this signing rule. |
signer_groups[].limitations.financial_limit | object | The financial authority limit of the rule, in structured form. |
signer_groups[].limitations.financial_limit.operator | enum: MENOR_IGUAL, MAIOR_QUE, MAIOR, MENOR, IGUAL … | The comparison operator for the financial limit. |
signer_groups[].limitations.financial_limit.value | number | The monetary value of the limit. |
signer_groups[].limitations.financial_limit.currency | string | The currency code of the value (e.g. BRL, USD). |
signer_groups[].limitations.observations | string | Additional notes or comments on the interpretation or application of the rule. |
signer_groups[].members[] | object | The positions that may make up the signing group. |
signer_groups[].members[].position | enum: president, partner, administrator, director, manager … | Position or powers. Use 'other' when it refers to a company, organisation or similar. |
signer_groups[].members[].full_name | string | The full name of the individual holding the position, when identified. |
signer_groups[].members[].cpf | string | The individual's CPF, when available. |
signer_groups[].members[].mandate_end_date | string | The expiration date of the mandate (e.g. 'YYYY-MM-DD'). |
signer_groups[].members[].is_qualified | boolean | Whether the person holding the position is identified in the document. |
signer_groups[].members[].is_required | boolean | Whether this member's presence is mandatory. |
power_of_attorney_default — fields returned in analysis_result
| Field | Type | Description |
|---|---|---|
grantors[] | object | List of grantors (Outorgantes) — at least one required |
grantors[].name | string | Grantor's full name (Outorgante) |
grantors[].cpf | string | Grantor's CPF in XXX.XXX.XXX-XX format (for individuals) |
grantors[].cnpj | string | Grantor's CNPJ in XX.XXX.XXX/XXXX-XX format (for legal entities) |
grantees[] | object | List of grantees (Outorgados) — at least one required |
grantees[].name | string | Grantee's full name (Outorgado) |
grantees[].cpf | string | Grantee's CPF in XXX.XXX.XXX-XX format (for individuals) |
grantees[].cnpj | string | Grantee's CNPJ in XX.XXX.XXX/XXXX-XX format (for legal entities) |
powers_granted | string | Description of powers being granted by this Power of Attorney |
power_scope | string | Scope or limitations of the granted powers, if specified |
expiration_date | string | Date when the powers expire; null means indefinite validity |
is_irrevocable | boolean | True if the Power of Attorney is explicitly stated as irrevocable |
revocation_clause | string | Text of the revocation clause, if present |
notary_name | string | Name of the notary office (cartório) where the document was registered |
notary_registration_number | string | Registration or book number at the notary office |
notary_date | string | Date of notarization at the cartório |
document_date | string | Date the Power of Attorney was signed |
purpose | string | Stated purpose of the Power of Attorney (e.g., represent in court, manage bank accounts) |
invoice_default — fields returned in analysis_result
| Field | Type | Description |
|---|---|---|
company_name | string | Company's legal name |
cnpj | string | Brazilian National Register of Legal Entities (CNPJ) |
invoice_type | enum: Documento fiscal eletrônico de serviços, Documento fiscal eletrônico de produto | Type of Nota Fiscal (Invoice) - Product or Service |
taxation_type | string | Type of Taxation |
invoice_issue_date | string | Date of Invoice Issuance |
invoice_number | string | Invoice Number |
contracting_company | string | Contracting Company |
invoice_description | string | Description of the Invoice |
invoice_value | number | Value of the Invoice |
items[] | object | List of items on the invoice |
items[].code | string | Item Code (NCM/SH). |
items[].description | string | Item Description |
items[].quantity | integer | Quantity of Item |
items[].value | number | Value of Item |
rps_code | string | RPS Code (Receipt for Services) |
access_key | string | Access Key (chave de acesso) for invoices of products |
bankslip_default — fields returned in analysis_result
| Field | Type | Description |
|---|---|---|
beneficiary_cnpj | string | Beneficiary's CNPJ |
beneficiary_company_name | string | Beneficiary's Legal Name |
boleto_barcode | string | Barcode of the Boleto (Payment Slip) |
due_date | string | Due Date |
value | number | Value of the Bill |
ccb_default — fields returned in analysis_result
| Field | Type | Description |
|---|---|---|
contract_number | string | CCB number |
issuer_document | string | Issuer's CPF or CNPJ |
issuer_cep | string | Issuer's postal code (CEP) |
guarantee_chassis | string | Chassis of the vehicle given as collateral, when applicable |
invoice_total_value | number | Total invoice amount, when applicable |
annual_interest_rate | number | Fixed annual interest rate, as a percentage |
financed_amount | number | Total amount financed in the CCB |
total_installments | integer | Total number of installments |
first_due_date | string | Due date of the first installment |
last_due_date | string | Due date of the last installment (see the payment schedule) |
has_signature | boolean | Whether the document carries a valid signature, physical or digital |
is_valid_contract | boolean | Whether the document sent is in fact a Bank Credit Note (CCB) |
portability_retention_evidence_analysis — fields returned in analysis_result
| Field | Type | Description |
|---|---|---|
contract_number | string | Contract number |
issuer_document_number | string | Borrower's CPF |
issuer_phone_number | string | Borrower's phone number |
portability_number | number | Portability number |
has_signature | boolean | Whether the document, especially a CCB, contains electronic signature elements such as a hash, verification code, QR code or an authentication page. |
is_valid_evidence | boolean | Whether the document is an acceptable type of evidence, such as a text conversation or a Bank Credit Note (CCB). |
is_confirmation | boolean | Whether the evidence confirms cancellation of the portability. TRUE when the customer explicitly states cancellation or does not recognise the portability request, OR when the evidence is a signed CCB (has_signature: true). FALSE when it is not a conversation, OR the conversation does not indicate cancellation or non-recognition. This value is always TRUE or FALSE. |
For analysis types not listed here, contact our support team at suporte.caas@qitech.com.br to inquire about custom implementations.
File Formats and Limits
The document_bytes field accepts the formats below. The real file type is verified from its content, not from the extension or the declared Content-Type — sending a .jpg labelled as application/pdf results in DOC00202.
| Format | Maximum size | Notes |
|---|---|---|
| 30 MB | Up to 350 pages (DOC00203). Password-protected PDFs are rejected (DOC00305). | |
| JPEG | 30 MB | |
| PNG | 10 MB |
Responses
Success Response (200 OK)
For a synchronous analysis completed successfully, the API returns HTTP 200 OK with the body below. The envelope fields are always the same; what varies per document_analysis_type is the content of analysis_result.
{
"id": "request-abc-12345",
"document_analysis_type": "proof_of_address_default",
"validation_status": "valid",
"file_metadata": { "file_type": "pdf" },
"analysis_result": { "...": "extracted fields, vary per analysis type" },
"feedback_data": null
}
| Field | Description |
|---|---|
id | The same identifier you sent in the request. |
document_analysis_type | The analysis type applied. |
validation_status | Validation outcome. See the possible values below. |
file_metadata | Metadata of the received file, such as the detected type. |
analysis_result | The extracted data. Empty ({}) when the analysis was not completed. |
feedback_data | Feedback you have registered for this document, if any. |
validation_status values
| Value | Meaning |
|---|---|
valid | Analysis completed successfully. |
pending | Still processing. |
missing_information | The document is missing required information. |
bad_quality | Document quality is insufficient for analysis. |
invalid_data | The document contains invalid or inconsistent data. |
incorrect_document_type | The content does not match the requested analysis type. |
parsing_error | The analysis result could not be parsed. |
analysis_failed | The analysis could not be completed by the model. |
Accepted Response (202 Accepted)
If the document is processed asynchronously, the API will return an HTTP 202 Accepted status and the request will be processed asynchronously. After a short time you can retrieve the document analysis using a GET request, as described below.
Error Response (4xx)
If there is a problem with the request or the document, the API will return a 4xx status code with a JSON body describing the error.
Error Code Reference
The following tables list all possible error codes returned by the API. You can use these codes to implement robust error handling in your application.
Category 1: Request Errors (DOC001xx)
| Code | Title | Description |
|---|---|---|
DOC00100 | Missing required field | The request does not contain a required field in the multipart/form-data body. |
DOC00101 | Invalid field length | The length of a value in a form-data field is invalid. |
DOC00102 | Invalid content type at request | The request Content-Type header is not multipart/form-data. |
DOC00103 | Invalid field at request | The request contains an unexpected or invalid field in the form-data body. |
Category 2: File Processing Errors (DOC002xx)
These errors occur when the file itself has issues that prevent its processing.
| Code | Title | Description |
|---|---|---|
DOC00200 | Invalid Document Analysis Type | The document_analysis_type is not valid for the document sent. (e.g. a company_statute_default analysis from a utility bill.) |
DOC00201 | Invalid File Size | The size of the document sent exceeds the maximum allowed limit. |
DOC00202 | Invalid File Type | The file could not be processed due to inconsistencies in its type or format (e.g. a .jpg file was sent with type application/pdf). |
DOC00203 | PDF exceeds page limit | The provided PDF file contains more pages than the maximum limit allowed for processing (the current limit is 350 pages). |
Category 3: Document Analysis Errors (DOC003xx)
These errors occur during the data extraction and analysis phase, after the file has been successfully opened.
| Code | Title | Description |
|---|---|---|
DOC00300 | Missing Information | The document does not contain the essential information required for the analysis to be completed. |
DOC00301 | Bad Quality | The document quality (e.g. resolution, legibility, sharpness) is too low to be analyzed accurately. |
DOC00302 | Invalid Data | The document contains inconsistent or invalid data (e.g. incorrect checksums, contradictory fields). |
DOC00303 | Incorrect Document Type | The document content does not match the expected document type for the selected document_analysis_type. |
DOC00304 | Invalid PDF File | The provided file is not a valid or well-formed PDF and could not be opened. |
DOC00305 | Password Protected PDF | The submitted PDF is encrypted with a password and cannot be processed. |
DOC00306 | Parsing Error | The document analysis could not be processed. |
Category 4: Service Failures (DOC005xx)
These errors indicate a failure on our side, not with your document or your request. They are returned with an HTTP 5xx status and the recommended action is to retry the request.
| Code | Title | HTTP Status | Description |
|---|---|---|---|
DOC00500 | Analysis Failed | 503 | The analysis could not be completed. Please try again; if the problem persists, contact support. |
Retrieve a Document Analysis
You can retrieve the results of a previously submitted document analysis at any time using its unique id.
https://api.caas.qitech.app/document_analysis/document/{document_id}
Replace document_id with the same value you used for the POST request.
Register feedback for an analysis
You can register feedback about the quality of an analysis, which helps us improve the models. Send a POST to the endpoint below using the same id from the original request.
POST https://api.caas.qitech.app/document_analysis/document/{document_id}/feedback
curl -X POST "https://api.caas.qitech.app/document_analysis/document/request-abc-12345/feedback" \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"event_date": "2026-09-02T14:30:00",
"feedback_data": { "incorrect_field": "issue_date", "correct_value": "2026-07-20" }
}'
| Attribute | Description |
|---|---|
event_date (required) | Date and time of the feedback. |
feedback_data (required) | Free-form object with the feedback content. |
The registered feedback is then returned in the feedback_data field when you retrieve the analysis. It can also be read with a GET on the same endpoint.