Skip to main content

Asset Query

Endpoints to query the assets inserted in an assignment batch. There are two query modes: the paginated listing of all assets in a batch, and the individual retrieval of a specific asset.

When to use

Use these endpoints to track asset statuses after insertion, verify which were approved or denied in eligibility, and check the denial reasons when applicable.

The listing accepts filters — including by status — which lets you query only the denied assets directly, without paginating through the whole batch. See Retrieving only the denied assets.

Asset listing​

Returns the paginated list of the assets in a batch, with filter support. The response returns only the assets your profile can see.

Available on
ProfileHostRequired permission
Managermanager-apiRead
Consultantconsultant-apiView Assignments

Base URL for each host: Environments (Hosts).

Request​

ENDPOINT
/trade_receivables/fund_class/{fund_class_key}/assignment/{assignment_external_id}/assets
METHOD
GET

Query params​

All filters are optional and can be combined with one another. When no filter is provided, the route returns every asset of the batch.

ParameterTypeDefaultDescription
pageinteger0Page number (starts at 0).
limitinteger10Number of records per page. Maximum: 100.
statusstring—Filters by an asset status. Accepts a single value, which must be one of the status enumerators. Use denied to retrieve only the denied assets.
external_idstring—Filters by the asset external_id provided at creation.
contract_numberstring—Filters by the operation's contract number.
invoice_access_keystring—Filters by the invoice access key (duplicatas and CT-e).
invoice_numberstring—Filters by the invoice number.
invoice_seriestring—Filters by the invoice series.
borrower_document_numberstring—Filters by the debtor's CPF/CNPJ (drawee or borrower, depending on the asset type).
purchase_value_minnumber—Minimum purchase value of the asset (inclusive).
purchase_value_maxnumber—Maximum purchase value of the asset (inclusive).
maturity_date_startstring (YYYY-MM-DD)—Start maturity date of the range.
maturity_date_endstring (YYYY-MM-DD)—End maturity date of the range.
Example — simple listing
GET /trade_receivables/fund_class/{fund_class_key}/assignment/{assignment_external_id}/assets?page=0&limit=10
Example — combined filters
GET /trade_receivables/fund_class/{fund_class_key}/assignment/{assignment_external_id}/assets?status=denied&limit=100&maturity_date_start=2024-01-01&maturity_date_end=2024-12-31
Invalid status

If the value sent in status does not match any valid enumerator, the request returns TRC000163 (400). Check the enumerator table before assembling the filter.

Response​

STATUS
200
Response Body
{
"data": [
{
"asset_key": "f4348106-01c4-4c59-a261-7c09db811c47",
"external_id": "e292656f-f7fb-44dc-96f3-667c36c88442",
"total_purchase_value": 1231.21,
"asset_type": "duplicata_mercantil",
"status": "denied",
"duration": 9177,
"denied_by": "document",
"denial_reason": "Invalid documents"
}
],
"limit": 10,
"page": 0,
"is_last_page": true
}

Response attributes​

FieldTypeDescription
dataarrayList of asset objects. See table below.
pageintegerCurrent page number.
limitintegerNumber of records per page.
is_last_pagebooleanIndicates whether this is the last page of results.

Attributes of each asset (objects within data)​

FieldTypeDescription
asset_keystringUnique asset identifier (UUID).
external_idstringExternal key provided by the partner at creation.
total_purchase_valuenumberTotal purchase value of the asset.
asset_typestringAsset type (e.g., ccb, duplicata_mercantil, discounted_contract).
ipoc_codestringIPOC code of the asset, when available.
purchase_irrnumberPurchase rate of the asset, when calculated.
contract_numberstringContract number, when available.
premiumsarrayAsset premiums (premium_type, total_value). Absent when there are none.
deductionsarrayAsset discounts (deduction_type, total_value). Absent when there are none.
statusstringCurrent asset status. See the status table below.
durationintegerAsset duration in days. May not be present if not yet calculated.
denied_bystringSource of the denial. Present only when the asset was denied. See the sources table.
denial_reasonstringDescription of the denial reason. Present only when there is denial detail.
denial_translationstringTranslation of the reason, when available.
denial_descriptionstringComplementary description of the reason, when available.
Nested objects

Depending on the asset type, the response includes the credit_operation object (CCB), discounted_credit_right (duplicatas, CT-e, discounted contracts) or contract (installment contracts), with the data submitted at creation and the originator object.

Retrieving only the denied assets​

