/lending/v1/hierarchies/{id}/nodes

Crear nodo en una jerarquía

El endpoint lending/v1/hierachies/{id}/nodes te permite crear un nodo hijo (área o usuario) dentro de una jerarquía.

Parámetros disponibles

Variante:

Este endpoint acepta múltiples tipos de body. Seleccioná una variante para ver sus parámetros y ejemplo.

Path Parameters
idString
Cuerpo de solicitud
application/json
typeenum
parent_node_idstring
namestring
creditobject3 propiedades

Autenticación

🔒BearerAuthhttp

Detalle de respuestas

Ejemplo de solicitud
{
  "type": "COMPANY_AREA",
  "parent_node_id": "nod-2HMvSDccc5PZzCvZ98lfeXamPle",
  "name": "Jerarquia de Marketing",
  "credit": {
    "validity_period": {
      "start_date": "2022-04-20",
      "end_date": "2022-04-20"
    },
    "renewal_policy": {
      "frequency": "NO_RENEWAL"
    },
    "balance": {
      "source": "OWNED",
      "limits": {
        "single_payment": {
          "limit": 4000
        },
        "installments": {
          "limit": 4000
        },
        "cash_advance": {
          "limit": 4000,
          "percentage_of_single_payment": 5
        }
      }
    }
  }
}
Ejemplo de código
curl -X POST "https://api.pomelo.la/lending/v1/hierarchies/hie-2HMwKzetERdOEhbT86UweXamPle/nodes" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "type": "COMPANY_AREA",
  "parent_node_id": "nod-2HMvSDccc5PZzCvZ98lfeXamPle",
  "name": "Jerarquia de Marketing",
  "credit": {
    "validity_period": {
      "start_date": "2022-04-20",
      "end_date": "2022-04-20"
    },
    "renewal_policy": {
      "frequency": "NO_RENEWAL"
    },
    "balance": {
      "source": "OWNED",
      "limits": {
        "single_payment": {
          "limit": 4000
        },
        "installments": {
          "limit": 4000
        },
        "cash_advance": {
          "limit": 4000,
          "percentage_of_single_payment": 5
        }
      }
    }
  }
}'
Ejemplo de respuesta (201)Respuesta del nodo de jerarquía
{
  "data": {
    "id": "nod-2HMvSDccc5PZzCvZ98lfeXamPle",
    "hierarchy_id": "hie-2HMvSDccc5PZzCvZ98lfeXamPle",
    "parent_node_id": "nod-2HMvSDccc5PZzCvZ98lfeXamPle",
    "lifecycle": {
      "status": {
        "value": "PENDING"
      },
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z"
    },
    "name": "Jerarquia de Marketing",
    "type": "COMPANY_AREA",
    "link_ref": {
      "id": "lcr-2HMwKzetERdOEhbT86UweXamPle",
      "type": "CREDIT_LINE"
    },
    "card_ids": [
      "crd-2HMvSDccc5PZzCvZ98lfeXamPle"
    ],
    "ancestor_ids": [
      "nod-2HMvSDccc5PZzCvZ98lfeXamPle"
    ],
    "credit": {
      "validity_period": {
        "start_date": "2022-04-20",
        "end_date": "2022-04-29"
      },
      "renewal_policy": {
        "frequency": "NO_RENEWAL"
      },
      "balance": {
        "source": "OWNED",
        "currency": "PEN",
        "limit_type": "SINGLE",
        "restitution_type": "EXTENDED",
        "single_payment": {
          "limit": 4000,
          "utilization": 0,
          "available": 0
        },
        "installments": {
          "limit": 4000,
          "utilization": 0,
          "available": 0
        },
        "cash_advance": {
          "limit": 4000,
          "utilization": 1000,
          "available": 3000,
          "percentage_of_single_payment": 100
        }
      }
    }
  }
}

Pomelo AI

Asistente de inteligencia artificial para consultas sobre la API de Pomelo
¡Hola!¿Cómo puedo ayudarte hoy?
Crear nodo en una jerarquía | Pomelo API Reference