curl --request POST \
--url https://api.base39.io/v1/credit-policies/{id} \
--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": {}
}'
{
"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
}
Atualiza uma política de crédito.
curl --request POST \
--url https://api.base39.io/v1/credit-policies/{id} \
--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": {}
}'
{
"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
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Chave única de idempotência para evitar duplicação de requisições.
Este objeto representa uma política de crédito.
Retorna o objeto CreditPolicy
se a atualização for bem-sucedida. Retorna um erro se os parâmetros de atualização forem inválidos.
Este objeto representa uma política de crédito.