This is the most common use of the listing: finding out which contracts in the batch were denied, so you can reflect QI Tech's decision in the partner's internal controls and decide whether any asset needs to be removed from the batch.

Just provide status=denied:

Request
GET /trade_receivables/fund_class/{fund_class_key}/assignment/{assignment_external_id}/assets?status=denied&limit=100

The response returns only the denied assets, each with denied_by (the source of the denial) and denial_reason (the description):

Response Body
{
"data": [
{
"asset_key": "f4348106-01c4-4c59-a261-7c09db811c47",
"external_id": "e292656f-f7fb-44dc-96f3-667c36c88442",
"total_purchase_value": 1231.21,
"asset_type": "ccb",
"status": "denied",
"duration": 9177,
"denied_by": "eligibility",
"denial_reason": "Prazo do contrato acima do permitido pela política do fundo"
}
],
"limit": 100,
"page": 0,
"is_last_page": true
}
Usage recommendations
  • Use limit=100 (the maximum allowed) to reduce the number of pages, and paginate until is_last_page is true.
  • Query it after receiving the pending_manager_approval webhook — at that point the eligibility analysis of every asset is complete and the list of denied assets is stable.
  • For the opposite — the assets approved in eligibility — use status=pre_approved.

Denial sources (denied_by)​

ValueMeaning
eligibilityDenied in the eligibility analysis.
documentDenied in the validation of the submitted documents.
inconsistencyDenied due to an inconsistency in the operation data identified during validation.
invalid_invoiceDenied in the invoice validation.
registryDenied in the asset registration process.
termDenied at the Assignment Term stage.
managerDenied/removed by an action of the fund manager.
consultantDenied/removed by an action of the consultant.
assignorDenied/removed by an action of the assignor.
accounting_closeDenied due to the fund's accounting close.
denial_fileDenied by a denial file processed in batch.

Individual asset retrieval​

Returns the complete data of a specific asset in the batch, with the status history and the submitted documents.

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

Base URL for each host: Environments (Hosts).

Request​

ENDPOINT
/trade_receivables/fund_class/{fund_class_key}/assignment_configuration/{assignment_configuration_key}/assignment/{assignment_external_id}/asset/{asset_external_id}
METHOD
GET

Path params​

ParameterTypeDescription
asset_external_idstringThe external_id provided at asset creation.

Response​

STATUS
200
Response Body
{
"asset_key": "074f8786-447f-4524-9f4f-a5cf8a890bb4",
"external_id": "acfbc329-4e67-40ea-bd8d-5debdaebe144",
"total_purchase_value": 1231.21,
"asset_type": "duplicata_mercantil",
"status": "denied",
"duration": 9184,
"denied_by": "document",
"denial_reason": "Invalid documents"
}

Response attributes​

The response has the same structure as each object in the data array returned by the asset listing, plus:

FieldTypeDescription
status_eventsarrayAsset status history: status, event_datetime (UTC) and, for denials, denial_reason and denial_metadata.
documentsarrayDocuments submitted for the asset.

Asset status enumerators​

Any of the values below can be used in the listing's status filter.

StatusDescription
createdAsset created, not yet submitted to analysis.
pending_eligibilityAsset inserted, awaiting eligibility analysis.
pending_documentationAsset approved in eligibility, awaiting document submission.
pending_invoice_validationAwaiting invoice validation.
pre_approvedAsset pre-approved in individual eligibility.
pending_registryAwaiting the start of the asset registration.
pending_external_registryAwaiting registration with an external clearinghouse.
sending_to_registryBeing sent to the registration clearinghouse.
waiting_registryRegistration submitted, awaiting the clearinghouse response.
pending_formalizationAsset formalized and able to proceed in the batch.
registry_deniedAsset registration refused by the clearinghouse.
sending_to_walletBeing added to the fund's portfolio.
deniedAsset denied. Check denied_by for the source of the denial.
discardedAsset discarded from the batch.
pending_after_assignment_documentationAsset added to the portfolio, awaiting post-assignment documents.
pending_deferred_registryAwaiting post-assignment registration (deferred registration).
completedAsset added to the fund's portfolio.

Errors​

StatusCodeWhen it happens
400TRC000163Listing: status value that is not an asset status.
400—Listing: limit above 100 or negative page (parameter validation).
404TRC000020Individual retrieval: no asset with that asset_external_id in the batch.

Authentication, permission and host errors: see API Errors.