Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/raczkodavid/Tikera/llms.txt

Use this file to discover all available pages before exploring further.

The Screenings API exposes all cinema showtimes. Public endpoints let you list and retrieve screenings; authenticated admin endpoints let you create, update, and delete them. The backend automatically derives week_number and week_day from the provided date.

GET /api/screenings

Returns all screenings with nested movie, room, and booking data.
Public — no authentication required.
curl http://localhost:8000/api/screenings
Response
{
  "status": "success",
  "message": "OK",
  "data": [
    {
      "id": 5,
      "movie_id": 1,
      "room_id": 1,
      "date": "2025-05-15",
      "start_time": "18:00:00",
      "week_number": 20,
      "week_day": 4,
      "movie": { "id": 1, "title": "Inception", "genre": "Sci-Fi" },
      "room": { "id": 1, "name": "Grand Hall", "rows": 10, "seats_per_row": 10 }
    }
  ]
}

GET /api/screenings/

Returns a single screening with its movie, room, and bookings.
Public — no authentication required.
curl http://localhost:8000/api/screenings/5

POST /api/screenings

Creates a new screening. Requires authentication (admin).
movie_id
integer
required
ID of an existing movie.
room_id
integer
ID of an existing room. Defaults to room ID 1 (Grand Hall) if omitted.
date
string
required
Screening date in YYYY-MM-DD format. week_number and week_day are computed automatically from this value.
start_time
string
required
Start time in HH:MM format (24-hour). Must be unique per room — you cannot schedule two screenings in the same room at the same time.
If another screening is already scheduled in the same room at the same start_time, the API returns 422 Unprocessable Entity with the message “There is already a screening scheduled in this room at this time”.
curl -X POST http://localhost:8000/api/screenings \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "movie_id": 1,
    "room_id": 1,
    "date": "2025-05-15",
    "start_time": "18:00"
  }'
Returns 201 with the created screening object including nested movie and room.

PUT /api/screenings/

Updates an existing screening. Requires authentication (admin). All fields are optional.
movie_id
integer
ID of an existing movie.
room_id
integer
ID of an existing room.
date
string
Date in YYYY-MM-DD format. Recalculates week_number and week_day.
start_time
string
Time in HH:MM format. Validated against room conflicts.
curl -X PUT http://localhost:8000/api/screenings/5 \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{ "start_time": "20:30" }'
Returns 200 with the updated screening object.

DELETE /api/screenings/

Deletes a screening. Requires authentication (admin).
curl -X DELETE http://localhost:8000/api/screenings/5 \
  -H "Authorization: Bearer {token}"
Returns 204 No Content on success.

Build docs developers (and LLMs) love