```php
<?php

require_once '../../core/api_bootstrap.php';

$data = Request::get();

try {

    Validator::required($data,['lead_id']);

    $db = new Database();
    $conn = $db->connect();

    $query = "

        SELECT

        l.*,

        c.name AS category_name,
        sc.name AS subcategory_name

        FROM customer_leads l

        LEFT JOIN categories c
        ON l.category_id = c.id

        LEFT JOIN sub_categories sc
        ON l.sub_category_id = sc.id

        WHERE l.id = :lead_id

        LIMIT 1

    ";

    $stmt = $conn->prepare($query);

    $stmt->execute([
        ':lead_id'=>$data['lead_id']
    ]);

    $lead = $stmt->fetch();

    if(!$lead){
        Response::error("Lead not found",404);
    }


    /*
    GET DISTRIBUTED PROVIDERS
    */

    $query = "

        SELECT
        ld.provider_id,
        p.name,
        p.phone

        FROM leads_distribution ld

        JOIN providers p
        ON ld.provider_id = p.id

        WHERE ld.lead_id = :lead_id

    ";

    $stmt = $conn->prepare($query);

    $stmt->execute([
        ':lead_id'=>$data['lead_id']
    ]);

    $providers = $stmt->fetchAll();


    Response::success([
        "lead"=>$lead,
        "providers"=>$providers
    ]);

}
catch(Exception $e){

    Logger::log("system.log",$e->getMessage());
    Response::error("Server error",500);

}