πŸ•Œ Prayer Times API Documentation

Base URL

https://bonnetid.krittimmanush.com/api

πŸ“… Get Monthly Prayer Times

GET /prayers

  • kommune (string) β€” Municipality name. Required
  • month (YYYY-MM) β€” Month. Required

Example:

GET /prayers?kommune=tromso&month=2025-10

  • Accept: application/json

[
  {
    "date": "2025-10-07",
    "fajr": "05:37",
    "sunrise": "07:12",
    "dhuhr": "12:33",
    "asr": "15:21",
    "maghrib": "18:01",
    "isha": "19:34"
  }
]

πŸ“… Get Daily Prayer Times

GET /prayers

  • kommune (string) β€” Municipality name. Required
  • date (YYYY-MM-DD) β€” Date. Required

Example:

GET /prayers?kommune=tromso&date=2025-10-30

  • Accept: application/json

[
  {
    "date": "2025-10-07",
    "fajr": "05:37",
    "sunrise": "07:12",
    "dhuhr": "12:33",
    "asr": "15:21",
    "maghrib": "18:01",
    "isha": "19:34"
  }
]

πŸ•°οΈ Next Upcoming Prayer

GET /next-prayer

  • kommune (string) β€” Municipality name. Required

Example:

GET /next-prayer?kommune=tromso

  • Accept: application/json

{
  "name": "Asr",
  "time": "15:02",
  "date": "2025-10-09",
  "datetime_iso": "2025-10-09T15:02:00+02:00",
  "seconds_remaining": 587.84407
}

πŸ” Authentication

POST /login

Authenticate user and receive a JWT token.

  • email (string) β€” Email address. Required
  • password (string) β€” Password. Required

Example:

POST /login
{
  "email": "admin@example.com",
  "password": "secret"
}

  • Accept: application/json

{
    "access_token": "eyJ0eXAiOi...",
    "token_type": "bearer",
    "expires_in": 3600
}

Upload

POST /upload (requires JWT)

Upload and parse prayer PDF.

  • pdf (file) β€” PDF. Required

Example:

POST /upload

  • Accept: application/json
  • Authorization: Bearer {token}
  • Content-Type: multipart/form-data

{
    "status": "success",
    "message": "PDF parsed and data saved",
    "kommune": "tromso"
}

πŸ”Š Audio Files

Served directly via /storage/adhan/fajr.mp3

Served directly via /storage/adhan/general.mp3

🚫 Error Format

{
  "error": "Unauthorized",
  "message": "Token not provided or invalid."
}

πŸ“‹ Endpoint Summary

MethodEndpointAuthDescription
POST/login❌Get JWT token
POST/uploadβœ…Upload & parse PDF
GET/prayers❌Get monthly or daily times
GET/next-prayer❌Get next upcoming prayer