Asset Creation — Invoice (Duplicata)
Endpoint to insert a Invoice asset into an assignment batch. There are two accepted subtypes: Commercial Invoice (duplicata_mercantil) — linked to a merchandise sales invoice — and Service Invoice (duplicata_servicos) — linked to a service provision invoice.
Both types use the same request body structure. The main difference is that commercial invoices do not require document submission after eligibility, while service invoices do. See the Document Insertion page for more details.
This is the 2nd step of the assignment flow. Before this, you must have created the batch. After inserting assets, submit the required documents and close the insertion.
The external_id field of the credit right must be unique for each asset and must not be confused with the external_id of the batch.
Request
{
"asset_type": "duplicata_mercantil",
"total_purchase_value": 1231.21,
"discounted_credit_right": {
"external_id": "ccf6f331-d55f-46c0-a32f-fb909884dbb2",
"originator_document_number": "46.282.154/0001-14",
"maturity_date": "2023-12-10",
"order_number": "18923619954796912",
"face_value": 1023.01,
"person_type": "natural_person",
"borrower": {
"name": "Natália Nascimento",
"document_number": "805.359.140-08",
"person_type": "natural_person",
"email": "natalia.nascimento@yopmail.com",
"address": {
"street": "Gilberto Sabino",
"number": "215",
"neighborhood": "Pinheiros",
"city": "São Paulo",
"postal_code": "05425-020",
"uf": "SP",
"country": "BRA"
},
"phone": {
"area_code": "11",
"number": "36360268"
},
"natural_person": {
"mother_name": "Lívia Santos",
"birthdate": "2001-01-05"
}
},
"participant_control_number": "ICX841HWCPUGU4U101XPLDW8D",
"bankslip": {
"our_number": {
"number": 2,
"digit": "P"
}
},
"delay": {
"fine": {
"fine_type": "percentage",
"percentage_value": 0.0
},
"interest": {
"method": "pre_fixed",
"pre_fixed": {
"daily_rate": 0.0,
"calendar_base": "calendar_360"
}
}
},
"invoice": {
"access_key": "69037229347091328617032722238810300308237163",
"total_value": 1231.21,
"serie": "123",
"number": "958431587",
"issue_date": "2023-10-10"
}
}
}
Body attributes
| Field | Type | Required | Description |
|---|---|---|---|
asset_type | string | required | Asset type. Accepted values: duplicata_mercantil or duplicata_servicos. |
total_purchase_value | number | required | Total asset purchase value — the effective amount the assignee will pay. Up to 2 decimal places. |
discounted_credit_right | object | required | Credit right data. See discounted_credit_right attributes. |
discounted_credit_right attributes
| Field | Type | Required | Description |
|---|---|---|---|
external_id | string | required | Unique identifier for this asset in the partner's system. Maximum 50 characters. |
originator_document_number | string | required | Formatted CPF or CNPJ of the originator/consultant who facilitated the operation. |
maturity_date | string | required | Maturity date in YYYY-MM-DD format. |
order_number | string | required | Order number. Maximum 45 characters. |
face_value | number | required | Face value. Up to 8 decimal places. |
person_type | string | optional | Borrower person type (natural_person or legal_person). |
borrower | object | required | Borrower data. See borrower attributes on the CCB Asset Creation page. |
participant_control_number | string | optional | Participant control number in the partner's system. Maximum 50 alphanumeric characters. |
bankslip | object | optional | Bank slip data. See bankslip attributes. |
delay | object | optional | Late fine and interest data. See delay attributes on the CCB Asset Creation page. |
invoice | object | required | Invoice data. See invoice attributes. |
bankslip attributes
| Field | Type | Required | Description |
|---|---|---|---|
our_number | object | optional | Our number data. Applicable only when the number is issued by the client. See our_number attributes. |
our_number attributes
| Field | Type | Required | Description |
|---|---|---|---|
number | number | required | Our number. Bank collection number with registration. 1 to 11 numeric characters. |
digit | string | required | Check digit for our number self-verification. 1 alphanumeric character. |
invoice attributes
| Field | Type | Required | Description |
|---|---|---|---|
access_key | string | required | Invoice access key. 44 characters. |
total_value | number | optional | Total invoice value. Up to 2 decimal places. |
serie | string | required | Invoice series number. Maximum 3 characters. |
number | string | required | Invoice number. Maximum 50 characters. |
issue_date | string | required | Issue date in YYYY-MM-DD format. |
Response
{
"asset_key": "41d6ff41-1dac-4df7-9e50-d15210ec57f3",
"external_id": "ccf6f331-d55f-46c0-a32f-fb909884dbb2",
"status": "pending_eligibility"
}
Response attributes
| Field | Type | Description |
|---|---|---|
asset_key | string | Unique asset identifier generated by QI Tech (UUID). |
external_id | string | The same external key provided in the external_id field of discounted_credit_right. |
status | string | Initial asset status. Always returns pending_eligibility, indicating the asset was inserted and awaits eligibility analysis. |
Possible errors
Batch not found
{
"title": "Assignment not found",
"description": "Assignment not found",
"translation": "Lote não encontrado",
"code": "TRC000018"
}
Asset type does not exist
{
"title": "Asset type does not exist",
"description": "Asset type 'invalid_asset_type' does not exist",
"translation": "Tipo do ativo 'invalid_asset_type' nao existe",
"code": "TRC000015"
}
Asset type incompatible with batch
{
"title": "Invalid asset type configuration",
"description": "This assignment can not receive this asset type: duplicata_mercantil",
"translation": "Esse lote não pode receber esse tipo de ativo: duplicata_mercantil",
"code": "TRC000025"
}
Batch closed for insertion
{
"title": "Assignment is closed",
"description": "Assignment is closed to insert new assets",
"translation": "Lote esta fechado para inserir novos ativos",
"code": "TRC000022"
}
Duplicate external_id
{
"title": "Already Exist This External Id",
"description": "Already exist an asset with this External Id",
"translation": "Ja existe um ativo com esse External Id",
"code": "TRC000054"
}
Next steps
After inserting the asset, the flow continues with:
- Document submission — send the required documentation for each asset approved in eligibility.
- Insertion closure — signal that all assets have been inserted so that the batch proceeds to eligibility analysis.