Skip to main content

Institutional Relationships Management

The relationships endpoint allows you to manage partnerships, collaborations, and institutional relationships with external entities.

Get All Relationships

curl -X GET https://api.sociapp.com/configuracion/relaciones \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
[
  {
    "id": 1,
    "entidad": "Ayuntamiento de Madrid",
    "tipoRelacion": "Convenio",
    "contacto": "Juan Pérez",
    "email": "[email protected]",
    "telefono": "+34 91 123 4567",
    "notas": "Convenio de colaboración para actividades deportivas"
  },
  {
    "id": 2,
    "entidad": "Centro Cultural Local",
    "tipoRelacion": "Colaboración",
    "contacto": "María García",
    "email": "[email protected]",
    "telefono": "+34 91 765 4321",
    "notas": "Colaboración para eventos culturales"
  }
]

Endpoint

GET /configuracion/relaciones

Authentication

Required: JWT Bearer token with monitor or admin role

Create Relationship

curl -X POST https://api.sociapp.com/configuracion/relaciones \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "entidad": "Universidad Complutense",
    "tipoRelacion": "Convenio",
    "contacto": "Dr. Antonio López",
    "email": "[email protected]",
    "telefono": "+34 91 394 5000",
    "notas": "Convenio para prácticas estudiantiles"
  }'
{
  "id": 3,
  "entidad": "Universidad Complutense",
  "tipoRelacion": "Convenio",
  "contacto": "Dr. Antonio López",
  "email": "[email protected]",
  "telefono": "+34 91 394 5000",
  "notas": "Convenio para prácticas estudiantiles"
}

Endpoint

POST /configuracion/relaciones

Request Body

entidad
string
required
Name of the institution or organization
tipoRelacion
string
required
Type of relationship (e.g., “Convenio”, “Colaboración”, “Patrocinio”)
contacto
string
required
Name of primary contact person
email
string
required
Contact email address
telefono
string
required
Contact phone number
notas
string
Additional notes or description of the relationship

Update Relationship

curl -X PUT https://api.sociapp.com/configuracion/relaciones/3 \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "contacto": "Dr. Roberto Martínez",
    "email": "[email protected]"
  }'
{
  "id": 3,
  "entidad": "Universidad Complutense",
  "tipoRelacion": "Convenio",
  "contacto": "Dr. Roberto Martínez",
  "email": "[email protected]",
  "telefono": "+34 91 394 5000",
  "notas": "Convenio para prácticas estudiantiles"
}

Endpoint

PUT /configuracion/relaciones/{id}

Path Parameters

id
number
required
Relationship ID to update

Request Body

All fields are optional. Only include fields you want to update.

Delete Relationship

curl -X DELETE https://api.sociapp.com/configuracion/relaciones/3 \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
  "message": "Relationship deleted successfully"
}

Endpoint

DELETE /configuracion/relaciones/{id}

Path Parameters

id
number
required
Relationship ID to delete
Deleting a relationship is permanent and cannot be undone.

Relationship Types

Common relationship types include:
TypeDescriptionExample
ConvenioFormal agreement or conventionGovernment partnerships
ColaboraciónInformal collaborationCultural centers, NGOs
PatrocinioSponsorship arrangementCorporate sponsors
AlianzaStrategic allianceEducational institutions
ProveedorService providerSuppliers, contractors

Use Cases

  1. Partnership Management: Track all institutional partnerships and agreements
  2. Contact Directory: Maintain contact information for collaborative entities
  3. Reporting: Generate reports on institutional relationships for board meetings
  4. Compliance: Document formal agreements and conventions for legal compliance
  5. Networking: Build and maintain a network of collaborative organizations

Example Integration

// Fetch and display relationships
async function loadRelationships() {
  const response = await fetch('/configuracion/relaciones', {
    headers: { 'Authorization': `Bearer ${accessToken}` }
  });
  
  const relationships = await response.json();
  
  // Group by type
  const byType = relationships.reduce((acc, rel) => {
    if (!acc[rel.tipoRelacion]) acc[rel.tipoRelacion] = [];
    acc[rel.tipoRelacion].push(rel);
    return acc;
  }, {});
  
  return byType;
}

Build docs developers (and LLMs) love