Skip to main content

Overview

The Family Data Capture API allows you to record information about the candidate’s family members. This includes parents, siblings, spouse, children, and other dependents. Multiple family members can be added, edited, and removed for each candidate.

Authentication

All endpoints require authentication via the isLoggedIn middleware. Users must have an active session to access these endpoints.

Get Family Data

Retrieves all family member records for a specific evaluation.

Path Parameters

encryptedData
string
required
Encrypted evaluation ID that uniquely identifies the candidate’s evaluation record

Response

Returns a view with the following data:
getDataFamiliares
array
Array of family member records, each containing complete information about a family member

Save Family Member

Adds a new family member to the candidate’s profile.

Request Body

evalID
string
required
Evaluation ID for the candidate
familiarNombres
string
required
First name(s) of the family member
familiarApellidos
string
required
Last name(s) of the family member
familiarParentesco
string
required
Relationship to the candidate (e.g., “Padre”, “Madre”, “Hijo”, “Hija”, “Esposo/a”, “Hermano/a”)
familiarOcupacion
string
required
Occupation or profession of the family member
familiarEdad
integer
required
Age of the family member in years
familiarVive
string
required
Whether the family member is alive (“Si” or “No”)
familiarTelefono
string
Contact phone number for the family member
familiarDependiente
string
required
Whether the family member is financially dependent on the candidate (“Si” or “No”)

Response

success
string
“Se guardo familiar !” - Family member saved successfully

Example Request

{
  "evalID": "12345",
  "familiarNombres": "María Elena",
  "familiarApellidos": "García López",
  "familiarParentesco": "Esposa",
  "familiarOcupacion": "Maestra",
  "familiarEdad": 35,
  "familiarVive": "Si",
  "familiarTelefono": "6189876543",
  "familiarDependiente": "No"
}

Notes

The system automatically concatenates familiarApellidos and familiarNombres to create the full name stored as familiarNombre in the database.

Edit Family Member

Updates information for an existing family member.

Request Body

evalID
string
required
ID of the family member record (note: despite the name, this is the familiarID)
familiarNombre
string
required
Full name of the family member
familiarParentesco
string
required
Relationship to the candidate
familiarOcupacion
string
required
Occupation or profession
familiarEdad
integer
required
Age in years
familiarVive
string
required
Whether the family member is alive (“Si” or “No”)
familiarTelefono
string
Contact phone number
familiarDependiente
string
required
Whether financially dependent (“Si” or “No”)

Response

success
string
“Familiar actualizado !” - Family member updated successfully

Example Request

{
  "evalID": "67890",
  "familiarNombre": "García López María Elena",
  "familiarParentesco": "Esposa",
  "familiarOcupacion": "Directora de Escuela",
  "familiarEdad": 36,
  "familiarVive": "Si",
  "familiarTelefono": "6189876543",
  "familiarDependiente": "No"
}

Delete Family Member

Removes a family member record from the candidate’s profile.

Request Body

familiarID
string
required
ID of the family member record to delete

Response

success
string
“Familiar eliminado !” - Family member deleted successfully

Example Request

{
  "familiarID": "67890"
}

Error Responses

All endpoints return the following error response on failure:
message
string
“Algo salio mal !” - Generic error message indicating something went wrong
The endpoint will redirect back to the previous page with the error message displayed as a flash message.

Common Relationship Types

Typical values for familiarParentesco include:
  • Padre - Father
  • Madre - Mother
  • Esposo/Esposa - Spouse
  • Hijo/Hija - Son/Daughter
  • Hermano/Hermana - Brother/Sister
  • Abuelo/Abuela - Grandfather/Grandmother
  • Tío/Tía - Uncle/Aunt
  • Primo/Prima - Cousin
  • Suegro/Suegra - Father-in-law/Mother-in-law
  • Cuñado/Cuñada - Brother-in-law/Sister-in-law

Workflow

  1. First, retrieve existing family data using the GET endpoint
  2. Add new family members using the Save endpoint
  3. Edit family member details as needed using the Edit endpoint
  4. Remove family members if necessary using the Delete endpoint

Best Practices

  • Include all immediate family members (parents, siblings, spouse, children)
  • Mark deceased family members with familiarVive: "No"
  • Provide contact information for living family members when available
  • Accurately indicate financial dependency status for each family member
  • Verify ages and relationships before saving

Build docs developers (and LLMs) love