Third-party apps

Masjids

The canonical public representation of one masjid. Find one by name or around a point, then read it by its id.

Right on the key: Masjid profile: read.

Retrieve a masjid

Developer key

GET/v1/masjids/{id}

The canonical public representation of one masjid. Identify a masjid by its id, never by its coordinates.

Parameters

  • idstring · pathrequired

    The masjid id, msj_…, as search, nearby or a previous read gave it.

Returns

The masjid.

  • hasDonationCampaignboolean

    Whether GET /v1/masjids/{id}/donation-campaign answers a campaign. Changes when a campaign is enabled or disabled, never per donation.

  • idstring

    The masjid id, msj_….

  • linksobject

    Outbound links: report always, the others absent when unknown.

    Show child attributes (4)
    • claimstringoptional

      Where the masjid claims or updates its page. Link the attribution to it ("Masjid data provided by Masjidbox").

    • donatestringoptional

      The donation page. Absent when unknown.

    • reportstring

      Where a user reports an error in this masjid's times. Always present: the page takes the report, or invites the masjid to claim its page when nobody manages it yet. Link a "Report an error" next to the attribution. To preselect the form, append any of ?prayer=&kind=&day= to the link: prayer is one of fajr, dhuhr, asr, maghrib, isha, jumuah or other; kind is athan or iqamah; day is the day the time is wrong, YYYY-MM-DD, from a week before the masjid's today to 30 days after.

    • websitestringoptional

      The masjid's own website. Absent when unknown.

  • locationobject

    Where the masjid is. Coordinates come as a pair or not at all.

    Show child attributes (5)
    • addressstringoptional

      The postal address, one line.

    • citystringoptional

      The city.

    • countrystringoptional

      ISO 3166-1 alpha-2, upper case.

    • latitudenumberoptional

      Latitude, WGS 84 decimal degrees. Identify a masjid by its id, never by its coordinates.

    • longitudenumberoptional

      Longitude, WGS 84 decimal degrees. Identify a masjid by its id, never by its coordinates.

  • namestring

    The masjid name.

  • objectmasjid

    Always masjid.

  • timezonestringoptional

    The masjid's IANA timezone, in which its prayer times are given.

GET /v1/masjids/{id}
curl "https://hub.masjidbox.com/v1/masjids/msj_abc123defg" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · Masjid
{
  "hasDonationCampaign": true,
  "id": "msj_abc123defg",
  "links": {
    "claim": "https://dashboard.masjidbox.com/hub/claim/msj_abc123defg",
    "donate": "https://masjidbox.com/donate/abc123defg",
    "report": "https://hub.masjidbox.com/report/msj_abc123defg",
    "website": "https://www.eastlondonmosque.org.uk"
  },
  "location": {
    "address": "82-92 Whitechapel Rd, London E1 1JQ",
    "city": "London",
    "country": "GB",
    "latitude": 51.5173,
    "longitude": -0.0652
  },
  "name": "East London Mosque",
  "object": "masjid",
  "timezone": "Europe/London"
}

Find masjids near a point

Developer key

GET/v1/masjids/nearby

The masjids around a point, nearest first, each with its distance. Not pageable.

Parameters

  • latnumber · queryrequired

    Latitude of the point, decimal degrees within ±90.

  • lonnumber · queryrequired

    Longitude of the point, decimal degrees within ±180.

Returns

The masjids near the point.

  • objectlist

    Always list.

  • dataobject[]

    The masjids near the point, nearest first.

    Show child attributes (17)
    • hasDonationCampaignboolean

      Whether GET /v1/masjids/{id}/donation-campaign answers a campaign. Changes when a campaign is enabled or disabled, never per donation.

    • idstring

      The masjid id, msj_….

    • linksobject

      Outbound links: report always, the others absent when unknown.

    • links.claimstringoptional

      Where the masjid claims or updates its page. Link the attribution to it ("Masjid data provided by Masjidbox").

    • links.donatestringoptional

      The donation page. Absent when unknown.

    • links.reportstring

      Where a user reports an error in this masjid's times. Always present: the page takes the report, or invites the masjid to claim its page when nobody manages it yet. Link a "Report an error" next to the attribution. To preselect the form, append any of ?prayer=&kind=&day= to the link: prayer is one of fajr, dhuhr, asr, maghrib, isha, jumuah or other; kind is athan or iqamah; day is the day the time is wrong, YYYY-MM-DD, from a week before the masjid's today to 30 days after.

    • links.websitestringoptional

      The masjid's own website. Absent when unknown.

    • locationobject

      Where the masjid is. Coordinates come as a pair or not at all.

    • location.addressstringoptional

      The postal address, one line.

    • location.citystringoptional

      The city.

    • location.countrystringoptional

      ISO 3166-1 alpha-2, upper case.

    • location.latitudenumberoptional

      Latitude, WGS 84 decimal degrees. Identify a masjid by its id, never by its coordinates.

    • location.longitudenumberoptional

      Longitude, WGS 84 decimal degrees. Identify a masjid by its id, never by its coordinates.

    • namestring

      The masjid name.

    • objectmasjid

      Always masjid.

    • timezonestringoptional

      The masjid's IANA timezone, in which its prayer times are given.

    • distanceKmnumber

      Distance from the point asked, in kilometres.

GET /v1/masjids/nearby
curl "https://hub.masjidbox.com/v1/masjids/nearby?lat=51.5173&lon=-0.0652" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · NearbyMasjidList
{
  "data": [
    {
      "hasDonationCampaign": true,
      "id": "msj_abc123defg",
      "links": {
        "claim": "https://dashboard.masjidbox.com/hub/claim/msj_abc123defg",
        "donate": "https://masjidbox.com/donate/abc123defg",
        "report": "https://hub.masjidbox.com/report/msj_abc123defg",
        "website": "https://www.eastlondonmosque.org.uk"
      },
      "location": {
        "address": "82-92 Whitechapel Rd, London E1 1JQ",
        "city": "London",
        "country": "GB",
        "latitude": 51.5173,
        "longitude": -0.0652
      },
      "name": "East London Mosque",
      "object": "masjid",
      "timezone": "Europe/London",
      "distanceKm": 0.8
    }
  ],
  "object": "list"
}