Empréstimos
- Empréstimos
- Políticas de crédito
- Esteira
- Produtos
- Ofertas
- Parcelas
Empresas
- Empresas
- Grupos de empresas
- Operadores
- Permissões
- Métodos de pagamento
Clientes
- Clientes
- Funcionários
Fundos
- Fundos
Eventos
- Eventos
- Assinaturas
- Webhooks externos
- Notificações
Cobrança
- Itens da fatura
- Intenções de pagamento
- Faturas
Arquivos
- Links de arquivos
- Arquivos
Configurações
- Temas
- Chaves da API
- Configurações
Entidades
- Entidade de dados
- Documentos
Automações
- Workflows
Modelos
- Modelos
Políticas de crédito
Criar política de crédito
Cria uma política de crédito.
POST
/
v1
/
credit-policies
curl --request POST \
--url https://api.base39.io/v1/credit-policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"status": "active",
"name": "Consignado",
"model": "EMPLOYMENT_LENGTH_SALARY_MULTIPLIER",
"product": "prod_5f92f01728e009f403d8502e",
"options": {
"interestType": "pre_price_days",
"creditOperationType": "ccb",
"rebates": [
{
"feeType": "registration",
"amountType": "absolute",
"amount": 200,
"description": "Tarifa de cadastro"
}
],
"fine": {
"fineRate": 0.02,
"interestBase": "calendar_days",
"monthlyRate": 0.02
},
"rules": [
{
"workingMonthsRangeStart": 6,
"workingMonthsRangeEnd": 12,
"salaryMultiples": 2,
"minimumDisbursementAmount": 200,
"maximumDisbursementAmount": 2000,
"fund": "fund_5f92f01728e009f403d8502e",
"monthlyFee": [
{
"installmentsRangeStart": 12,
"installmentsRangeEnd": 36,
"amount": 0.02,
"insurance": {
"fee": 123,
"type": "uninsured",
"number": "<string>",
"insurer": "<string>"
}
}
]
}
]
},
"metadata": {}
}'
{
"id": "crpl_5f92f01728e009f403d8502e",
"status": "active",
"name": "Consignado",
"model": "EMPLOYMENT_LENGTH_SALARY_MULTIPLIER",
"product": "prod_5f92f01728e009f403d8502e",
"options": {
"interestType": "pre_price_days",
"creditOperationType": "ccb",
"rebates": [
{
"feeType": "registration",
"amountType": "absolute",
"amount": 200,
"description": "Tarifa de cadastro"
}
],
"fine": {
"fineRate": 0.02,
"interestBase": "calendar_days",
"monthlyRate": 0.02
},
"rules": [
{
"workingMonthsRangeStart": 6,
"workingMonthsRangeEnd": 12,
"salaryMultiples": 2,
"minimumDisbursementAmount": 200,
"maximumDisbursementAmount": 2000,
"fund": "fund_5f92f01728e009f403d8502e",
"monthlyFee": [
{
"installmentsRangeStart": 12,
"installmentsRangeEnd": 36,
"amount": 0.02,
"insurance": {
"fee": 123,
"type": "uninsured",
"number": "<string>",
"insurer": "<string>"
}
}
]
}
]
},
"metadata": {},
"createdAt": "2023-08-25T22:38:41.134Z",
"updatedAt": "2023-08-25T22:38:41.134Z",
"deleted": false
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
Chave única de idempotência para evitar duplicação de requisições.
Query Parameters
Expande as referências.
Pode ser um valor único ou uma lista separada por vírgula (csv) de referências retornadas neste endpoint.
Body
application/json
Criar uma política de crédito
Response
201 - application/json
Retorna o objeto CreditPolicy
se a criação for bem-sucedida. Retorna um erro se os parâmetros de criação forem inválidos.
Este objeto representa uma política de crédito.
curl --request POST \
--url https://api.base39.io/v1/credit-policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"status": "active",
"name": "Consignado",
"model": "EMPLOYMENT_LENGTH_SALARY_MULTIPLIER",
"product": "prod_5f92f01728e009f403d8502e",
"options": {
"interestType": "pre_price_days",
"creditOperationType": "ccb",
"rebates": [
{
"feeType": "registration",
"amountType": "absolute",
"amount": 200,
"description": "Tarifa de cadastro"
}
],
"fine": {
"fineRate": 0.02,
"interestBase": "calendar_days",
"monthlyRate": 0.02
},
"rules": [
{
"workingMonthsRangeStart": 6,
"workingMonthsRangeEnd": 12,
"salaryMultiples": 2,
"minimumDisbursementAmount": 200,
"maximumDisbursementAmount": 2000,
"fund": "fund_5f92f01728e009f403d8502e",
"monthlyFee": [
{
"installmentsRangeStart": 12,
"installmentsRangeEnd": 36,
"amount": 0.02,
"insurance": {
"fee": 123,
"type": "uninsured",
"number": "<string>",
"insurer": "<string>"
}
}
]
}
]
},
"metadata": {}
}'
{
"id": "crpl_5f92f01728e009f403d8502e",
"status": "active",
"name": "Consignado",
"model": "EMPLOYMENT_LENGTH_SALARY_MULTIPLIER",
"product": "prod_5f92f01728e009f403d8502e",
"options": {
"interestType": "pre_price_days",
"creditOperationType": "ccb",
"rebates": [
{
"feeType": "registration",
"amountType": "absolute",
"amount": 200,
"description": "Tarifa de cadastro"
}
],
"fine": {
"fineRate": 0.02,
"interestBase": "calendar_days",
"monthlyRate": 0.02
},
"rules": [
{
"workingMonthsRangeStart": 6,
"workingMonthsRangeEnd": 12,
"salaryMultiples": 2,
"minimumDisbursementAmount": 200,
"maximumDisbursementAmount": 2000,
"fund": "fund_5f92f01728e009f403d8502e",
"monthlyFee": [
{
"installmentsRangeStart": 12,
"installmentsRangeEnd": 36,
"amount": 0.02,
"insurance": {
"fee": 123,
"type": "uninsured",
"number": "<string>",
"insurer": "<string>"
}
}
]
}
]
},
"metadata": {},
"createdAt": "2023-08-25T22:38:41.134Z",
"updatedAt": "2023-08-25T22:38:41.134Z",
"deleted": false
}
Assistant
Responses are generated using AI and may contain mistakes.