Referências
- Empréstimos
- Empresas
- Políticas de crédito
- Esteira
- Clientes
- Funcionários
- Fundos
- Eventos
- Produtos
- Ofertas
- Assinaturas
- Grupos de empresas
- Operadores
- Permissões
- Itens da fatura
- Intenções de pagamento
- Métodos de pagamento
- Parcelas
- Webhooks externos
- Links de arquivos
- Arquivos
- Faturas
- Temas
- Chaves da API
- Configurações
- Entidade de dados
- Documentos
- Workflows
- Notificações
- Modelos
Políticas de crédito
Criar política de crédito
Cria uma política de crédito.
POST
/
v1
/
credit-policies
Copy
Ask AI
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,
"fund": "fund_5f92f01728e009f403d8502e",
"monthlyFee": [
{
"installmentsRangeStart": 12,
"installmentsRangeEnd": 36,
"amount": 0.02,
"insurance": {
"fee": 123,
"type": "uninsured",
"number": "<string>",
"insurer": "<string>"
}
}
]
}
]
},
"metadata": {}
}'
Copy
Ask AI
{
"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,
"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.
Copy
Ask AI
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,
"fund": "fund_5f92f01728e009f403d8502e",
"monthlyFee": [
{
"installmentsRangeStart": 12,
"installmentsRangeEnd": 36,
"amount": 0.02,
"insurance": {
"fee": 123,
"type": "uninsured",
"number": "<string>",
"insurer": "<string>"
}
}
]
}
]
},
"metadata": {}
}'
Copy
Ask AI
{
"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,
"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.