๐Ÿ“ข News

REST API Documentation

Programmatic access to Harwest International Business College public data. All endpoints return JSON and require a valid Bearer token.

Authentication

Every request must include an Authorization header with a Bearer token. Contact the site administrator to obtain an API key.

Authorization: Bearer YOUR_API_KEY

Base URL

https://hibc.edu.lk/api/v1

API Key

Contact your administrator for access credentials.

Response Format

List endpoints

{
  "data": [ ... ],
  "current_page": 1,
  "last_page": 3,
  "per_page": 20,
  "total": 54,
  "next_page_url": "...",
  "prev_page_url": null
}

Single-object

{
  "data": {
    "id": 1,
    "title": "...",
    ...
  }
}

Errors

401 { "error": "Unauthorised." }
404 { "error": "Not found." }
503 { "error": "API access is
     not configured." }

Quick Start Examples

Laravel (PHP)

use Illuminate\Support\Facades\Http;

$response = Http::withToken('YOUR_API_KEY')
    ->get('https://hibc.edu.lk/api/v1/programmes');

$programmes = $response->json('data');

JavaScript / Fetch

const res = await fetch(
  'https://hibc.edu.lk/api/v1/programmes',
  {
    headers: {
      Authorization: 'Bearer YOUR_API_KEY'
    }
  }
);
const { data } = await res.json();

cURL

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://hibc.edu.lk/api/v1/programmes"

Dart / Flutter

final res = await http.get(
  Uri.parse('https://hibc.edu.lk/api/v1/programmes'),
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
  },
);
final data = jsonDecode(res.body)['data'];

Programmes

GET /programmes

List all active programmes (paginated).

Query Parameters

school Filter by school slug
level Filter by level (e.g. diploma, degree)
search Search in title and SEO description
featured Pass any value to return only featured programmes
per_page Results per page (default: 20)
page Page number

Returns

Paginated list of programme objects with school info.

Example

https://hibc.edu.lk/api/v1/programmes?school=business&level=diploma&per_page=10
GET /programmes/{slug}

Full programme detail including all content sections, fees, instructors, and FAQs.

Query Parameters

slug Programme URL slug

Returns

Full programme object.

Example

https://hibc.edu.lk/api/v1/programmes/business-management-diploma

AI / Chatbot

GET /ai-training

All institution content in one flat response โ€” optimised for feeding AI chatbot training (BotCommerce, WATI, etc.). Includes every active programme with fees, entry requirements, modules, outcomes, FAQs, school descriptions, and contact info.

Returns

Object with institution name, generated_at timestamp, total_entries count, and data array. Each data item has a topic string and a content string.

Example

https://hibc.edu.lk/api/v1/ai-training

Schools

GET /schools

List all active schools with their active programme count.

Returns

Array of school objects.

Example

https://hibc.edu.lk/api/v1/schools
GET /schools/{slug}

School detail with its list of active programmes.

Query Parameters

slug School URL slug

Returns

School object with nested programmes array.

Example

https://hibc.edu.lk/api/v1/schools/business

News

GET /news

Latest news articles (paginated, newest first).

Query Parameters

per_page Results per page (default: 15)
page Page number

Returns

Paginated list of news summary objects.

Example

https://hibc.edu.lk/api/v1/news
GET /news/{slug}

Full news article with content.

Query Parameters

slug News article slug

Returns

News object with full content.

Example

https://hibc.edu.lk/api/v1/news/college-wins-award-2026

Events

GET /events

Events list ordered by event date.

Query Parameters

upcoming Pass any value to return only future events
per_page Results per page (default: 15)
page Page number

Returns

Paginated list of event objects.

Example

https://hibc.edu.lk/api/v1/events?upcoming=1
GET /events/{slug}

Full event detail with content.

Query Parameters

slug Event slug

Returns

Event object with full content, location, organizer, and dates.

Example

https://hibc.edu.lk/api/v1/events/graduation-ceremony-2026

Content

GET /announcements

Active announcements/banners ordered by display order.

Returns

Array of announcement objects (id, message, link, link_text, type, order).

Example

https://hibc.edu.lk/api/v1/announcements
GET /staff

Active staff members. Use the subtype param to filter by role.

Query Parameters

subtype Filter by subtype: lecturer_instructor, academic_team, administrative

Returns

Array of staff objects.

Example

https://hibc.edu.lk/api/v1/staff?subtype=lecturer_instructor
GET /staff/instructors

Shortcut for all active lecturer/instructor staff with full profile (qualifications, experience, certifications, portfolio, LinkedIn).

Returns

Array of instructor objects with full profile fields.

