๐Ÿ”— Bitespeed Identity API

Professional Identity Reconciliation Service for FluxKart.com

๐ŸŽฏ Smart Linking

Automatically links contacts based on common email or phone number

๐Ÿ—๏ธ Hierarchy System

Maintains oldest contact as primary, newer ones as secondary

๐Ÿ”„ Contact Merging

Intelligently merges separate primary contacts when they share information

๐Ÿ“Š Comprehensive Tracking

Consolidates all emails and phone numbers for a customer

๐Ÿ”ฌ Assignment Context

Built for Dr. Emmett Brown's FluxKart purchases - linking his different contact information across time travel shopping sprees! โšก๏ธ

POST /identify
Core endpoint that identifies and links customer contacts based on email or phone number.
๐Ÿ“ฅ Request Body
{ "email": "optional_email@example.com", "phoneNumber": "optional_phone_number" }
๐Ÿ“ค Response Format
{ "contact": { "primaryContatctId": 1, "emails": ["primary@email.com", "secondary@email.com"], "phoneNumbers": ["123456", "789012"], "secondaryContactIds": [2, 3] } }
๐Ÿงช Test Examples
๐Ÿ“‹ Behavior Examples
1. New Customer:
Input: {"email": "lorraine@hillvalley.edu", "phoneNumber": "123456"}
Result: Creates new primary contact
2. Linking Contact:
Input: {"email": "mcfly@hillvalley.edu", "phoneNumber": "123456"}
Result: Links to existing contact with same phone number
3. Merging Contacts:
Input: {"email": "george@hillvalley.edu", "phoneNumber": "717171"}
Result: Merges two separate primary contacts (older becomes primary)
GET /health
Returns the current status of the API service.
{ "status": "OK", "message": "Bitespeed Identity Service is running" }
GET /test
Simple API test endpoint that returns current timestamp and environment info.
{ "message": "API is working!", "timestamp": "2024-05-28T10:30:00.000Z", "env": "production" }