{
 "openapi": "3.1.0",
 "info": {
  "title": "Exams (Student Lifecycle)",
  "version": "20261030b",
  "description": "Each exam: who sits it, when, in which rooms (a large exam is split across rooms) and who invigilates. A change that gives a student two exams at once, too many in a day, or a room more candidates than exam seats is refused. An exam shows as scheduled only once it has a date, rooms seating every candidate and an invigilator; until then it stays unscheduled."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "exams": {
    "type": "object",
    "required": [
     "period_id",
     "title"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "exam_no": {
      "type": "string",
      "description": "Exam no",
      "readOnly": true
     },
     "period_id": {
      "type": "string",
      "format": "uuid",
      "description": "Exam period"
     },
     "section_id": {
      "type": "string",
      "format": "uuid",
      "description": "Section"
     },
     "course_id": {
      "type": "string",
      "format": "uuid",
      "description": "Course"
     },
     "assessment_id": {
      "type": "string",
      "format": "uuid",
      "description": "Assessment it marks"
     },
     "title": {
      "type": "string",
      "description": "Title"
     },
     "exam_type": {
      "type": "string",
      "description": "Type",
      "enum": [
       "final",
       "midterm",
       "resit",
       "practical",
       "oral"
      ]
     },
     "duration_minutes": {
      "type": "integer",
      "description": "Length (minutes)"
     },
     "needs_room_type": {
      "type": "string",
      "description": "Room type",
      "enum": [
       "lecture",
       "lab",
       "seminar",
       "tutorial",
       "exam_hall",
       "studio",
       "computer_lab",
       "other"
      ]
     },
     "exam_date": {
      "type": "string",
      "format": "date",
      "description": "Date"
     },
     "start_time": {
      "type": "string",
      "description": "From"
     },
     "end_time": {
      "type": "string",
      "description": "To"
     },
     "keep_fixed": {
      "type": "boolean",
      "description": "Keep it where it is when scheduling"
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "notes": {
      "type": "string",
      "description": "Notes"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/slcm/exams": {
   "get": {
    "summary": "list exams",
    "operationId": "list_exams_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create exams",
    "operationId": "create_exams_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/slcm/exams/{id}": {
   "get": {
    "summary": "get exams",
    "operationId": "get_exams_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change exams",
    "operationId": "change_exams_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete exams",
    "operationId": "delete_exams_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/slcm/exams/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_exams_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/slcm/exams/{parentId}/rooms": {
   "get": {
    "summary": "Rooms",
    "operationId": "action_exams_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Rooms",
    "operationId": "action_exams_1_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/slcm/exams/{parentId}/rooms/{lineId}": {
   "put": {
    "summary": "Rooms",
    "operationId": "action_exams_0_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Rooms",
    "operationId": "action_exams_1_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/slcm/exams/{parentId}/invigilators": {
   "get": {
    "summary": "Invigilators",
    "operationId": "action_exams_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Invigilators",
    "operationId": "action_exams_1_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/slcm/exams/{parentId}/invigilators/{lineId}": {
   "put": {
    "summary": "Invigilators",
    "operationId": "action_exams_0_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Invigilators",
    "operationId": "action_exams_1_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}