testapicontacts / app.py
JayBene1's picture
Update app.py
c1093e0 verified
from flask import Flask, jsonify, request
import json
from datetime import datetime
import random
app = Flask(__name__)
# Mock database of contacts
CONTACTS_DB = [
# Kwekel Companies
{
"id": 1,
"name": "Tim Kwekel",
"email": "tim@kwekelcompanies.com",
"phone": "616-301-9800",
"position": "President",
"company": "Kwekel Companies",
"website": "https://kwekelcompanies.com",
"address": "3347 Eagle Run Dr. NE Grand Rapids, MI 49525",
"industry": "Real Estate",
"founded": 2018,
"employees": 250
},
# TechFlow Solutions
{
"id": 2,
"name": "Jim John",
"email": "Jim.john@techflowsolutions.com",
"phone": "+1-555-0101",
"position": "CTO",
"company": "TechFlow Solutions",
"website": "https://techflowsolutions.com",
"address": "123 Innovation Drive, San Francisco, CA 94105",
"industry": "Software Development",
"founded": 2018,
"employees": 250
},
{
"id": 3,
"name": "Marcus Rodriguez",
"email": "m.rodriguez@techflowsolutions.com",
"phone": "+1-555-0102",
"position": "CEO",
"company": "TechFlow Solutions",
"website": "https://techflowsolutions.com",
"address": "123 Innovation Drive, San Francisco, CA 94105",
"industry": "Software Development",
"founded": 2018,
"employees": 250
},
# GreenLeaf Consulting
{
"id": 4,
"name": "Emma Thompson",
"email": "emma@greenleafconsult.com",
"phone": "+1-555-0201",
"position": "Managing Partner",
"company": "GreenLeaf Consulting",
"website": "https://greenleafconsult.com",
"address": "456 Eco Boulevard, Portland, OR 97201",
"industry": "Environmental Consulting",
"founded": 2015,
"employees": 85
},
{
"id": 5,
"name": "David Park",
"email": "david.park@greenleafconsult.com",
"phone": "+1-555-0202",
"position": "Environmental Analyst",
"company": "GreenLeaf Consulting",
"website": "https://greenleafconsult.com",
"address": "456 Eco Boulevard, Portland, OR 97201",
"industry": "Environmental Consulting",
"founded": 2015,
"employees": 85
},
# BlueSky Marketing
{
"id": 6,
"name": "Jessica Williams",
"email": "jessica@blueskymarketing.net",
"phone": "+1-555-0301",
"position": "Creative Director",
"company": "BlueSky Marketing",
"website": "https://blueskymarketing.net",
"address": "789 Creative Lane, Austin, TX 78701",
"industry": "Digital Marketing",
"founded": 2020,
"employees": 42
},
{
"id": 7,
"name": "Ryan Mitchell",
"email": "ryan.mitchell@blueskymarketing.net",
"phone": "+1-555-0302",
"position": "Account Manager",
"company": "BlueSky Marketing",
"website": "https://blueskymarketing.net",
"address": "789 Creative Lane, Austin, TX 78701",
"industry": "Digital Marketing",
"founded": 2020,
"employees": 42
},
# Quantum Dynamics Corp
{
"id": 8,
"name": "Dr. Lisa Zhang",
"email": "l.zhang@quantumdynamics.org",
"phone": "+1-555-0401",
"position": "Research Director",
"company": "Quantum Dynamics Corp",
"website": "https://quantumdynamics.org",
"address": "321 Research Plaza, Boston, MA 02101",
"industry": "Scientific Research",
"founded": 2019,
"employees": 150
},
{
"id": 9,
"name": "Ahmed Hassan",
"email": "ahmed.hassan@quantumdynamics.org",
"phone": "+1-555-0402",
"position": "Quantum Engineer",
"company": "Quantum Dynamics Corp",
"website": "https://quantumdynamics.org",
"address": "321 Research Plaza, Boston, MA 02101",
"industry": "Scientific Research",
"founded": 2019,
"employees": 150
},
# Stellar Logistics
{
"id": 10,
"name": "Maria Gonzalez",
"email": "maria@stellarlogistics.biz",
"phone": "+1-555-0501",
"position": "Operations Manager",
"company": "Stellar Logistics",
"website": "https://stellarlogistics.biz",
"address": "654 Warehouse Way, Chicago, IL 60601",
"industry": "Logistics & Supply Chain",
"founded": 2017,
"employees": 320
},
{
"id": 11,
"name": "James O'Connor",
"email": "james.oconnor@stellarlogistics.biz",
"phone": "+1-555-0502",
"position": "Fleet Coordinator",
"company": "Stellar Logistics",
"website": "https://stellarlogistics.biz",
"address": "654 Warehouse Way, Chicago, IL 60601",
"industry": "Logistics & Supply Chain",
"founded": 2017,
"employees": 320
},
# Nexus Financial
{
"id": 12,
"name": "Robert Kim",
"email": "robert.kim@nexusfinancial.pro",
"phone": "+1-555-0601",
"position": "Senior Advisor",
"company": "Nexus Financial",
"website": "https://nexusfinancial.pro",
"address": "987 Wall Street, New York, NY 10005",
"industry": "Financial Services",
"founded": 2012,
"employees": 180
},
{
"id": 13,
"name": "Catherine Lee",
"email": "catherine@nexusfinancial.pro",
"phone": "+1-555-0602",
"position": "Investment Analyst",
"company": "Nexus Financial",
"website": "https://nexusfinancial.pro",
"address": "987 Wall Street, New York, NY 10005",
"industry": "Financial Services",
"founded": 2012,
"employees": 180
},
# Horizon Health Systems
{
"id": 14,
"name": "Dr. Michael Johnson",
"email": "m.johnson@horizonhealth.care",
"phone": "+1-555-0701",
"position": "Chief Medical Officer",
"company": "Horizon Health Systems",
"website": "https://horizonhealth.care",
"address": "147 Medical Center Dr, Denver, CO 80202",
"industry": "Healthcare",
"founded": 2014,
"employees": 450
},
{
"id": 15,
"name": "Nurse Jennifer Adams",
"email": "jennifer.adams@horizonhealth.care",
"phone": "+1-555-0702",
"position": "Head Nurse",
"company": "Horizon Health Systems",
"website": "https://horizonhealth.care",
"address": "147 Medical Center Dr, Denver, CO 80202",
"industry": "Healthcare",
"founded": 2014,
"employees": 450
},
# Phoenix Manufacturing
{
"id": 16,
"name": "Tony Ricci",
"email": "tony.ricci@phoenixmfg.com",
"phone": "+1-555-0801",
"position": "Plant Manager",
"company": "Phoenix Manufacturing",
"website": "https://phoenixmfg.com",
"address": "852 Industrial Blvd, Detroit, MI 48201",
"industry": "Manufacturing",
"founded": 2008,
"employees": 280
},
{
"id": 17,
"name": "Linda Martinez",
"email": "linda.martinez@phoenixmfg.com",
"phone": "+1-555-0802",
"position": "Quality Control Supervisor",
"company": "Phoenix Manufacturing",
"website": "https://phoenixmfg.com",
"address": "852 Industrial Blvd, Detroit, MI 48201",
"industry": "Manufacturing",
"founded": 2008,
"employees": 280
},
# Alpine Education Group
{
"id": 18,
"name": "Dr. Patricia White",
"email": "patricia.white@alpineeducation.edu",
"phone": "+1-555-0901",
"position": "Director of Programs",
"company": "Alpine Education Group",
"website": "https://alpineeducation.edu",
"address": "369 Learning Circle, Seattle, WA 98101",
"industry": "Education",
"founded": 2016,
"employees": 95
},
{
"id": 19,
"name": "Kevin Brown",
"email": "kevin.brown@alpineeducation.edu",
"phone": "+1-555-0902",
"position": "Curriculum Specialist",
"company": "Alpine Education Group",
"website": "https://alpineeducation.edu",
"address": "369 Learning Circle, Seattle, WA 98101",
"industry": "Education",
"founded": 2016,
"employees": 95
},
# Crimson Creative Studio
{
"id": 20,
"name": "Sophia Taylor",
"email": "sophia@crimsoncreative.studio",
"phone": "+1-555-1001",
"position": "Art Director",
"company": "Crimson Creative Studio",
"website": "https://crimsoncreative.studio",
"address": "741 Design District, Miami, FL 33101",
"industry": "Creative Services",
"founded": 2021,
"employees": 28
},
{
"id": 21,
"name": "Alex Cooper",
"email": "alex.cooper@crimsoncreative.studio",
"phone": "+1-555-1002",
"position": "Graphic Designer",
"company": "Crimson Creative Studio",
"website": "https://crimsoncreative.studio",
"address": "741 Design District, Miami, FL 33101",
"industry": "Creative Services",
"founded": 2021,
"employees": 28
},
# Summit Tech Solutions
{
"id": 22,
"name": "Daniel Kim",
"email": "daniel.kim@summittech.com",
"phone": "+1-555-1101",
"position": "CEO",
"company": "Summit Tech Solutions",
"website": "https://summittech.com",
"address": "100 Tech Park, San Jose, CA 95110",
"industry": "Software Development",
"founded": 2010,
"employees": 500
},
{
"id": 23,
"name": "Olivia Chen",
"email": "olivia.chen@summittech.com",
"phone": "+1-555-1102",
"position": "Lead Developer",
"company": "Summit Tech Solutions",
"website": "https://summittech.com",
"address": "100 Tech Park, San Jose, CA 95110",
"industry": "Software Development",
"founded": 2010,
"employees": 500
},
# Coastal Construction Group
{
"id": 24,
"name": "Mark Johnson",
"email": "mark.johnson@coastalconstruction.net",
"phone": "+1-555-1201",
"position": "Project Manager",
"company": "Coastal Construction Group",
"website": "https://coastalconstruction.net",
"address": "200 Beachfront Ave, Miami, FL 33139",
"industry": "Construction",
"founded": 2005,
"employees": 120
},
{
"id": 25,
"name": "Sarah Miller",
"email": "sarah.miller@coastalconstruction.net",
"phone": "+1-555-1202",
"position": "Architect",
"company": "Coastal Construction Group",
"website": "https://coastalconstruction.net",
"address": "200 Beachfront Ave, Miami, FL 33139",
"industry": "Construction",
"founded": 2005,
"employees": 120
},
# GreenGrowth Agriculture
{
"id": 26,
"name": "Dr. Emily White",
"email": "emily.white@greengrowth.org",
"phone": "+1-555-1301",
"position": "Chief Agronomist",
"company": "GreenGrowth Agriculture",
"website": "https://greengrowth.org",
"address": "300 Farm Lane, Des Moines, IA 50309",
"industry": "Agriculture",
"founded": 2018,
"employees": 75
},
{
"id": 27,
"name": "Carlos Rivera",
"email": "carlos.rivera@greengrowth.org",
"phone": "+1-555-1302",
"position": "Farm Operations Manager",
"company": "GreenGrowth Agriculture",
"website": "https://greengrowth.org",
"address": "300 Farm Lane, Des Moines, IA 50309",
"industry": "Agriculture",
"founded": 2018,
"employees": 75
},
# Apex Robotics
{
"id": 28,
"name": "Dr. Lena Hansen",
"email": "lena.hansen@apexrobotics.tech",
"phone": "+1-555-1401",
"position": "Robotics Engineer",
"company": "Apex Robotics",
"website": "https://apexrobotics.tech",
"address": "400 Automation Way, Boston, MA 02134",
"industry": "Robotics",
"founded": 2017,
"employees": 110
},
{
"id": 29,
"name": "Samira Khan",
"email": "samira.khan@apexrobotics.tech",
"phone": "+1-555-1402",
"position": "AI Specialist",
"company": "Apex Robotics",
"website": "https://apexrobotics.tech",
"address": "400 Automation Way, Boston, MA 02134",
"industry": "Robotics",
"founded": 2017,
"employees": 110
},
# Vitality Wellness Centers
{
"id": 30,
"name": "Dr. Robert Garcia",
"email": "robert.garcia@vitalitywellness.care",
"phone": "+1-555-1501",
"position": "Medical Director",
"company": "Vitality Wellness Centers",
"website": "https://vitalitywellness.care",
"address": "500 Health Plaza, Phoenix, AZ 85001",
"industry": "Healthcare",
"founded": 2016,
"employees": 180
},
{
"id": 31,
"name": "Amanda Lopez",
"email": "amanda.lopez@vitalitywellness.care",
"phone": "+1-555-1502",
"position": "Patient Coordinator",
"company": "Vitality Wellness Centers",
"website": "https://vitalitywellness.care",
"address": "500 Health Plaza, Phoenix, AZ 85001",
"industry": "Healthcare",
"founded": 2016,
"employees": 180
},
# Fusion Energy Solutions
{
"id": 32,
"name": "Dr. Kenji Tanaka",
"email": "kenji.tanaka@fusionenergy.co",
"phone": "+1-555-1601",
"position": "Chief Scientist",
"company": "Fusion Energy Solutions",
"website": "https://fusionenergy.co",
"address": "600 Power Blvd, Houston, TX 77002",
"industry": "Renewable Energy",
"founded": 2019,
"employees": 90
},
{
"id": 33,
"name": "Maria Rodriguez",
"email": "maria.rodriguez@fusionenergy.co",
"phone": "+1-555-1602",
"position": "Project Engineer",
"company": "Fusion Energy Solutions",
"website": "https://fusionenergy.co",
"address": "600 Power Blvd, Houston, TX 77002",
"industry": "Renewable Energy",
"founded": 2019,
"employees": 90
},
# Global Innovations Labs
{
"id": 34,
"name": "Dr. Sarah Lee",
"email": "sarah.lee@globalinnovations.com",
"phone": "+1-555-1701",
"position": "Head of R&D",
"company": "Global Innovations Labs",
"website": "https://globalinnovations.com",
"address": "700 Discovery Drive, Raleigh, NC 27601",
"industry": "Biotechnology",
"founded": 2015,
"employees": 220
},
{
"id": 35,
"name": "Michael Brown",
"email": "michael.brown@globalinnovations.com",
"phone": "+1-555-1702",
"position": "Bio-researcher",
"company": "Global Innovations Labs",
"website": "https://globalinnovations.com",
"address": "700 Discovery Drive, Raleigh, NC 27601",
"industry": "Biotechnology",
"founded": 2015,
"employees": 220
},
# Pioneer Logistics Systems
{
"id": 36,
"name": "David Kim",
"email": "david.kim@pioneerlogistics.com",
"phone": "+1-555-1801",
"position": "Logistics Director",
"company": "Pioneer Logistics Systems",
"website": "https://pioneerlogistics.com",
"address": "800 Cargo Way, Atlanta, GA 30303",
"industry": "Logistics & Supply Chain",
"founded": 2013,
"employees": 350
},
{
"id": 37,
"name": "Jessica Chen",
"email": "jessica.chen@pioneerlogistics.com",
"phone": "+1-555-1802",
"position": "Supply Chain Analyst",
"company": "Pioneer Logistics Systems",
"website": "https://pioneerlogistics.com",
"address": "800 Cargo Way, Atlanta, GA 30303",
"industry": "Logistics & Supply Chain",
"founded": 2013,
"employees": 350
},
# Elite Security Solutions
{
"id": 38,
"name": "Chris Davis",
"email": "chris.davis@elitesecurity.com",
"phone": "+1-555-1901",
"position": "Security Consultant",
"company": "Elite Security Solutions",
"website": "https://elitesecurity.com",
"address": "900 Fortress Drive, Washington, D.C. 20001",
"industry": "Security Services",
"founded": 2010,
"employees": 150
},
{
"id": 39,
"name": "Nicole Green",
"email": "nicole.green@elitesecurity.com",
"phone": "+1-555-1902",
"position": "Cybersecurity Expert",
"company": "Elite Security Solutions",
"website": "https://elitesecurity.com",
"address": "900 Fortress Drive, Washington, D.C. 20001",
"industry": "Security Services",
"founded": 2010,
"employees": 150
},
# Digital Canvas Agency
{
"id": 40,
"name": "Laura White",
"email": "laura.white@digitalcanvas.agency",
"phone": "+1-555-2001",
"position": "Lead Designer",
"company": "Digital Canvas Agency",
"website": "https://digitalcanvas.agency",
"address": "1000 Art Street, Los Angeles, CA 90012",
"industry": "Creative Services",
"founded": 2020,
"employees": 55
},
{
"id": 41,
"name": "Ben Carter",
"email": "ben.carter@digitalcanvas.agency",
"phone": "+1-555-2002",
"position": "UX/UI Specialist",
"company": "Digital Canvas Agency",
"website": "https://digitalcanvas.agency",
"address": "1000 Art Street, Los Angeles, CA 90012",
"industry": "Creative Services",
"founded": 2020,
"employees": 55
},
# Northern Star Holdings
{
"id": 42,
"name": "Ethan Wright",
"email": "ethan.wright@northernstarholdings.com",
"phone": "+1-555-2101",
"position": "Investment Manager",
"company": "Northern Star Holdings",
"website": "https://northernstarholdings.com",
"address": "1100 Capital Way, Chicago, IL 60606",
"industry": "Financial Services",
"founded": 2008,
"employees": 90
},
{
"id": 43,
"name": "Megan King",
"email": "megan.king@northernstarholdings.com",
"phone": "+1-555-2102",
"position": "Portfolio Analyst",
"company": "Northern Star Holdings",
"website": "https://northernstarholdings.com",
"address": "1100 Capital Way, Chicago, IL 60606",
"industry": "Financial Services",
"founded": 2008,
"employees": 90
},
# Evergreen Landscaping
{
"id": 44,
"name": "Patrick O'Connell",
"email": "patrick.o'connell@evergreenlandscaping.com",
"phone": "+1-555-2201",
"position": "Operations Director",
"company": "Evergreen Landscaping",
"website": "https://evergreenlandscaping.com",
"address": "1200 Garden Road, Orlando, FL 32801",
"industry": "Landscaping",
"founded": 2012,
"employees": 60
},
{
"id": 45,
"name": "Chloe Adams",
"email": "chloe.adams@evergreenlandscaping.com",
"phone": "+1-555-2202",
"position": "Landscape Architect",
"company": "Evergreen Landscaping",
"website": "https://evergreenlandscaping.com",
"address": "1200 Garden Road, Orlando, FL 32801",
"industry": "Landscaping",
"founded": 2012,
"employees": 60
},
# Quantum Computing Corp
{
"id": 46,
"name": "Dr. Sarah Peterson",
"email": "sarah.peterson@quantumcc.com",
"phone": "+1-555-2301",
"position": "Research Lead",
"company": "Quantum Computing Corp",
"website": "https://quantumcc.com",
"address": "1300 Data Drive, San Francisco, CA 94107",
"industry": "Quantum Computing",
"founded": 2021,
"employees": 70
},
{
"id": 47,
"name": "Leo Martinez",
"email": "leo.martinez@quantumcc.com",
"phone": "+1-555-2302",
"position": "Quantum Developer",
"company": "Quantum Computing Corp",
"website": "https://quantumcc.com",
"address": "1300 Data Drive, San Francisco, CA 94107",
"industry": "Quantum Computing",
"founded": 2021,
"employees": 70
},
# Urban Design Collective
{
"id": 48,
"name": "Sophia Rodriguez",
"email": "sophia.rodriguez@urbandesign.co",
"phone": "+1-555-2401",
"position": "Urban Planner",
"company": "Urban Design Collective",
"website": "https://urbandesign.co",
"address": "1400 Cityscape Lane, New York, NY 10001",
"industry": "Urban Planning",
"founded": 2017,
"employees": 45
},
{
"id": 49,
"name": "Daniel Wilson",
"email": "daniel.wilson@urbandesign.co",
"phone": "+1-555-2402",
"position": "Architectural Designer",
"company": "Urban Design Collective",
"website": "https://urbandesign.co",
"address": "1400 Cityscape Lane, New York, NY 10001",
"industry": "Urban Planning",
"founded": 2017,
"employees": 45
},
# Infinity Medical Devices
{
"id": 50,
"name": "Dr. Emily Davis",
"email": "emily.davis@infinitymed.com",
"phone": "+1-555-2501",
"position": "Product Development Lead",
"company": "Infinity Medical Devices",
"website": "https://infinitymed.com",
"address": "1500 Healthcare Way, Minneapolis, MN 55401",
"industry": "Medical Devices",
"founded": 2014,
"employees": 200
},
{
"id": 51,
"name": "Jason Lee",
"email": "jason.lee@infinitymed.com",
"phone": "+1-555-2502",
"position": "Biomedical Engineer",
"company": "Infinity Medical Devices",
"website": "https://infinitymed.com",
"address": "1500 Healthcare Way, Minneapolis, MN 55401",
"industry": "Medical Devices",
"founded": 2014,
"employees": 200
},
# Echo Digital Marketing
{
"id": 52,
"name": "Chloe Miller",
"email": "chloe.miller@echodigital.com",
"phone": "+1-555-2601",
"position": "SEO Specialist",
"company": "Echo Digital Marketing",
"website": "https://echodigital.com",
"address": "1600 Social Media Dr, Nashville, TN 37203",
"industry": "Digital Marketing",
"founded": 2019,
"employees": 35
},
{
"id": 53,
"name": "Ryan Taylor",
"email": "ryan.taylor@echodigital.com",
"phone": "+1-555-2602",
"position": "Content Strategist",
"company": "Echo Digital Marketing",
"website": "https://echodigital.com",
"address": "1600 Social Media Dr, Nashville, TN 37203",
"industry": "Digital Marketing",
"founded": 2019,
"employees": 35
},
# Zenith Aerospace
{
"id": 54,
"name": "Dr. Alex Garcia",
"email": "alex.garcia@zenithaero.com",
"phone": "+1-555-2701",
"position": "Aerospace Engineer",
"company": "Zenith Aerospace",
"website": "https://zenithaero.com",
"address": "1700 Spaceport Ave, Cape Canaveral, FL 32920",
"industry": "Aerospace",
"founded": 2010,
"employees": 400
},
{
"id": 55,
"name": "Isabella Rossi",
"email": "isabella.rossi@zenithaero.com",
"phone": "+1-555-2702",
"position": "Avionics Specialist",
"company": "Zenith Aerospace",
"website": "https://zenithaero.com",
"address": "1700 Spaceport Ave, Cape Canaveral, FL 32920",
"industry": "Aerospace",
"founded": 2010,
"employees": 400
},
# Harmony Hotels & Resorts
{
"id": 56,
"name": "Maria Hernandez",
"email": "maria.hernandez@harmonyhotels.com",
"phone": "+1-555-2801",
"position": "Hotel Manager",
"company": "Harmony Hotels & Resorts",
"website": "https://harmonyhotels.com",
"address": "1800 Hospitality Lane, Las Vegas, NV 89109",
"industry": "Hospitality",
"founded": 2005,
"employees": 600
},
{
"id": 57,
"name": "David Wilson",
"email": "david.wilson@harmonyhotels.com",
"phone": "+1-555-2802",
"position": "Guest Relations Director",
"company": "Harmony Hotels & Resorts",
"website": "https://harmonyhotels.com",
"address": "1800 Hospitality Lane, Las Vegas, NV 89109",
"industry": "Hospitality",
"founded": 2005,
"employees": 600
},
# Catalyst Capital Group
{
"id": 58,
"name": "Benjamin Harris",
"email": "benjamin.harris@catalystcapital.com",
"phone": "+1-555-2901",
"position": "Managing Director",
"company": "Catalyst Capital Group",
"website": "https://catalystcapital.com",
"address": "1900 Exchange Place, London, UK SW1A 0AA",
"industry": "Venture Capital",
"founded": 2016,
"employees": 80
},
{
"id": 59,
"name": "Sophie Martin",
"email": "sophie.martin@catalystcapital.com",
"phone": "+1-555-2902",
"position": "Investment Analyst",
"company": "Catalyst Capital Group",
"website": "https://catalystcapital.com",
"address": "1900 Exchange Place, London, UK SW1A 0AA",
"industry": "Venture Capital",
"founded": 2016,
"employees": 80
},
# Stellar Solutions Consulting
{
"id": 60,
"name": "Victor Chang",
"email": "victor.chang@stellarsolutions.com",
"phone": "+1-555-3001",
"position": "Senior Consultant",
"company": "Stellar Solutions Consulting",
"website": "https://stellarsolutions.com",
"address": "2000 Business Center Dr, Dallas, TX 75201",
"industry": "Management Consulting",
"founded": 2011,
"employees": 130
},
{
"id": 61,
"name": "Grace Kim",
"email": "grace.kim@stellarsolutions.com",
"phone": "+1-555-3002",
"position": "Strategy Advisor",
"company": "Stellar Solutions Consulting",
"website": "https://stellarsolutions.com",
"address": "2000 Business Center Dr, Dallas, TX 75201",
"industry": "Management Consulting",
"founded": 2011,
"employees": 130
},
# Peak Performance Athletics
{
"id": 62,
"name": "Coach Alex Johnson",
"email": "alex.johnson@peakathletics.com",
"phone": "+1-555-3101",
"position": "Head Coach",
"company": "Peak Performance Athletics",
"website": "https://peakathletics.com",
"address": "2100 Training Way, Denver, CO 80205",
"industry": "Sports & Recreation",
"founded": 2018,
"employees": 40
},
{
"id": 63,
"name": "Megan Cooper",
"email": "megan.cooper@peakathletics.com",
"phone": "+1-555-3102",
"position": "Fitness Instructor",
"company": "Peak Performance Athletics",
"website": "https://peakathletics.com",
"address": "2100 Training Way, Denver, CO 80205",
"industry": "Sports & Recreation",
"founded": 2018,
"employees": 40
},
# AquaFlow Water Solutions
{
"id": 64,
"name": "Dr. Anya Sharma",
"email": "anya.sharma@aquaflow.biz",
"phone": "+1-555-3201",
"position": "Environmental Scientist",
"company": "AquaFlow Water Solutions",
"website": "https://aquaflow.biz",
"address": "2200 River Road, Seattle, WA 98104",
"industry": "Environmental Services",
"founded": 2015,
"employees": 95
},
{
"id": 65,
"name": "James Rodriguez",
"email": "james.rodriguez@aquaflow.biz",
"phone": "+1-555-3202",
"position": "Water Treatment Engineer",
"company": "AquaFlow Water Solutions",
"website": "https://aquaflow.biz",
"address": "2200 River Road, Seattle, WA 98104",
"industry": "Environmental Services",
"founded": 2015,
"employees": 95
},
# Bright Future Education
{
"id": 66,
"name": "Sarah Collins",
"email": "sarah.collins@brightfuture.edu",
"phone": "+1-555-3301",
"position": "Admissions Director",
"company": "Bright Future Education",
"website": "https://brightfuture.edu",
"address": "2300 Knowledge Blvd, Boston, MA 02115",
"industry": "Education",
"founded": 2010,
"employees": 110
},
{
"id": 67,
"name": "Mark Chen",
"email": "mark.chen@brightfuture.edu",
"phone": "+1-555-3302",
"position": "Student Advisor",
"company": "Bright Future Education",
"website": "https://brightfuture.edu",
"address": "2300 Knowledge Blvd, Boston, MA 02115",
"industry": "Education",
"founded": 2010,
"employees": 110
},
# Infinite Innovations Media
{
"id": 68,
"name": "Rachel Green",
"email": "rachel.green@infinitemedia.net",
"phone": "+1-555-3401",
"position": "Executive Producer",
"company": "Infinite Innovations Media",
"website": "https://infinitemedia.net",
"address": "2400 Studio Drive, Los Angeles, CA 90028",
"industry": "Media & Entertainment",
"founded": 2016,
"employees": 75
},
{
"id": 69,
"name": "Tom Adams",
"email": "tom.adams@infinitemedia.net",
"phone": "+1-555-3402",
"position": "Film Editor",
"company": "Infinite Innovations Media",
"website": "https://infinitemedia.net",
"address": "2400 Studio Drive, Los Angeles, CA 90028",
"industry": "Media & Entertainment",
"founded": 2016,
"employees": 75
},
# Capital Connect Realty
{
"id": 70,
"name": "Jessica White",
"email": "jessica.white@capitalconnectrealty.com",
"phone": "+1-555-3501",
"position": "Broker-in-Charge",
"company": "Capital Connect Realty",
"website": "https://capitalconnectrealty.com",
"address": "2500 Property Place, Austin, TX 78704",
"industry": "Real Estate",
"founded": 2017,
"employees": 65
},
{
"id": 71,
"name": "Michael Brown",
"email": "michael.brown@capitalconnectrealty.com",
"phone": "+1-555-3502",
"position": "Residential Agent",
"company": "Capital Connect Realty",
"website": "https://capitalconnectrealty.com",
"address": "2500 Property Place, Austin, TX 78704",
"industry": "Real Estate",
"founded": 2017,
"employees": 65
},
# Swift Logistics Solutions
{
"id": 72,
"name": "Sarah Kim",
"email": "sarah.kim@swiftlogistics.com",
"phone": "+1-555-3601",
"position": "Logistics Coordinator",
"company": "Swift Logistics Solutions",
"website": "https://swiftlogistics.com",
"address": "2600 Freight Forwarding St, Chicago, IL 60608",
"industry": "Logistics & Supply Chain",
"founded": 2019,
"employees": 180
},
{
"id": 73,
"name": "David Lopez",
"email": "david.lopez@swiftlogistics.com",
"phone": "+1-555-3602",
"position": "Warehouse Manager",
"company": "Swift Logistics Solutions",
"website": "https://swiftlogistics.com",
"address": "2600 Freight Forwarding St, Chicago, IL 60608",
"industry": "Logistics & Supply Chain",
"founded": 2019,
"employees": 180
},
# Pinnacle Healthcare Group
{
"id": 74,
"name": "Dr. John Smith",
"email": "john.smith@pinnaclehealth.org",
"phone": "+1-555-3701",
"position": "Chief of Staff",
"company": "Pinnacle Healthcare Group",
"website": "https://pinnaclehealth.org",
"address": "2700 Medical Arts Dr, Houston, TX 77030",
"industry": "Healthcare",
"founded": 2000,
"employees": 700
},
{
"id": 75,
"name": "Maria Garcia",
"email": "maria.garcia@pinnaclehealth.org",
"phone": "+1-555-3702",
"position": "Patient Care Director",
"company": "Pinnacle Healthcare Group",
"website": "https://pinnaclehealth.org",
"address": "2700 Medical Arts Dr, Houston, TX 77030",
"industry": "Healthcare",
"founded": 2000,
"employees": 700
},
# Innovate Solutions Inc.
{
"id": 76,
"name": "Alex Chen",
"email": "alex.chen@innovatesolutions.com",
"phone": "+1-555-3801",
"position": "Lead Innovator",
"company": "Innovate Solutions Inc.",
"website": "https://innovatesolutions.com",
"address": "2800 Tech Way, Seattle, WA 98121",
"industry": "Technology Consulting",
"founded": 2012,
"employees": 100
},
{
"id": 77,
"name": "Sophia Davis",
"email": "sophia.davis@innovatesolutions.com",
"phone": "+1-555-3802",
"position": "Business Development Manager",
"company": "Innovate Solutions Inc.",
"website": "https://innovatesolutions.com",
"address": "2800 Tech Way, Seattle, WA 98121",
"industry": "Technology Consulting",
"founded": 2012,
"employees": 100
},
# Grand Metro Investments
{
"id": 78,
"name": "Robert Johnson",
"email": "robert.johnson@grandmetroinvest.com",
"phone": "+1-555-3901",
"position": "CEO",
"company": "Grand Metro Investments",
"website": "https://grandmetroinvest.com",
"address": "2900 Financial St, New York, NY 10005",
"industry": "Investment Banking",
"founded": 2005,
"employees": 250
},
{
"id": 79,
"name": "Emily Watson",
"email": "emily.watson@grandmetroinvest.com",
"phone": "+1-555-3902",
"position": "Financial Analyst",
"company": "Grand Metro Investments",
"website": "https://grandmetroinvest.com",
"address": "2900 Financial St, New York, NY 10005",
"industry": "Investment Banking",
"founded": 2005,
"employees": 250
},
# Ocean Blue Marine
{
"id": 80,
"name": "Captain David Lee",
"email": "david.lee@oceanbluemarine.com",
"phone": "+1-555-4001",
"position": "Fleet Manager",
"company": "Ocean Blue Marine",
"website": "https://oceanbluemarine.com",
"address": "3000 Harbor Blvd, San Diego, CA 92101",
"industry": "Marine Services",
"founded": 2014,
"employees": 70
},
{
"id": 81,
"name": "Sarah Martinez",
"email": "sarah.martinez@oceanbluemarine.com",
"phone": "+1-555-4002",
"position": "Marine Engineer",
"company": "Ocean Blue Marine",
"website": "https://oceanbluemarine.com",
"address": "3000 Harbor Blvd, San Diego, CA 92101",
"industry": "Marine Services",
"founded": 2014,
"employees": 70
},
# Fusion Food Group
{
"id": 82,
"name": "Chef Maria Rossi",
"email": "maria.rossi@fusionfoodgroup.com",
"phone": "+1-555-4101",
"position": "Executive Chef",
"company": "Fusion Food Group",
"website": "https://fusionfoodgroup.com",
"address": "3100 Culinary Arts St, New Orleans, LA 70112",
"industry": "Food & Beverage",
"founded": 2018,
"employees": 150
},
{
"id": 83,
"name": "Daniel Kim",
"email": "daniel.kim@fusionfoodgroup.com",
"phone": "+1-555-4102",
"position": "Restaurant Manager",
"company": "Fusion Food Group",
"website": "https://fusionfoodgroup.com",
"address": "3100 Culinary Arts St, New Orleans, LA 70112",
"industry": "Food & Beverage",
"founded": 2018,
"employees": 150
},
# Connect HR Solutions
{
"id": 84,
"name": "Lisa Wilson",
"email": "lisa.wilson@connecthr.com",
"phone": "+1-555-4201",
"position": "HR Director",
"company": "Connect HR Solutions",
"website": "https://connecthr.com",
"address": "3200 Employee Way, Atlanta, GA 30308",
"industry": "Human Resources",
"founded": 2016,
"employees": 80
},
{
"id": 85,
"name": "Mark Adams",
"email": "mark.adams@connecthr.com",
"phone": "+1-555-4202",
"position": "Recruitment Specialist",
"company": "Connect HR Solutions",
"website": "https://connecthr.com",
"address": "3200 Employee Way, Atlanta, GA 30308",
"industry": "Human Resources",
"founded": 2016,
"employees": 80
},
# Summit Energy Partners
{
"id": 86,
"name": "Chris Taylor",
"email": "chris.taylor@summitenergy.com",
"phone": "+1-555-4301",
"position": "Energy Consultant",
"company": "Summit Energy Partners",
"website": "https://summitenergy.com",
"address": "3300 Green Power Rd, Denver, CO 80206",
"industry": "Energy Consulting",
"founded": 2010,
"employees": 120
},
{
"id": 87,
"name": "Jessica Brown",
"email": "jessica.brown@summitenergy.com",
"phone": "+1-555-4302",
"position": "Renewable Energy Analyst",
"company": "Summit Energy Partners",
"website": "https://summitenergy.com",
"address": "3300 Green Power Rd, Denver, CO 80206",
"industry": "Energy Consulting",
"founded": 2010,
"employees": 120
},
# NovaTech Systems
{
"id": 88,
"name": "Dr. Sophia Lee",
"email": "sophia.lee@novatechsystems.com",
"phone": "+1-555-4401",
"position": "Lead Researcher",
"company": "NovaTech Systems",
"website": "https://novatechsystems.com",
"address": "3400 Innovation Blvd, Cambridge, MA 02142",
"industry": "Biotechnology",
"founded": 2019,
"employees": 90
},
{
"id": 89,
"name": "Daniel Garcia",
"email": "daniel.garcia@novatechsystems.com",
"phone": "+1-555-4402",
"position": "Clinical Trials Coordinator",
"company": "NovaTech Systems",
"website": "https://novatechsystems.com",
"address": "3400 Innovation Blvd, Cambridge, MA 02142",
"industry": "Biotechnology",
"founded": 2019,
"employees": 90
},
# Premier Property Management
{
"id": 90,
"name": "Olivia Smith",
"email": "olivia.smith@premierpropertymgmt.com",
"phone": "+1-555-4501",
"position": "Property Manager",
"company": "Premier Property Management",
"website": "https://premierpropertymgmt.com",
"address": "3500 Main Street, San Antonio, TX 78205",
"industry": "Property Management",
"founded": 2011,
"employees": 160
},
{
"id": 91,
"name": "James White",
"email": "james.white@premierpropertymgmt.com",
"phone": "+1-555-4502",
"position": "Leasing Agent",
"company": "Premier Property Management",
"website": "https://premierpropertymgmt.com",
"address": "3500 Main Street, San Antonio, TX 78205",
"industry": "Property Management",
"founded": 2011,
"employees": 160
},
# Global Outreach Non-Profit
{
"id": 92,
"name": "Dr. Sarah Johnson",
"email": "sarah.johnson@globaloutreach.org",
"phone": "+1-555-4601",
"position": "Executive Director",
"company": "Global Outreach Non-Profit",
"website": "https://globaloutreach.org",
"address": "3600 Charity Circle, Washington, D.C. 20005",
"industry": "Non-Profit",
"founded": 2008,
"employees": 50
},
{
"id": 93,
"name": "Maria Lopez",
"email": "maria.lopez@globaloutreach.org",
"phone": "+1-555-4602",
"position": "Program Coordinator",
"company": "Global Outreach Non-Profit",
"website": "https://globaloutreach.org",
"address": "3600 Charity Circle, Washington, D.C. 20005",
"industry": "Non-Profit",
"founded": 2008,
"employees": 50
},
# Apex Automotive Group
{
"id": 94,
"name": "Robert Davis",
"email": "robert.davis@apexauto.com",
"phone": "+1-555-4701",
"position": "General Manager",
"company": "Apex Automotive Group",
"website": "https://apexauto.com",
"address": "3700 Motor Ave, Detroit, MI 48208",
"industry": "Automotive",
"founded": 1995,
"employees": 300
},
{
"id": 95,
"name": "Linda Chen",
"email": "linda.chen@apexauto.com",
"phone": "+1-555-4702",
"position": "Sales Director",
"company": "Apex Automotive Group",
"website": "https://apexauto.com",
"address": "3700 Motor Ave, Detroit, MI 48208",
"industry": "Automotive",
"founded": 1995,
"employees": 300
},
# Coastal Culinary Institute
{
"id": 96,
"name": "Chef Julian King",
"email": "julian.king@coastalculinary.edu",
"phone": "+1-555-4801",
"position": "Dean of Culinary Arts",
"company": "Coastal Culinary Institute",
"website": "https://coastalculinary.edu",
"address": "3800 Gourmet Lane, San Francisco, CA 94133",
"industry": "Education",
"founded": 2013,
"employees": 40
},
{
"id": 97,
"name": "Samantha Lee",
"email": "samantha.lee@coastalculinary.edu",
"phone": "+1-555-4802",
"position": "Admissions Officer",
"company": "Coastal Culinary Institute",
"website": "https://coastalculinary.edu",
"address": "3800 Gourmet Lane, San Francisco, CA 94133",
"industry": "Education",
"founded": 2013,
"employees": 40
},
# Quantum Innovations Group
{
"id": 98,
"name": "Dr. Elena Petrova",
"email": "elena.petrova@quantuminnovations.com",
"phone": "+1-555-4901",
"position": "Lead AI Scientist",
"company": "Quantum Innovations Group",
"website": "https://quantuminnovations.com",
"address": "3900 Genius Way, Palo Alto, CA 94301",
"industry": "Artificial Intelligence",
"founded": 2020,
"employees": 100
},
{
"id": 99,
"name": "Michael Wang",
"email": "michael.wang@quantuminnovations.com",
"phone": "+1-555-4902",
"position": "Machine Learning Engineer",
"company": "Quantum Innovations Group",
"website": "https://quantuminnovations.com",
"address": "3900 Genius Way, Palo Alto, CA 94301",
"industry": "Artificial Intelligence",
"founded": 2020,
"employees": 100
},
# Elite Event Planning
{
"id": 100,
"name": "Sarah Adams",
"email": "sarah.adams@eliteevents.com",
"phone": "+1-555-5001",
"position": "Event Director",
"company": "Elite Event Planning",
"website": "https://eliteevents.com",
"address": "4000 Celebration Ave, Miami, FL 33130",
"industry": "Event Management",
"founded": 2015,
"employees": 30
},
{
"id": 101,
"name": "David Rivera",
"email": "david.rivera@eliteevents.com",
"phone": "+1-555-5002",
"position": "Logistics Coordinator",
"company": "Elite Event Planning",
"website": "https://eliteevents.com",
"address": "4000 Celebration Ave, Miami, FL 33130",
"industry": "Event Management",
"founded": 2015,
"employees": 30
}
]
@app.route('/')
def home():
return jsonify({
"message": "Welcome to the Mock Contacts API",
"version": "1.0.0",
"endpoints": {
"GET /contacts": "Get all contacts",
"GET /contacts/<id>": "Get contact by ID",
"GET /companies": "Get all companies",
"GET /contacts/company/<company_name>": "Get contacts by company",
"GET /contacts/search": "Search contacts (params: name, email, position, company)"
},
"total_contacts": len(CONTACTS_DB)
})
@app.route('/contacts', methods=['GET'])
def get_contacts():
# Check for a 'no_pagination' or 'all' parameter
# For example: /contacts?all=true or /contacts?per_page=all
# Let's use 'per_page=all' as it aligns with the pagination concept
per_page_param = request.args.get('per_page')
if per_page_param and per_page_param.lower() == 'all':
# Return all contacts
return jsonify({
"contacts": CONTACTS_DB,
"pagination": {
"page": 1,
"pages": 1, # Only one page when all are returned
"per_page": len(CONTACTS_DB), # Indicate all items are returned
"total": len(CONTACTS_DB)
}
})
else:
# Existing pagination logic
page = request.args.get('page', 1, type=int)
per_page = request.args.get('per_page', 10, type=int) # Default to 10 if not 'all'
start_index = (page - 1) * per_page
end_index = start_index + per_page
paginated_contacts = CONTACTS_DB[start_index:end_index]
total_contacts = len(CONTACTS_DB)
total_pages = (total_contacts + per_page - 1) // per_page
return jsonify({
"contacts": paginated_contacts,
"pagination": {
"page": page,
"pages": total_pages,
"per_page": per_page,
"total": total_contacts
}
})
@app.route('/contacts/<int:contact_id>', methods=['GET'])
def get_contact(contact_id):
contact = next((c for c in CONTACTS_DB if c['id'] == contact_id), None)
if not contact:
return jsonify({"error": "Contact not found"}), 404
return jsonify(contact)
@app.route('/companies', methods=['GET'])
def get_companies():
companies = {}
for contact in CONTACTS_DB:
company_name = contact['company']
if company_name not in companies:
companies[company_name] = {
"name": company_name,
"website": contact['website'],
"address": contact['address'],
"industry": contact['industry'],
"founded": contact['founded'],
"employees": contact['employees'],
"contact_count": 0
}
companies[company_name]["contact_count"] += 1
return jsonify({"companies": list(companies.values())})
@app.route('/contacts/company/<company_name>', methods=['GET'])
def get_contacts_by_company(company_name):
# URL decode and handle spaces
company_name = company_name.replace('%20', ' ')
contacts = [c for c in CONTACTS_DB if c['company'].lower() == company_name.lower()]
if not contacts:
return jsonify({"error": f"No contacts found for company: {company_name}"}), 404
return jsonify({
"company": company_name,
"contacts": contacts,
"count": len(contacts)
})
@app.route('/contacts/search', methods=['GET'])
def search_contacts():
name = request.args.get('name', '').lower()
email = request.args.get('email', '').lower()
position = request.args.get('position', '').lower()
company = request.args.get('company', '').lower()
results = []
for contact in CONTACTS_DB:
match = True
if name and name not in contact['name'].lower():
match = False
if email and email not in contact['email'].lower():
match = False
if position and position not in contact['position'].lower():
match = False
if company and company not in contact['company'].lower():
match = False
if match:
results.append(contact)
return jsonify({
"results": results,
"count": len(results),
"query": {
"name": name,
"email": email,
"position": position,
"company": company
}
})
@app.route('/health', methods=['GET'])
def health_check():
return jsonify({
"status": "healthy",
"timestamp": datetime.now().isoformat(),
"api_version": "1.0.0"
})
if __name__ == '__main__':
app.run(host='0.0.0.0', port=7860, debug=True)