Authentication

All requests to the GeoAPI must be authenticated by including your secret API key in the request header.

Header:

X-API-Key: YOUR_SECRET_API_KEY

Reverse Geocoding

Convert geographic coordinates (latitude, longitude) into a human-readable address.

Endpoint

GET https://location-app.tail87cc57.ts.net/api/v1/reverse-geocode

Query Parameters

Parameter Type Required Description
latfloatYesLatitude of the location.
lngfloatYesLongitude of the location.
langstringNoLanguage code (e.g., en, bn).

Request Example

curl -G "<?php echo e(url('/api/v1/reverse-geocode')); ?>" -d "lat=23.7329" -d "lng=90.3943" -H "X-API-Key: YOUR_API_KEY"

Response Example

{
  "status": "OK",
  "message": "Success",
  "data": {
    "results": [
      {
        "place_id": 1,
        "name": "Curzon Hall, University of Dhaka",
        "formatted_address": "Curzon Hall, University of Dhaka, Dhaka",
        "geometry": { "location": { "lat": 23.7329, "lng": 90.3943 } }
      }
    ]
  }
}

Layers

Retrieve geographic data layers for visualization.

Get Landmarks

Endpoint

GET https://location-app.tail87cc57.ts.net/api/v1/layers/landmarks

Request Example

curl "<?php echo e(url('/api/v1/layers/landmarks')); ?>" -H "X-API-Key: YOUR_API_KEY"

Response Example

{
  "status": "OK",
  "message": "Success",
  "data": {
    "results": [
      {
        "place_id": 1,
        "name": "Curzon Hall, University of Dhaka",
        "formatted_address": "Curzon Hall, University of Dhaka, Dhaka",
        "geometry": { "location": { "lat": 23.7329, "lng": 90.3943 } }
      }
    ]
  }
}

Get Union Boundaries

Endpoint

GET https://location-app.tail87cc57.ts.net/api/v1/layers/unions

Request Example

curl "<?php echo e(url('/api/v1/layers/unions')); ?>" -H "X-API-Key: YOUR_API_KEY"

Response Example

{
  "status": "OK",
  "message": "Success",
  "data": {
    "results": [
      {
        "place_id": 1,
        "name": "Curzon Hall, University of Dhaka",
        "formatted_address": "Curzon Hall, University of Dhaka, Dhaka",
        "geometry": { "location": { "lat": 23.7329, "lng": 90.3943 } }
      }
    ]
  }
}

Geofences

Manage and test virtual geographic boundaries.

Store Geofence

Endpoint

POST https://location-app.tail87cc57.ts.net/api/v1/geofences

Request Example

curl -X POST "<?php echo e(url('/api/v1/geofences')); ?>" -H "Content-Type: application/json" -H "X-API-Key: YOUR_API_KEY" -d '{"name": "My Geofence", "polygon": "POLYGON((...))"}'

Response Example

{
  "status": "OK",
  "message": "Success",
  "data": {
    "results": [
      {
        "place_id": 1,
        "name": "Curzon Hall, University of Dhaka",
        "formatted_address": "Curzon Hall, University of Dhaka, Dhaka",
        "geometry": { "location": { "lat": 23.7329, "lng": 90.3943 } }
      }
    ]
  }
}

Check Point

Endpoint

GET https://location-app.tail87cc57.ts.net/api/v1/geofences/check

Request Example

curl -G "<?php echo e(url('/api/v1/geofences/check')); ?>" -d "lat=23.7329" -d "lng=90.3943" -H "X-API-Key: YOUR_API_KEY"

Response Example

{
  "status": "OK",
  "message": "Success",
  "data": {
    "results": [
      {
        "place_id": 1,
        "name": "Curzon Hall, University of Dhaka",
        "formatted_address": "Curzon Hall, University of Dhaka, Dhaka",
        "geometry": { "location": { "lat": 23.7329, "lng": 90.3943 } }
      }
    ]
  }
}