Postman API List - ORAC Risk Assessments API

Base URL: http://localhost:3000/api

1. Health
GET /health

2. Reference Data
2.1 Account Status
GET /account_status
POST /account_status
GET /account_status/:status_id
PUT /account_status/:status_id
DELETE /account_status/:status_id

2.2 Departments
GET /departments
POST /departments
GET /departments/:department_id
PUT /departments/:department_id
DELETE /departments/:department_id

2.3 Job Titles
GET /job_title
POST /job_title
GET /job_title/:job_title_id
PUT /job_title/:job_title_id
DELETE /job_title/:job_title_id

2.4 Country
GET /country
GET /country?country_name_like=Ind
POST /country
GET /country/:country_id
PUT /country/:country_id
DELETE /country/:country_id

2.5 Locations
GET /locations
GET /locations?country_id=1
POST /locations
GET /locations/:location_id
PUT /locations/:location_id
DELETE /locations/:location_id

3. Users and Roles
3.1 Users (composite PK)
GET /users
GET /users?department_id=3&status_id=1
GET /users?employee_name_like=John
POST /users
GET /users/:user_id/:employee_id/:status_id/:job_title_id/:department_id/:location_id
PUT /users/:user_id/:employee_id/:status_id/:job_title_id/:department_id/:location_id
DELETE /users/:user_id/:employee_id/:status_id/:job_title_id/:department_id/:location_id

3.2 Roles
GET /roles
POST /roles
GET /roles/:role_id
PUT /roles/:role_id
DELETE /roles/:role_id

3.3 User-Role Mapping
GET /user_role
POST /user_role
GET /user_role/:user_role_id/:role_id/:user_id
PUT /user_role/:user_role_id/:role_id/:user_id
DELETE /user_role/:user_role_id/:role_id/:user_id

4. Tickets
4.1 Ticket Status
GET /tickets_status
POST /tickets_status
GET /tickets_status/:status_id
PUT /tickets_status/:status_id
DELETE /tickets_status/:status_id

4.2 Ticket Types
GET /tickets_type
POST /tickets_type
GET /tickets_type/:type_id
PUT /tickets_type/:type_id
DELETE /tickets_type/:type_id

4.3 Tickets (composite PK)
GET /tickets
GET /tickets?user_id=1
GET /tickets?status_id=2
POST /tickets
GET /tickets/:id/:user_id/:ticket_type_id/:status_id
PUT /tickets/:id/:user_id/:ticket_type_id/:status_id
DELETE /tickets/:id/:user_id/:ticket_type_id/:status_id

4.4 Ticket Logs
GET /tickets_logs
POST /tickets_logs
GET /tickets_logs/:id/:ticket_id/:status_id/:ticket_type_id
PUT /tickets_logs/:id/:ticket_id/:status_id/:ticket_type_id
DELETE /tickets_logs/:id/:ticket_id/:status_id/:ticket_type_id

5. ORAC Assessments and Related
5.1 Assessments
GET /orac_assessments
GET /orac_assessments?country_id=1&location_id=4
GET /orac_assessments?assessment_status_id=1
POST /orac_assessments
GET /orac_assessments/:assessment_id/:uploader_user_id/:assessment_status_id
PUT /orac_assessments/:assessment_id/:uploader_user_id/:assessment_status_id
DELETE /orac_assessments/:assessment_id/:uploader_user_id/:assessment_status_id

5.2 Assessment Status
GET /orac_assessments_status
POST /orac_assessments_status
GET /orac_assessments_status/:assessment_status_id
PUT /orac_assessments_status/:assessment_status_id
DELETE /orac_assessments_status/:assessment_status_id

5.3 Participants
GET /orac_participants
POST /orac_participants
GET /orac_participants/:assessment_id/:participant_user_id
PUT /orac_participants/:assessment_id/:participant_user_id
DELETE /orac_participants/:assessment_id/:participant_user_id

6. ORAC Forms and Sections
6.1 Form Details
GET /orac_form_details
POST /orac_form_details
GET /orac_form_details/:form_id
PUT /orac_form_details/:form_id
DELETE /orac_form_details/:form_id

6.2 Form Archive
GET /orac_archive_form
POST /orac_archive_form
GET /orac_archive_form/:form_id
PUT /orac_archive_form/:form_id
DELETE /orac_archive_form/:form_id