Example

https://hibc.edu.lk/api/v1/staff/instructors
GET /staff/{id}

Full profile for a single staff member by ID.

Query Parameters

id Staff member ID (integer)

Returns

Staff object with full profile.

Example

https://hibc.edu.lk/api/v1/staff/3
GET /gallery

Gallery albums (paginated, newest first).

Query Parameters

per_page Albums per page (default: 12)
page Page number

Returns

Paginated list of album objects with image count.

Example

https://hibc.edu.lk/api/v1/gallery
GET /gallery/{slug}

Gallery album with all its images.

Query Parameters

slug Album slug

Returns

Album object with nested images array.

Example

https://hibc.edu.lk/api/v1/gallery/graduation-2025
GET /testimonials

Student reviews (paginated). Filter by programme or featured.

Query Parameters

per_page Results per page (default: 20)
page Page number
programme Filter by programme ID
featured Set 1 for featured only

Returns

Paginated list of student review objects (reviewer_name, review_text, star_rating, programme, etc).

Example

https://hibc.edu.lk/api/v1/testimonials
GET /awards

Awards and recognitions.

Returns

Array of award objects.

Example

https://hibc.edu.lk/api/v1/awards
GET /stats

Key statistics (student count, years, etc.).

Returns

Array of stat objects (id, label, value, icon, suffix, order).

Example

https://hibc.edu.lk/api/v1/stats
GET /partners

Partner and accreditation body logos.

Query Parameters

type Filter by partner type

Returns

Array of partner objects.

Example

https://hibc.edu.lk/api/v1/partners
GET /downloads

Downloadable files (brochures, forms, etc.).

Query Parameters

category Filter by category

Returns

Array of download objects with file_url.

Example

https://hibc.edu.lk/api/v1/downloads
GET /hero-slides

Homepage hero/banner slides.

Returns

Array of slide objects with image URL and button links.

Example

https://hibc.edu.lk/api/v1/hero-slides
GET /faqs

FAQs. Returns all active FAQs. Global FAQs have no programme_id.

Query Parameters

global Pass any value to return only global FAQs (no programme)
programme_id Filter by specific programme ID
category Filter by category

Returns

Array of FAQ objects (id, programme_id, question, answer, category, order).

Example

https://hibc.edu.lk/api/v1/faqs?global=1
GET /google-reviews

Google reviews for programmes (paginated).

Query Parameters

programme_id Filter by programme ID
featured Pass any value to return only featured reviews
per_page Results per page (default: 20)
page Page number

Returns

Paginated list of review objects with reviewer name, rating, text, and nested programme info.

Example

https://hibc.edu.lk/api/v1/google-reviews?programme_id=1
GET /special-days

Special days and observances (paginated).

Query Parameters

upcoming Pass any value to return only future special days
per_page Results per page (default: 20)
page Page number

Returns

Paginated list of special day objects.

Example

https://hibc.edu.lk/api/v1/special-days?upcoming=1
GET /special-days/{slug}

Full special day detail with content.

Query Parameters

slug Special day slug

Returns

Special day object with full content.

Example

https://hibc.edu.lk/api/v1/special-days/world-environment-day

Academics

GET /special-discounts

All active special discount criteria across all levels.

Returns

Array of special discount objects (title, description, discount_type, discount_value, level, items).

Example

https://hibc.edu.lk/api/v1/special-discounts
GET /special-discounts/{level}

Special discount criteria for a specific programme level.

Query Parameters

level Programme level slug (e.g. diploma, degree)

Returns

Array of matching special discount objects.

Example

https://hibc.edu.lk/api/v1/special-discounts/diploma
GET /early-bird-offers

All active early bird offers across all levels (gift packs, free programmes, extras).

Returns

Array of early bird offer objects with nested gift_packs, free_programmes, and extra arrays.

Example

https://hibc.edu.lk/api/v1/early-bird-offers
GET /early-bird-offers/{level}

Early bird offers for a specific programme level.

Query Parameters

level Programme level slug (e.g. diploma, degree)

Returns

Array of early bird offer objects for the given level.

Example

https://hibc.edu.lk/api/v1/early-bird-offers/diploma
GET /entry-requirements

All active programme levels with their entry requirement pathways.

Returns

Array of level objects each with entry_requirements array (label, requirement, order).

Example

https://hibc.edu.lk/api/v1/entry-requirements
GET /programmes/{slug}/modules

All visible modules for a specific programme.

Query Parameters

slug Programme slug

Returns

Programme title, slug, and modules array (number, title, topics, order).

Example

https://hibc.edu.lk/api/v1/programmes/example-programme/modules