{% extends 'dashboard/base.html' %} {% load static %} {% block title %}Location API Testing - Peza API{% endblock %} {% block breadcrumb %}Location API Testing{% endblock %} {% block extra_css %} {% endblock %} {% block content %}

Location API Testing

{% if not api_keys %}

No API keys found. Create one

{% endif %}

Examples: Lilongwe, Blantyre, Mzuzu

cURL Command

curl -H "X-API-Key: YOUR_API_KEY" \
  "https://developers.pezamw.com/api/locations/?location=Lilongwe&category=hospital"

Raw Response

Status
Duration
Response Headers
No response yet.

Search Results

0 results

Select an API key and click "Search Locations"

Code Examples

import requests

api_key = "your_api_key_here"
url = "https://developers.pezamw.com/api/locations/"
headers = {"X-API-Key": api_key}
params = {
    "location": "Lilongwe",
    "category": "hospital",
    "radius": 5000
}

response = requests.get(
    url, 
    headers=headers, 
    params=params
)
data = response.json()

if data.get('success'):
    for loc in data['locations']:
        print(f"{loc['name']} - {loc['distance']}")

API Information

Endpoint

GET /api/locations/

Authentication

X-API-Key header required

Required Parameters

  • location (city name)
  • category (service type)

Optional

  • radius (default: 5000m)
  • limit (max results)

Categories

hospital clinic pharmacy police bank
{% endblock %}