Skip to main content

API Errors

Every error response from the IaaS APIs has the same body. The HTTP status and the code tell you what happened; the code prefix tells you in which area.

Error body format​

FieldTypeDescription
titlestringShort name of the error, in English.
descriptionstringDescription in English. In validation errors, it names the field that failed.
translationstringDescription in Portuguese.
codestringThree letters indicating the area, followed by six digits. Use this field in your error handling.

Example: a manager integration without the write permission calling a POST.

{
"title": "Manager does not have permission to access this endpoint",
"description": "Manager does not have permission to access this endpoint",
"translation": "Gestor nao tem permissão para acessar esse endpoint",
"code": "MIT000017"
}

Handle the error by the HTTP status and the code. The title, description and translation texts may change.

code prefix​

PrefixWhere the error happened
MITManager host (manager-api): authentication, permission and routing.
CITConsultant host (consultant-api): authentication, permission and routing.
AITAssignor host (assignor-api): authentication, permission and routing.
QITGeneric error, on any host or service: nonexistent route, method not accepted, invalid body, internal error.
SETAsset settlement (/settlement).
TRCReceivables assignment (/trade_receivables).
TRFAssignment files (/trade_receivables_files).
TRRAsset sale and repurchase (/trade_resolve).
TTRPublic Securities Recorder (/trade_treasury).
ASRAssignor onboarding (/assignor_registry).
ASSAssignors (/assignor).
ACTAssignment contract (/assignment_contract).
AAMReceivables amendment (/asset_amendment).
ADFAsset documents (/asset_document_files).
BSCBankslips (/bankslip_collection).
CSHAccounts and statement (/cash_account).
TSFInternal transfer (/transfer).
TRVTransaction reversal (/transaction_reversal).
CMPPortfolio composition (/composition).
WLTPortfolio (/wallet).
EXPExpenses (/expense).
IVRInvestor registration (/investor_registry).
IADAdhesion term (/investor_adhesion).
QTAQuotas (/quota).
QOFOffering control (/quota_offering_control).
TFQFund quotas as assets (/trade_fund_quota).

A 400 with code QIT000001 means an invalid request body: the field with the problem comes in description.

Authentication​

Header, API key and signature errors (*000007 to *000016 and *000020), and how to fix each one, are in Authentication Test.

Permission and route​

After authenticating the request, the host checks whether your integration can call that route. A missing permission comes back as 401, not 403: do not look for a signature error when the code is one of these.

StatuscodeWhen it happensWhat to do
401MIT000017The manager integration does not have the permission the route requires: Read, Write or both.Check the permission in the "Available on" block of the endpoint page and the status under Permissions, on the integration screen. See integration permission grant.
401CIT000018The consultant has no active link with the fund (fund_class_key) or does not have, in that fund, the permission the route requires.Check the fund_class_key and the permission shown in "Available on". Consultant permissions are granted per fund. If the permission shows as Granted by the integration team, it cannot be configured in the portal: request it at integracao.dtvm@qitech.com.br.
401AIT000017The assignor integration does not have the read or write permission the route requires.Contact integracao.dtvm@qitech.com.br.
400*000009The integration is deactivated.Reactivate the integration (how) or contact the integration team.
404QIT000404The host does not expose that path.On a documented route, it is almost always another profile's base URL: check the "Available on" block of the page and the base URL for your profile. Also check the path, without the base_url.
405QIT000405The path exists on the host, but not with that method.Check the method on the endpoint page.

Retry and duplicates​

In case of error, resend the request. If the resource already exists, the creation returns a duplicate error instead of creating another one: look up the existing resource.

CreationDuplicate codeStatusHow to look up the existing resource
Payment batch (settlement)SET000009409Batch retrieval, by the batch external_id.
Settlement within a batchSET000013400Settlement retrieval, by the settlement external_id.
Sale or repurchase batchTRR000015409GET /trade_resolve/fund_class/{fund_class_key}/assignment/{assignment_external_id}, exposed only on the assignor host. Manager and consultant do not have this lookup.
Public Securities Recorder ticketTTR000044409GET /trade_treasury/fund_class/{fund_class_key}/operations, looking for your external_id in the list.
Public Securities Recorder: always send external_id

In the Public Securities Recorder, external_id is optional. Always send it: without it, the API does not recognize a ticket that was already created.

Internal error​

A 500 with QIT000500 is an error on QI's side. If it persists, send the request (without the private key), the time in UTC and the code to integracao.dtvm@qitech.com.br.