API
Our platform features a private, custom REST API gateway under the family-tree/v1 namespace. This headless infrastructure lets you programmatically read the entire tree roster, extract single-profile metrics (ideal for birthday alert automation engines like Viber bots), add new relatives, or update profile cards securely.
🔒 Global Authentication Handshake
To protect the absolute privacy of our family data, all requests must include the following custom header string. Standard WordPress logins or basic cookie tokens will be blocked.
- Header Key:
X-Family-Tree-API-Key - Header Value:
(use our token) or request the token from our group chat or email
🛰️ Endpoint Specifications & Instructions
1. View Full Tree (Read All Records)
Dumps the complete flat registry of all published family profiles, dates, locations, and structural relationship IDs.
- HTTP Method:
GET - Endpoint URL:
https://family.alanparma.com/wp-json/family-tree/v1/tree - ReqBin Testing Steps:
- Set method dropdown to GET.
- Paste the Endpoint URL.
- Add the
X-Family-Tree-API-Keyheader under the Headers tab. - Click Send.
- Sample JSON Response Packet (
200 OK):
JSON
{
"success": true,
"count": 42,
"tree": [
{
"id": 188,
"full_name": "Juan Dela Cruz",
"nickname": "John",
"gender": "male",
"birth_date": "15/06/1985",
"death_date": "",
"city_name": "Quezon City",
"country_code": "PH",
"photo": "https://family.alanparma.com/wp-content/uploads/avatar.jpg",
"parent_id": 104,
"spouse_id": 190
}
]
}
2. Get Member Details (Read Single Profile)
Retrieves a specific family member’s isolated data parameters using their unique WordPress Database Post ID. This is the primary endpoint for feeding live daily arrays into your external Viber birthday bot scripts.
- HTTP Method:
GET - Endpoint URL:
https://family.alanparma.com/wp-json/family-tree/v1/member/{ID}(Example:https://family.alanparma.com/wp-json/family-tree/v1/member/188) - Sample JSON Response Packet (
200 OK):
JSON
{
"success": true,
"member": {
"id": 188,
"full_name": "Juan Dela Cruz",
"nickname": "John",
"gender": "male",
"birth_date": "15/06/1985",
"death_date": "",
"city_name": "Quezon City",
"country_code": "PH",
"photo": "https://family.alanparma.com/wp-content/uploads/avatar.jpg",
"parent_id": 104,
"spouse_id": 190
}
}
3. Add New Relative (Create Record)
Programmatically injects a fresh profile card directly into the tree architecture database.
- HTTP Method:
POST - Endpoint URL:
https://family.alanparma.com/wp-json/family-tree/v1/add-member - Headers Requirements: Must include
Content-Type: application/json - ReqBin Testing Steps:
- Change the dropdown option to POST.
- Paste the Endpoint URL.
- Under the Content tab, select JSON and paste the payload down below.
- Payload Body Parameters (JSON):⚠️ Note on Constraints:
first_nameandlast_nameare strictly required. The engine automatically rejects submissions with a409 Conflictstatus if that exact full name string combo is already active.
JSON
{
"first_name": "Maria",
"last_name": "Santos",
"nickname": "Ria",
"gender": "female",
"birth_date": "24/12/1992",
"city_name": "Hanoi",
"country_code": "VN",
"profile_picture_url": "https://example.com/external-photo.jpg"
}
- Expected Response (
211 Created):
JSON
{
"success": true,
"message": "Family member successfully created externally!",
"member_id": 204,
"view_url": "https://family.alanparma.com/family_member/maria-santos"
}
4. Update Profile Card (Update Record)
Modifies specific background properties of an established record without running the risk of deleting or dropping the parent post.
- HTTP Method:
POSTorPUT - Endpoint URL:
https://family.alanparma.com/wp-json/family-tree/v1/update-member/{ID}(Example:https://family.alanparma.com/wp-json/family-tree/v1/update-member/188) - Payload Body Parameters (JSON):Pass only the parameters you want to modify; omission of a parameter leaves its current database state unchanged.
JSON
{
"nickname": "Jet",
"city_name": "Taipei",
"country_code": "TW",
"parent_id": 44
}
- Expected Response (
200 OK):
JSON
{
"success": true,
"message": "Profile updated successfully!",
"member_id": 188,
"updated": {
"id": 188,
"full_name": "Juan Dela Cruz",
"nickname": "Jet",
"gender": "male",
"birth_date": "15/06/1985",
"city_name": "Taipei",
"country_code": "TW",
"parent_id": 44,
"spouse_id": 190
}
}
Core Relational Architecture Rules
- The Dropdown Fallback Override: These endpoints focus entirely on handling baseline profile details. Parent and spouse connection mappings accept standard numerical WordPress Post IDs. If relationship details are skipped or omitted during API loops, you can always go straight to the site homepage dashboard, hit edit, and hook up connections using the interactive layout dropdown tools manually!
- Date Uniformity Formatting: All date strings must be supplied following the
DD/MM/YYYYstandard structure. This guarantees that your automated Viber birthday alert regex crawlers can split and verify matching milestone configurations accurately without hitting processing exceptions!