6.3 Form Logs
GET /orac_form_logs
POST /orac_form_logs
GET /orac_form_logs/:user_id
PUT /orac_form_logs/:user_id
DELETE /orac_form_logs/:user_id

6.4 Section Details
GET /orac_section_details
POST /orac_section_details
GET /orac_section_details/:section_id
PUT /orac_section_details/:section_id
DELETE /orac_section_details/:section_id

6.5 Section Archive
GET /orac_archive_section
POST /orac_archive_section
GET /orac_archive_section/:section_id
PUT /orac_archive_section/:section_id
DELETE /orac_archive_section/:section_id

6.6 Section Logs
GET /orac_section_logs
POST /orac_section_logs
GET /orac_section_logs/:user_id
PUT /orac_section_logs/:user_id
DELETE /orac_section_logs/:user_id

6.7 Form-Section Map (composite PK) — admin + user access
GET /orac_form_section_map
GET /orac_form_section_map/form/:form_id   — full form with sections → questions → types & options
POST /orac_form_section_map                — body: { "form_id": int, "section_id": int }
GET /orac_form_section_map/:form_id/:section_id
PUT /orac_form_section_map/:form_id/:section_id
DELETE /orac_form_section_map/:form_id/:section_id

6.8 Section-Question Map (composite PK) — admin + user access
GET /orac_section_question_map
GET /orac_section_question_map/section/:section_id  — section with all mapped questions, types & options
POST /orac_section_question_map            — body: { "section_id": int, "question_id": int }
GET /orac_section_question_map/:section_id/:question_id
PUT /orac_section_question_map/:section_id/:question_id
DELETE /orac_section_question_map/:section_id/:question_id
Legacy alias: /orac_section_question_map (all endpoints above also work with this path)

7. ORAC Questions and Options
7.1 Question Types
GET /orac_question_type
POST /orac_question_type
GET /orac_question_type/:question_type_id
PUT /orac_question_type/:question_type_id
DELETE /orac_question_type/:question_type_id

7.2 Questions (composite PK)
GET /orac_questions
GET /orac_questions?question_like=hazard
POST /orac_questions
GET /orac_questions/:question_id/:question_type_id
PUT /orac_questions/:question_id/:question_type_id
DELETE /orac_questions/:question_id/:question_type_id

7.3 Question Options (composite PK)
GET /orac_question_options
POST /orac_question_options
GET /orac_question_options/:question_options_id/:question_id
PUT /orac_question_options/:question_options_id/:question_id
DELETE /orac_question_options/:question_options_id/:question_id

7.4 Combined Questions (composite PK)
GET /orac_combined_question
POST /orac_combined_question
GET /orac_combined_question/:main_question_id/:child_question_id
PUT /orac_combined_question/:main_question_id/:child_question_id
DELETE /orac_combined_question/:main_question_id/:child_question_id

8. ORAC Answers, Snaps, Submissions, Verification
8.1 Answers (composite PK)
GET /orac_answers
POST /orac_answers
GET /orac_answers/:answers_id/:submission_id/:question_id
PUT /orac_answers/:answers_id/:submission_id/:question_id
DELETE /orac_answers/:answers_id/:submission_id/:question_id

8.2 Snaps (composite PK)
GET /orac_snaps
POST /orac_snaps
GET /orac_snaps/:snap_id/:assessment_id
PUT /orac_snaps/:snap_id/:assessment_id
DELETE /orac_snaps/:snap_id/:assessment_id

8.3 Submissions (composite PK)
GET /orac_submissions
POST /orac_submissions
GET /orac_submissions/:submission_id/:assessment_id/:submitter_id/:snap_id
PUT /orac_submissions/:submission_id/:assessment_id/:submitter_id/:snap_id
DELETE /orac_submissions/:submission_id/:assessment_id/:submitter_id/:snap_id

8.4 Verification Flow (composite PK)
GET /orac_verification_flow
POST /orac_verification_flow
GET /orac_verification_flow/:assessment_id/:occurrence
PUT /orac_verification_flow/:assessment_id/:occurrence
DELETE /orac_verification_flow/:assessment_id/:occurrence

