SmartGare
Referential

Lines, itineraries, and schedules

Stable line identity, effective operators, immutable calling patterns, recurrence, stop times, and managed-station calls.

Spoken model

“Line L-42 has an itinerary that leaves Rabat, calls at this station at 07:35, and reaches Marrakech at noon.”

Line

A line is the stable identity granted by the transport authority and sold against by the station. It carries neither carrier nor destination.

  • LineOperatorAssignment states who operates it over a period.
  • The final stop of an itinerary states where that pattern ends.
  • Schedules state when it runs.
  • Suspension preserves the line and history.

An operator assignment names exactly one carrier or coordination.

Itinerary

An itinerary is one ordered calling pattern. A line may have standard, express, or market-day variants, including patterns with different termini.

Published revisions are immutable. A future change creates a successor with its own effective range so tickets and generated departures keep resolving to the pattern that created them.

Stops and stations

A stop names a physical Station, not only a destination town. The same station may occur twice in a pattern, so call identity is (stopId, position), equivalent to GTFS (trip_id, stop_sequence).

Stops carry boarding/alighting permissions, not live counts, delays, or skipped observations.

Schedule

A schedule owns recurrence and effective range. It carries no scalar departure time because many services begin elsewhere and call at this deployment later.

Every time lives on the ordered StopTime sequence and is anchored to the origin service day. Day offsets support overnight services.

Recurrence and exceptions

Recurrence supports weekly and non-weekly patterns required by supplied timetable sources. A ScheduleOverride adds or cancels one station-local date without rewriting ordinary recurrence.

Schedules assemble as DRAFT and activate for use. Corrections create successor revisions instead of changing announced history.

Managed-station calls

GET /referential/v1/schedules/{id}/station-calls returns every call occurrence at stations managed by this deployment, in itinerary order, with time, day offset, and boarding permissions.

Scheduling can generate the correct local occurrence without pretending a schedule has one station-wide departure time.

On this page