API Documentation

Complete guide to using the PAN API service

Getting Started

Learn how to use the PAN API service

API Endpoint

POST https://api.pan-service.com/v1/fetch-pan

This is the main endpoint for fetching PAN details using an Aadhaar number.

Authentication

All API requests require authentication using an API key. Include your API key in the request headers:

X-API-Key: YOUR_API_KEY_HERE

Request Format

Send a POST request with the following JSON payload:

{
  "aadhaar_number": "123456789012"
}

Response Format

Successful responses will return JSON data in the following format:

{
  "status": "success",
  "data": {
    "aadhaar_number": "123456789012",
    "pan_number": "ABCDE1234F",
    "name": "John Doe",
    "father_name": "Jane Doe",
    "address": "123 Main Street, City, State - 123456"
  }
}

API Key Management

How to manage your API keys

Viewing Your API Keys

You can view your API keys on the API Keys page. Each key has a specific hit limit.

Using Your API Key

Include your API key in the X-API-Key header of every request:

curl -X POST https://api.pan-service.com/v1/fetch-pan \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY_HERE" \
  -d '{"aadhaar_number": "123456789012"}'

Rate Limits

Each API key has a daily hit limit. You can check your remaining hits on the API Keys page.

When you reach your limit, requests will return a 429 error until the limit resets.

Error Handling

Understanding API response codes

Common Response Codes

  • 200 - Success: Request was processed successfully
  • 400 - Bad Request: Invalid request parameters
  • 401 - Unauthorized: Invalid or missing API key
  • 403 - Forbidden: API key has been deactivated
  • 404 - Not Found: PAN details not found for the Aadhaar number
  • 429 - Too Many Requests: API key has reached its hit limit
  • 500 - Internal Server Error: Something went wrong on the server

Error Response Format

Error responses will be in the following format:

{
  "status": "error",
  "message": "Error description here",
  "code": 400
}

Support

Getting help with the API

Need Help?

If you're having trouble with the API, you can:

  • Check your API Request History for error details
  • Contact your system administrator
  • Refer to the examples in this documentation