PATCH
/lending/v2/credit-lines/{credit_line_id}Actualizar una línea de crédito
El endpoint lending/v2/credit-lines/{credit_line_id} te permite actualizar los datos de una línea de crédito en específico.
Parámetros disponibles
Path Parameters
credit_line_idStringrequired
Cuerpo de solicitud
application/jsonsegmentobject1 propiedades
person_typeenum
limitsstringrequired
lifecycleobjectrequired2 propiedades
Autenticación
🔒BearerAuthhttp
Detalle de respuestas
Ejemplo de solicitud
{
"segment": {
"id": "example_value"
},
"person_type": "NATURAL",
"limits": {
"type": "SINGLE",
"single_payment": 10000,
"cash_advance_percentage": 50
},
"lifecycle": {
"offer": {
"start_date": "2024-01-01",
"end_date": "2024-12-31"
},
"status": {
"value": "ACTIVE",
"detail": {
"reason": "example_value",
"comment": "example_value"
}
}
}
}Ejemplo de código
curl -X PATCH "https://api.pomelo.la/lending/v2/credit-lines/example_value" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"segment": {
"id": "example_value"
},
"person_type": "NATURAL",
"limits": {
"type": "SINGLE",
"single_payment": 10000,
"cash_advance_percentage": 50
},
"lifecycle": {
"offer": {
"start_date": "2024-01-01",
"end_date": "2024-12-31"
},
"status": {
"value": "ACTIVE",
"detail": {
"reason": "example_value",
"comment": "example_value"
}
}
}
}'Ejemplo de respuesta (200)OK
{
"data": {
"id": "lcr-2HMwKzetERdOEhbT86UweXamPle",
"user_id": "usr-2HMvSDccc5PZzCvZ98lfeXamPle",
"product_id": "lpr-2HMwKzetERdOEhbT86UweXamPle",
"segment_id": "lsg-3JswKtetEReOEssT86UweXa4do2",
"person_type": "NATURAL",
"country": "PER",
"lifecycle": {
"offer": {
"start_date": "2024-01-01",
"end_date": "2024-12-31"
},
"status": {
"value": "ACTIVE",
"detail": {
"reason": "string",
"comment": "string"
}
},
"created_at": "2024-01-01T00:00:00Z",
"activated_at": "2024-01-01T00:00:00Z"
},
"balance": {
"by_currency": [
{
"currency": "PEN",
"limits": {
"single_payment": 10000,
"installments": 10000,
"cash_advance": 5000
},
"breakdown": {
"single_payment": {
"limit": 10000,
"utilization": 2500,
"available": 7500
},
"installments": {
"limit": 10000,
"utilization": 2500,
"available": 7500
},
"cash_advance": {
"limit": 10000,
"utilization": 2500,
"available": 7500
}
}
}
]
},
"billing_cycles": {
"billing_date_strategy": "FIXED_DUE_DATE",
"statement": {
"pdf": {
"enabled": true
}
},
"schedule": {
"due": {
"allowed_days_of_month": [
5,
10,
15,
20,
25,
28
]
},
"closing": {
"min_days_before_due": 5,
"min_days_before_first_closing": 10
}
},
"frequency": "MONTHLY"
},
"clearance_date_at": "2024-01-01T00:00:00Z"
}
}