> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bilauitmcuti.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Lecture Weeks

> Returns up to 14 instructional weeks (Week 1 onward) for the given session. Each week is a Mon-Sun calendar slot that contains at least one lecture day; break days (mid-semester, festival, revision, etc.) are omitted from the days list rather than dropping the whole week. Weeks with no lecture days, or where every day is break, are skipped. Each included week lists only its instructional days with English weekday and month names. Requires query parameter session only.



## OpenAPI

````yaml GET /api/v1/lecture-weeks
openapi: 3.0.3
info:
  title: Bila UiTM Cuti API
  version: '1'
  description: >-
    Unofficial API for UiTM academic calendar and Malaysian public holidays. Not
    affiliated with UiTM; verify important dates before production use.


    Rate limits (production): 500 requests per 60s per IP (CF-Connecting-IP) per
    endpoint; heavy calendar/meta modes (60 per 60s additional). GET /api/health
    is excluded. Cacheable successes expose RateLimit-Policy; 429 includes
    X-RateLimit-* / RateLimit / Retry-After. Optional remaining peek: GET
    /api/v1/rate-limit.
servers:
  - url: https://api.bilauitmcuti.com
security: []
paths:
  /api/v1/lecture-weeks:
    get:
      summary: Lecture Weeks (1-14)
      description: >-
        Returns up to 14 instructional weeks (Week 1 onward) for the given
        session. Each week is a Mon-Sun calendar slot that contains at least one
        lecture day; break days (mid-semester, festival, revision, etc.) are
        omitted from the days list rather than dropping the whole week. Weeks
        with no lecture days, or where every day is break, are skipped. Each
        included week lists only its instructional days with English weekday and
        month names. Requires query parameter session only.
      parameters:
        - name: session
          in: query
          required: true
          schema:
            type: string
          description: >-
            Session id from GET /api/v1/meta (`sessionOptions`). Do not
            hardcode; the published set changes each term.
          example: B-20264
      responses:
        '200':
          description: >-
            Lecture weeks 1-14 for the resolved session with English day and
            month labels.
          headers:
            RateLimit-Policy:
              description: Published policies (RFC 9457).
              schema:
                type: string
                example: '"endpoint";q=500;w=60, "heavy";q=60;w=60'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LectureWeeksResponse'
        '304':
          description: >-
            Not Modified. Empty body when If-None-Match matches the current
            ETag; Cache-Control and ETag headers are still sent.
          headers:
            RateLimit-Policy:
              description: Published policies (RFC 9457).
              schema:
                type: string
                example: '"endpoint";q=500;w=60, "heavy";q=60;w=60'
            ETag:
              description: Weak entity tag for this representation.
              schema:
                type: string
            Cache-Control:
              description: Caching policy for successful API responses.
              schema:
                type: string
        '400':
          description: >-
            Invalid or conflicting query parameters. Body: { error: string,
            detail?: string }.
          headers:
            X-RateLimit-Limit:
              description: >-
                Maximum requests allowed in the current window for the active
                bucket.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: >-
                Approximate remaining requests in the current window
                (best-effort per worker isolate; not authoritative across edge
                locations).
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Unix timestamp when the current rate-limit window resets.
              schema:
                type: integer
            RateLimit-Policy:
              description: Published policies (RFC 9457).
              schema:
                type: string
                example: '"endpoint";q=500;w=60, "heavy";q=60;w=60'
            RateLimit:
              description: Active bucket quota (RFC 9457), e.g. `"endpoint";r=499;t=42`.
              schema:
                type: string
            Retry-After:
              description: Seconds until the current rate-limit window resets.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: >-
            No calendar bucket for the given session id. Body: { error: string,
            detail?: string }.
          headers:
            X-RateLimit-Limit:
              description: >-
                Maximum requests allowed in the current window for the active
                bucket.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: >-
                Approximate remaining requests in the current window
                (best-effort per worker isolate; not authoritative across edge
                locations).
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Unix timestamp when the current rate-limit window resets.
              schema:
                type: integer
            RateLimit-Policy:
              description: Published policies (RFC 9457).
              schema:
                type: string
                example: '"endpoint";q=500;w=60, "heavy";q=60;w=60'
            RateLimit:
              description: Active bucket quota (RFC 9457), e.g. `"endpoint";r=499;t=42`.
              schema:
                type: string
            Retry-After:
              description: Seconds until the current rate-limit window resets.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: >-
            Rate limited (500 requests per 60s per endpoint per IP; heavy modes
            add 60 per 60s). Check Retry-After and rate-limit headers. Body
            includes error, detail, and retryAfter (seconds).
          headers:
            X-RateLimit-Limit:
              description: >-
                Maximum requests allowed in the current window for the active
                bucket.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: >-
                Approximate remaining requests in the current window
                (best-effort per worker isolate; not authoritative across edge
                locations).
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Unix timestamp when the current rate-limit window resets.
              schema:
                type: integer
            RateLimit-Policy:
              description: Published policies (RFC 9457).
              schema:
                type: string
                example: '"endpoint";q=500;w=60, "heavy";q=60;w=60'
            RateLimit:
              description: Active bucket quota (RFC 9457), e.g. `"endpoint";r=499;t=42`.
              schema:
                type: string
            Retry-After:
              description: Seconds until the current rate-limit window resets.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    LectureWeeksResponse:
      type: object
      required:
        - apiVersion
        - baseUrl
        - session
        - limit
        - weeks
        - meta
      properties:
        apiVersion:
          type: string
        baseUrl:
          type: string
        session:
          $ref: '#/components/schemas/SessionRef'
        limit:
          type: integer
          description: >-
            Maximum number of instructional weeks returned (currently 14). Break
            weeks are excluded from the count.
        weeks:
          type: array
          items:
            $ref: '#/components/schemas/LectureWeek'
          description: >-
            Instructional weeks only. Break days are omitted from each week's
            days list; fully break weeks are skipped.
        meta:
          type: object
          required:
            - weekCount
            - firstLectureDate
            - lastLectureDate
          properties:
            weekCount:
              type: integer
              description: Number of weeks returned (<= limit).
            firstLectureDate:
              type: string
              format: date
              nullable: true
              description: First lecture day in the session.
            lastLectureDate:
              type: string
              format: date
              nullable: true
              description: Last lecture day across all lecture blocks in the session.
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Short machine-friendly error code or message.
        detail:
          type: string
          description: Human-readable explanation (optional).
        retryAfter:
          type: integer
          description: Seconds to wait before retrying; present on 429 responses.
    SessionRef:
      type: object
      required:
        - id
        - label
        - group
      properties:
        id:
          type: string
        label:
          type: string
        group:
          type: string
    LectureWeek:
      type: object
      required:
        - weekNumber
        - weekStart
        - weekEnd
        - rangeLabel
        - days
      properties:
        weekNumber:
          type: integer
          minimum: 1
        weekStart:
          type: string
          format: date
          description: >-
            First listed instructional day in this week (ISO date). Not always
            Monday: break days are omitted from `days`, so a short week can
            start mid-week.
        weekEnd:
          type: string
          format: date
          description: >-
            Last listed instructional day in this week (ISO date). Not always
            Sunday: a short week can end before Sunday (e.g. A-20251 week 11
            ends 2026-03-19).
        rangeLabel:
          type: string
          description: English range label, e.g. "30 March - 05 April 2026".
        days:
          type: array
          items:
            $ref: '#/components/schemas/LectureWeekDay'
          minItems: 1
          maxItems: 7
          description: >-
            Instructional days only; break days within the calendar week are
            omitted.
    LectureWeekDay:
      type: object
      required:
        - date
        - weekday
        - label
      properties:
        date:
          type: string
          format: date
        weekday:
          type: string
          description: English weekday name (Monday, Tuesday, ...).
        label:
          type: string
          description: Display label, e.g. "Monday, 30 March 2026".

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.