```php
<?php

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

$data = Request::get();

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

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

$query = "

SELECT

p.id AS pincode_id,
p.pincode,
p.area_name,

c.id AS city_id,
c.name AS city_name,

s.id AS state_id,
s.name AS state_name

FROM pincodes p

JOIN cities c
ON p.city_id = c.id

JOIN states s
ON c.state_id = s.id

WHERE p.pincode = :pincode
AND p.status = 1

LIMIT 1

";

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

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

$row = $stmt->fetch();

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

Response::success($row);