Data Schema — API Field Reference

Events Page — API Data Schema & Reference

Date: 2026-03-16 Source: Live API pull from api2.almaghrib.org


Stored Data Files

File Endpoint Size
api-response-mega-menu-events.json GET /v1/wp/mega-menu-events 268 KB
api-response-upcoming-events.json GET /v1/wp/upcoming-events 260 KB
api-response-continents.json GET /v1/wp/get-continents 200 B

Primary Endpoint: GET /v1/wp/mega-menu-events

Response Shape

{
  onsite: {
    weekend_seminars: { upcoming: Event[] },        // 8 events
    ilmfests:         { upcoming: Event[] },        // 0 events
    ilmnights:        { upcoming: Event[] },        // 13 events
    community_events: { upcoming: Event[] }         // 0 events
  },
  online: {
    fall_semester:     { upcoming: Event[] },       // 0 events
    on_demand:         { upcoming: Event[] },       // 1 event
    mentorship:        { upcoming: Event[] },       // 0 events
    faith_essesntials: { upcoming: FECourse[], plan: Plan }  // 40 courses
  },
  kids: {
    ilmspring: { upcoming: Event[], previous: Event[] }  // 0 upcoming, 11 previous
  },
  travel: {
    blessed_voyage: { upcoming: TravelEvent[], planned: TravelEvent[] }  // 0 upcoming, 2 planned
  }
}

Event Schema (Onsite — Weekend Seminars & Ilm Nights)

interface Event {
  // Identity
  event_id: number;            // e.g., 2361
  product_id: number;          // 1=Weekend Seminar, 2=Weekend Seminar, 5=IlmNight, 8=Single Day Seminar
  product_title: string;       // "Single Day Seminar", "IlmNight"
  slug: string;                // "blessed", "against-all-odds"

  // Content
  heading: string;             // "Blessed" (course title)
  sub_heading: string;         // "The Prophets Day Through 24 Hours" (course subtitle)
  description: string;         // HTML string with <p> tags

  // Instructor
  instructors: {
    avatar: string;            // URL — may be default placeholder
    name: string;              // "Omar Hedroug"
  }[];

  // Location
  city: string;                // "Ottawa"
  country: string;             // "Canada"
  continent: string;           // "North America"
  qabeelah: string;            // "Ansar" (local chapter name)
  distance: number;            // km from user's GeoIP location, e.g., 244.5

  // Timing
  datetime_start: string;      // "2026-05-03 10:00:00" (UTC)
  datetime_end: string;        // "2026-05-03" (date only for some)
  schedule_tz: {               // Local timezone schedule
    datetime_start: string;    // "2026-05-03 06:00:00"
    datetime_end: string;      // "2026-05-03 14:00:00"
  }[];

  // Academic
  credits: string | null;      // "1.50" or null (ilmnights have null)
  code: string | null;         // "124" or null

  // Pricing
  price: {
    pricing_current: string;           // "standard" | "early" | "special"
    pricing_current_title: string | null;
    pricing_current_date_end: string | null;
    pricing_breakdown: {
      standard: Record<string, string>; // { "1": "59.00" }
      early: Record<string, string>;    // { "1": "29.50" }
      special: Record<string, string>;  // {} if none
    };
    pricing_currency: {
      code_numeric: number;             // 124
      code_alphabetic: string;          // "CAD"
      name: string;                     // "Canadian Dollar"
      symbol: string;                   // "C$"
    };
  };

  // Images
  image: string;               // Poster 250x375: "https://public.assets.almaghrib.org/titles/{id}/img/poster_250x375.jpg"
  image_bg: string;            // Background 960x600: "https://public.assets.almaghrib.org/titles/{id}/img/bg_960x600.jpg"
  introductory_video: null | { // Only for online courses
    id: number;
    video_src: string;         // "vimeo"
    video_id: string;
    description: string;
  };

  // Social Proof
  total_attendees: number;     // 46
  event_attendees: {           // Array of registered student avatars
    avatar: string;
  }[];

  // Venue
  event_schedule_venue: null | string;
  site_url: string | null;     // "https://www.almaghrib.org/blessed/" — registration page

  // Sorting
  closest_sequence_number: number;  // Rank within category (by distance)
  closest_global_order: number;     // Rank across all events (by date)
  closest_group_order: number;      // Rank within group (by distance then date)
}

Faith Essentials Schema (Simplified)

interface FECourse {
  id: number;
  title: string;               // "Purity Of the Heart"
  image: string;               // "https://assets.almaghrib.org/fe/courses/thumbnails/2.jpg"
}

interface FEPlan {
  amount: string;              // "15.00"
  currency_id: number;
  currency: {
    code_numeric: number;
    code_alphabetic: string;   // "USD"
    name: string;
    symbol: string;            // "$"
  };
}

Travel Event Schema (Different Structure)

interface TravelEvent {
  id: number;
  title: string;               // "Spain 2026"
  description: string;         // Plain text
  standard_price: string | null;
  special_price: string | null;
  credit: string | null;
  location: string;            // "Bosnia"
  date: string;                // "TBD 2026" (free-form)
  instructor: string | null;
  instructor_avatar: string;
  currency: string;            // "$"
  type: string;                // "planned" | "upcoming"
  image: string;               // "https://public.assets.almaghrib.org/static-events/{id}/img/image.jpg"
}

Continents Endpoint: GET /v1/wp/get-continents

[
  {"iso": 1, "name": "Africa"},
  {"iso": 2, "name": "Antarctica"},
  {"iso": 3, "name": "Asia"},
  {"iso": 4, "name": "Europe"},
  {"iso": 5, "name": "North America"},
  {"iso": 6, "name": "Oceania"},
  {"iso": 7, "name": "South America"}
]

Current Live Data Summary (2026-03-16)

Event Counts by Type

Category Sub-type Count
Onsite Weekend Seminars 8
Onsite Ilm Nights 13
Onsite IlmFests 0
Onsite Community Events 0
Online On-Demand 1
Online Faith Essentials 40
Kids IlmSpring (previous) 11
Travel Planned 2
Total onsite events 21

Locations with Active Events

Continent Country Cities
North America Canada Calgary, Mississauga, Ottawa
North America United States Bay Area, Boston, Charlotte, Dallas, Houston, Memphis, Minneapolis, New Jersey, New York City, Orlando, Raleigh, Seattle, Washington DC
Europe United Kingdom Birmingham, London, Manchester

Product ID → Event Type Mapping

Product ID Type
1 Weekend Seminar
2 Weekend Seminar
3 IlmFest
5 IlmNight
8 Single Day Seminar
10 Online (On-Demand)
11 Virtual
13 Virtual
15 Mentorship
17 Mentorship
18 IlmSpring (Kids)
21 Community Event

Pricing Samples

Event City Currency Standard Early Bird
Blessed Ottawa CAD C$59.00 C$29.50
Proofs of Prophethood Orlando USD $65.00 $32.50
Shifa London GBP £40.00 £20.00
A.R.T Birmingham GBP £40.00 £20.00

Key Data Notes for Design

  1. Ilm Nights have no creditscredits and code are null
  2. Some events have no site_url — need fallback CTA strategy
  3. Pricing is currency-localized — CAD for Canada, USD for US, GBP for UK
  4. total_attendees ranges from 0 (new events) to 2,261 (online on-demand)
  5. Descriptions are HTML — need to strip tags or render safely
  6. Instructor avatars — many use default placeholder, need graceful handling
  7. schedule_tz gives local time; datetime_start is UTC
  8. Distance field is from user's GeoIP — won't be present in static mockup (use stored order)