/lending/v2/products/{product_id}/segments/{segment_id}

Actualizar un segmento

El endpoint lending/v2/products/{product_id}/segments/{segment_id} te permite actualizar las configuraciones de un segmento específico.

Parámetros disponibles

Path Parameters
product_idString
segment_idString
Cuerpo de solicitud
application/json
namestring
pricingobject2 propiedades
credit_cardobject1 propiedades

Autenticación

🔒BearerAuthhttp

Detalle de respuestas

Ejemplo de solicitud
{
  "name": "Segmento Premium Actualizado",
  "pricing": {
    "start_date": "2024-01-01",
    "pricing": {
      "book_model": "LOCAL_CURRENCY_BOOK",
      "start_date": "2024-01-01",
      "rates": [
        {
          "kind": "FIXED",
          "name": "FINANCING",
          "type": "EFFECTIVE_MONTHLY_RATE",
          "application": {
            "percentage": 3.5
          }
        }
      ],
      "fees": [
        {
          "kind": "FLAT",
          "name": "Mantenimiento",
          "frequency": "MONTHLY",
          "operation": "CASH_ADVANCE",
          "application": {
            "unit_type": "PEN",
            "amount": 10
          }
        }
      ],
      "insurances": [
        {
          "name": "Seguro de gravamen/gravamen chileno",
          "type": "CREDIT_LIFE_INSURANCE",
          "application": {
            "percentage": 5,
            "amount": {
              "min": 100,
              "max": 500
            }
          }
        }
      ]
    }
  },
  "credit_card": {
    "minimum_payment": {
      "by_currency": [
        {
          "currency": "PEN",
          "minimum_amount": 1,
          "composition": [
            {
              "concept": "PURCHASE",
              "percentage": 25.5
            }
          ]
        }
      ]
    }
  }
}
Ejemplo de código
curl -X PATCH "https://api.pomelo.la/lending/v2/products/example_value/segments/example_value" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "name": "Segmento Premium Actualizado",
  "pricing": {
    "start_date": "2024-01-01",
    "pricing": {
      "book_model": "LOCAL_CURRENCY_BOOK",
      "start_date": "2024-01-01",
      "rates": [
        {
          "kind": "FIXED",
          "name": "FINANCING",
          "type": "EFFECTIVE_MONTHLY_RATE",
          "application": {
            "percentage": 3.5
          }
        }
      ],
      "fees": [
        {
          "kind": "FLAT",
          "name": "Mantenimiento",
          "frequency": "MONTHLY",
          "operation": "CASH_ADVANCE",
          "application": {
            "unit_type": "PEN",
            "amount": 10
          }
        }
      ],
      "insurances": [
        {
          "name": "Seguro de gravamen/gravamen chileno",
          "type": "CREDIT_LIFE_INSURANCE",
          "application": {
            "percentage": 5,
            "amount": {
              "min": 100,
              "max": 500
            }
          }
        }
      ]
    }
  },
  "credit_card": {
    "minimum_payment": {
      "by_currency": [
        {
          "currency": "PEN",
          "minimum_amount": 1,
          "composition": [
            {
              "concept": "PURCHASE",
              "percentage": 25.5
            }
          ]
        }
      ]
    }
  }
}'
Ejemplo de respuesta (200)OK
{
  "data": {
    "id": "lsg-3JswKtetEReOEssT86UweXa4do2",
    "product_id": "lpr-2HMwKzetERdOEhbT86UweXamPle",
    "name": "Segmento Premium",
    "status": "ACTIVE",
    "credit_card": {
      "book_model": "LOCAL_CURRENCY_BOOK",
      "pricing": {
        "book_model": "LOCAL_CURRENCY_BOOK",
        "start_date": "2024-01-01",
        "rates": [
          {
            "kind": "FIXED",
            "name": "FINANCING",
            "type": "EFFECTIVE_MONTHLY_RATE",
            "application": {
              "percentage": 3.5
            }
          }
        ],
        "fees": [
          {
            "kind": "FLAT",
            "name": "Mantenimiento",
            "frequency": "MONTHLY",
            "operation": "CASH_ADVANCE",
            "application": {
              "unit_type": "PEN",
              "amount": 10
            }
          }
        ],
        "insurances": [
          {
            "name": "Seguro de gravamen/gravamen chileno",
            "type": "CREDIT_LIFE_INSURANCE",
            "application": {
              "percentage": 5,
              "amount": {
                "min": 100,
                "max": 500
              }
            }
          }
        ]
      },
      "minimum_payment": {
        "minimum_amount": 50,
        "composition": [
          {
            "concept": "PURCHASE",
            "percentage": 25.5
          }
        ]
      }
    },
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:00:00Z"
  }
}

Pomelo AI

Asistente de inteligencia artificial para consultas sobre la API de Pomelo
¡Hola!¿Cómo puedo ayudarte hoy?