Assignment Creation
The assignment API allows the creation and querying of assignments directly by the client. It's possible to create an assignment using the assignment configuration key (UUID4) and query general assignment information through specific endpoints.
This service is only available for partners with registered assignment configuration. Please contact our support for more details.
Assignment Creation
To create an assignment, you need to perform a POST to the endpoint with the client's configuration key (assignment_configuration_key), the set of credit_operation_keys of the credit operations that are part of the assignment, and the daily_assignment_interest_rate, which corresponds to the daily assignment interest rate. This rate is on the same day basis as the contract in question.
Request
Params
| Field | Description |
|---|---|
assignment_configuration_key | Client's assignment configuration identifier key |
Request Body
{
"credit_operation_keys": ["key1", "key2", "key3"],
"daily_assignment_interest_rate": 0.0003
}
If the daily_assignment_interest_rate is not provided in the Request for specific contracts, the assignment rate registered in the client's assignment configuration will be used.
Response
Response Body
[
{
"assignment_key": "868a2951-efff-4e41-8adf-bc36871a20fb",
"creation_datetime": "2023-10-01T12:00:00",
"reference_date": "2023-10-01",
"total_amount": 120000,
"number_of_items": 3,
"status": "pending_items_calculation",
"created_at": "2023-10-01T11:00:00"
}
]
Assignment Query
To query a specific assignment, the client can perform a GET on the endpoint using the assignment identifier key (assignment_key).
Request
Params
| Field | Description |
|---|---|
assignment_key | Assignment identifier key |
Response
Response Body
{
"assignment_key": "77997168-5d61-430f-b5ae-08eb3d7b8c0e",
"creation_datetime": "2023-10-01T12:00:00",
"reference_date": "2023-10-01",
"total_amount": 120000,
"number_of_items": 5,
"term_of_assignment_url": "https://example.com/assignment.pdf",
"status": "settled",
"signable_term_url": "https://example.com/signable_term.pdf"
}
Assignment Items Query
To query the contracts in the assignment, use GET on the endpoint with the same assignment_key.
Request
Params
| Field | Description |
|---|---|
assignment_key | Assignment identifier key |
Response
The return is a list of information for each contract in the assignment (status 200), paginated:
Response
Response Body
{
"data": [
{
"assignment_item_key": "439b1257-82ac-4741-a416-a4428a9a7327",
"control_number": "0001",
"credit_operation_key": "d7f2ba40-30ea-4462-890c-6a99a7d85659",
"issuer_name": "João Santos",
"issuer_document_number": "12345678912",
"issue_amount": 50000,
"disbursed_amount": 45000,
"disbursement_date": "2023-01-01",
"number_of_installments": 12,
"contract_number": "XXX182938",
"present_amount": 48000,
"status": "settled",
"endorsement_url": "https://example.com/endorsement.pdf",
"purchaser_document_number": "1234567890001"
}
],
"pagination": {
"page": 1,
"page_size": 10
}
}