Skip to main content

Private Payroll Manual - Configuration of Auction Proposal Receipt Filters

Introduction

The auction operation issuance flow begins when a borrower requests a loan in the digital CTPS app, QI Tech consults all requests made periodically and, for each request, opens an internal loan proposal auction notifying partners via webhook. This manual contains the necessary endpoints to configure request filters that enable controlling the operation's target audience.

Modifying filtering rules

ENDPOINT
- /private_payroll_auction/requester_configuration/custom_data
METHOD
- PATCH

In this request there are two types of fields that can be modified; the client status and the client filters. Regarding the client status, it can be changed between active and inactive, indicating whether the client wants to receive new auction requests or not.

{
"status": "active"
}

The custom_data field contains the actual filters. All filtering fields must be sent as in the example below:

{
"custom_data": {
"disbursed_issue_amount": {"min": null, "max": null},
"number_of_installments": {"min": 12, "max": 24},
"consigned_credit_balance": {"min": null, "max": null},
"days_since_employment": {"min": null},
"age": {"min": null, "max": 60},
"received_daily_proposals": {"max": null},
"alert_preferences": {
"default": "acknowledge",
"leave":"acknowledge",
"termination":"ignore"
}
}
}
warning

Each field must obligatorily have the min and max keys, except for received_daily_proposals, days_since_employment and alert_preferences. NOTE: All custom data fields must be sent, even if not all values need to be changed. Additionally, sending all min/max keys is mandatory, with 'null' being passed if this filter is not needed.

Example Body

{
"status": "inactive",
"custom_data": {
"disbursed_issue_amount": {"min": 1000, "max": null},
"number_of_installments": {"min": 12, "max": 24},
"consigned_credit_balance": {"min": 200, "max": null},
"days_since_employment": {"min": null},
"age": {"min": null, "max": 60},
"received_daily_proposals": {"max": 1000},
}
}

Response

STATUS
- 201 (Accepted)
Response Body: Updated Configuration
{
"status": "active",
"custom_data": {
"disbursed_issue_amount": {"min": 1000, "max": null},
"number_of_installments": {"min": 12, "max": 24},
"consigned_credit_balance": {"min": 200, "max": null},
"days_since_employment": {"min": null},
"age": {"min": null, "max": 60},
"received_daily_proposals": {"max": 1000},
}
}

Adding filtering CNPJs

For clients who wish to receive requests only from employees of specific CNPJs, there is an option to add these CNPJs in bulk:

ENDPOINT
- /private_payroll_auction/requester_configuration/related_employer
METHOD
- POST
Warning!

DATAPREV only operates with the root of CNPJs, therefore for filtering based on the employer's document, only the first 8 digits of the CNPJ should be sent.

Body

{
"employer_document_numbers": [
"01234567",
"12345678"
]
}

The list can contain a maximum of 100 CNPJs.

Response

STATUS
- 201
Response Body: Added CNPJs
{
"employer_document_numbers": [
"01234567",
"12345678"
]
}
Note

Only CNPJs that were effectively added will be returned. In cases where a CNPJ has already been registered, it will not be returned in the response list. If no CNPJ is added, an empty list will be returned.

Removing filtering CNPJs

ENDPOINT
- /private_payroll_auction/requester_configuration/remove_related_employers
METHOD
- POST

Body

{
"employer_document_numbers": [
"01234567",
"12345678"
]
}

CNPJs must be sent with only the first 8 digits and the list can contain a maximum of 100 CNPJs.

Response

STATUS
- 200
Response Body: Removed CNPJs
{
"employer_document_numbers": ["01234567", "12345678"]
}

Searching filtering CNPJs

To consult CNPJs registered as filters for a requester, use the endpoint below with pagination support.

Endpoint

ENDPOINT
- /private_payroll_auction/requester_configuration/related_employers
METHOD
- GET

Query Params

FieldTypeDescriptionDefault
page_numberintCurrent page number1
page_rowsintNumber of records per page100

Example Response - 200

{
"data": [
{
"employer_document_number": "01234567"
},
{
"employer_document_number": "12345678"
}
],
"pagination": {
"current_page": 1,
"next_page": 2,
"rows_per_page": 2,
"total_pages": 3,
"total_rows": 6
}
}

Attachments

Filtering Rules Modification Payload Details

FieldTypeDescriptionRequired
statusstringnew client statusNo
custom_datadictNew filters for the clientNo

Client Status

StatusDescription
activeClient wants to receive new auction proposal requests
inactiveClient does NOT want to receive new proposal requests

Custom Data Parameters

FieldTypeDescriptionRequired
disbursed_issue_amountdictIssued contract amount (minimum and maximum)Yes
number_of_installmentsdictNumber of installments (minimum and maximum)Yes
consigned_credit_balancedictConsigned credit balance (minimum and maximum)Yes
days_since_employmentdictDays since employment start (minimum)Yes
agedictProposer's age (minimum and maximum)Yes
received_daily_proposalsdictNumber of proposals received per day (maximum)Yes
alert_preferencesdictFilter for loan requests with some alert, for details see alert_preferences ParametersYes

alert_preferences Parameters

FieldTypeDescriptionRequiredEnumerators
defaultstringDefault behavior, if specific behaviors are not configuredYesignore to not receive, acknowledge to receive
terminationstringFilter for leads with termination alertNoignore to not receive, acknowledge to receive
leavestringFilter for leads with leave alertNoignore to not receive, acknowledge to receive

CNPJ Filtering Addition and Removal Payload Details

FieldTypeDescriptionRequired
employer_document_numberarray of stringsList of CNPJ roots (with 8 digits each). Must contain between 1 and 100 itemsYes