SamaySetu API Docs LogoSamaySetu API Docs Logo
SamaySetu API Docsv1.0.0
  • Documentation
  • API Reference
Getting Started
    OverviewAPI Referencev1
Reference
    Reference OverviewData ModelsCommon HeadersHTTP Status CodesError CodesRate Limits and Maintenance
Useful Links
    SamaySetu Platform
Reference

Common Headers

Standard HTTP headers used across SamaySetu JSON APIs and binary schedule exports.

Request Headers

HeaderRequiredDescriptionExample
AuthorizationOn protected routesBearer JWT issued by POST /auth/loginBearer YOUR_JWT_TOKEN
Content-TypeOn JSON POST/PUT requestsStandard JSON encodingapplication/json
AcceptRecommendedPreferred response representationapplication/json

Export Response Headers

Timetable export endpoints return downloadable PDF or Excel documents directly as binary streams:

Export FormatResponse Content-TypeResponse Content-Disposition
PDF (/pdf)application/pdfattachment; filename=timetable_<scope>_<id>.pdf
Excel (/excel)application/vnd.openxmlformats-officedocument.spreadsheetml.sheetattachment; filename=timetable_<scope>_<id>.xlsx

When consuming export routes from browser fetch or Node/Java HTTP clients, read binary bytes (res.arrayBuffer() or HttpResponse.BodyHandlers.ofByteArray()) rather than calling .json().

Data ModelsHTTP Status Codes
On this page
  • Request Headers
  • Export Response Headers