{
    "info": {
        "name": "LMS Question Reporting API",
        "description": "Complete API collection for question reporting and error reporting functionality",
        "version": "1.0.0",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "variable": [
        {
            "key": "base_url",
            "value": "{{base_url}}",
            "type": "string",
            "description": "Base URL for the API"
        },
        {
            "key": "auth_token",
            "value": "{{auth_token}}",
            "type": "string",
            "description": "Authentication token"
        }
    ],
    "item": [
        {
            "name": "Question Reporting",
            "item": [
                {
                    "name": "Report Question",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{auth_token}}",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"question_id\": 1234,\n    \"report_reason\": \"Incorrect answer marked as correct\",\n    \"additional_details\": \"The correct answer should be option B, but the system shows option A as correct. This is based on the textbook reference mentioned in the question.\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/api/quizzes/questions/report",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "quizzes",
                                "questions",
                                "report"
                            ]
                        },
                        "description": "🚨 Report a question for errors or issues\n\n**Required Parameters:**\n- `question_id` (integer): ID of the question to report\n- `report_reason` (string): Reason for reporting (max 1000 characters)\n\n**Optional Parameters:**\n- `additional_details` (string): Additional details about the issue (max 2000 characters)\n\n**Common Report Reasons:**\n- Incorrect answer marked as correct\n- Typo in question text\n- Missing or broken image\n- Unclear question wording\n- Wrong explanation provided\n- Missing answer options\n- Duplicate question"
                    },
                    "response": [
                        {
                            "name": "Success Response",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "Bearer {{auth_token}}"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n    \"question_id\": 1234,\n    \"report_reason\": \"Incorrect answer marked as correct\",\n    \"additional_details\": \"The correct answer should be option B, but the system shows option A as correct.\"\n}"
                                },
                                "url": {
                                    "raw": "{{base_url}}/api/quizzes/questions/report",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "quizzes",
                                        "questions",
                                        "report"
                                    ]
                                }
                            },
                            "status": "Created",
                            "code": 201,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"success\": true,\n    \"message\": \"Question reported successfully. Thank you for helping us improve!\",\n    \"data\": {\n        \"report_id\": 78,\n        \"question_id\": 1234,\n        \"report_reason\": \"Incorrect answer marked as correct\",\n        \"status\": \"pending\",\n        \"reported_at\": \"2024-01-15T10:30:00.000000Z\"\n    }\n}"
                        },
                        {
                            "name": "Already Reported",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "Bearer {{auth_token}}"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n    \"question_id\": 1234,\n    \"report_reason\": \"Incorrect answer marked as correct\"\n}"
                                },
                                "url": {
                                    "raw": "{{base_url}}/api/quizzes/questions/report",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "quizzes",
                                        "questions",
                                        "report"
                                    ]
                                }
                            },
                            "status": "Conflict",
                            "code": 409,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"success\": false,\n    \"message\": \"You have already reported this question. Your previous report is being reviewed.\",\n    \"data\": {\n        \"report_id\": 78,\n        \"status\": \"pending\",\n        \"reported_at\": \"2024-01-15T10:30:00.000000Z\"\n    }\n}"
                        },
                        {
                            "name": "Validation Error",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "Bearer {{auth_token}}"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n    \"question_id\": 99999,\n    \"report_reason\": \"\"\n}"
                                },
                                "url": {
                                    "raw": "{{base_url}}/api/quizzes/questions/report",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "quizzes",
                                        "questions",
                                        "report"
                                    ]
                                }
                            },
                            "status": "Unprocessable Entity",
                            "code": 422,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"success\": false,\n    \"message\": \"The given data was invalid.\",\n    \"errors\": {\n        \"question_id\": [\n            \"The selected question id is invalid.\"\n        ],\n        \"report_reason\": [\n            \"The report reason field is required.\"\n        ]\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Get My Question Reports",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{auth_token}}",
                                "type": "text"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/api/quizzes/questions/my-reports?per_page=10",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "quizzes",
                                "questions",
                                "my-reports"
                            ],
                            "query": [
                                {
                                    "key": "per_page",
                                    "value": "10",
                                    "description": "Number of reports per page (default: 10)"
                                }
                            ]
                        },
                        "description": "📋 Get user's question reports history\n\n**Optional Parameters:**\n- `per_page` (integer): Number of reports per page (default: 10)\n\n**Response includes:**\n- Report details (ID, reason, status, date)\n- Question information (text, quiz/subtest)\n- Pagination metadata"
                    },
                    "response": [
                        {
                            "name": "Success Response",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "Bearer {{auth_token}}"
                                    }
                                ],
                                "url": {
                                    "raw": "{{base_url}}/api/quizzes/questions/my-reports?per_page=10",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "quizzes",
                                        "questions",
                                        "my-reports"
                                    ],
                                    "query": [
                                        {
                                            "key": "per_page",
                                            "value": "10"
                                        }
                                    ]
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"success\": true,\n    \"message\": \"Question reports retrieved successfully\",\n    \"data\": {\n        \"reports\": [\n            {\n                \"id\": 78,\n                \"customer_id\": 123,\n                \"question_id\": 1234,\n                \"report_reason\": \"Incorrect answer marked as correct\",\n                \"status\": \"pending\",\n                \"admin_notes\": \"The correct answer should be option B, but the system shows option A as correct.\",\n                \"created_at\": \"2024-01-15T10:30:00.000000Z\",\n                \"updated_at\": \"2024-01-15T10:30:00.000000Z\",\n                \"question\": {\n                    \"id\": 1234,\n                    \"question_text\": \"What is the capital of Indonesia?\",\n                    \"quiz_id\": 45,\n                    \"subtest_id\": null,\n                    \"quiz\": {\n                        \"id\": 45,\n                        \"title\": \"Geography Practice Quiz\"\n                    },\n                    \"subtest\": null\n                }\n            },\n            {\n                \"id\": 77,\n                \"customer_id\": 123,\n                \"question_id\": 1235,\n                \"report_reason\": \"Typo in question text\",\n                \"status\": \"resolved\",\n                \"admin_notes\": \"Fixed: Changed 'whitch' to 'which' in question text\",\n                \"created_at\": \"2024-01-14T15:20:00.000000Z\",\n                \"updated_at\": \"2024-01-15T09:45:00.000000Z\",\n                \"question\": {\n                    \"id\": 1235,\n                    \"question_text\": \"Which of the following is correct?\",\n                    \"quiz_id\": null,\n                    \"subtest_id\": 67,\n                    \"quiz\": null,\n                    \"subtest\": {\n                        \"id\": 67,\n                        \"name\": \"Mathematics Subtest\"\n                    }\n                }\n            }\n        ],\n        \"pagination\": {\n            \"current_page\": 1,\n            \"per_page\": 10,\n            \"total\": 2,\n            \"last_page\": 1,\n            \"has_more\": false\n        }\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Get Specific Question Report",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{auth_token}}",
                                "type": "text"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/api/quizzes/questions/reports/78",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "quizzes",
                                "questions",
                                "reports",
                                "78"
                            ]
                        },
                        "description": "🔍 Get specific question report details\n\n**Path Parameters:**\n- `id` (integer): Report ID\n\n**Response includes:**\n- Complete report information\n- Question details (text, body, quiz/subtest)\n- Admin notes and resolution details"
                    },
                    "response": [
                        {
                            "name": "Success Response",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "Bearer {{auth_token}}"
                                    }
                                ],
                                "url": {
                                    "raw": "{{base_url}}/api/quizzes/questions/reports/78",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "quizzes",
                                        "questions",
                                        "reports",
                                        "78"
                                    ]
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"success\": true,\n    \"message\": \"Question report retrieved successfully\",\n    \"data\": {\n        \"id\": 78,\n        \"customer_id\": 123,\n        \"question_id\": 1234,\n        \"report_reason\": \"Incorrect answer marked as correct\",\n        \"status\": \"pending\",\n        \"admin_notes\": \"The correct answer should be option B, but the system shows option A as correct.\",\n        \"created_at\": \"2024-01-15T10:30:00.000000Z\",\n        \"updated_at\": \"2024-01-15T10:30:00.000000Z\",\n        \"question\": {\n            \"id\": 1234,\n            \"question_text\": \"What is the capital of Indonesia?\",\n            \"question_body\": \"<p>Indonesia is a country in Southeast Asia. What is its capital city?</p>\",\n            \"quiz_id\": 45,\n            \"subtest_id\": null,\n            \"quiz\": {\n                \"id\": 45,\n                \"title\": \"Geography Practice Quiz\"\n            },\n            \"subtest\": null\n        }\n    }\n}"
                        },
                        {
                            "name": "Not Found",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "Bearer {{auth_token}}"
                                    }
                                ],
                                "url": {
                                    "raw": "{{base_url}}/api/quizzes/questions/reports/99999",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "quizzes",
                                        "questions",
                                        "reports",
                                        "99999"
                                    ]
                                }
                            },
                            "status": "Not Found",
                            "code": 404,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"success\": false,\n    \"message\": \"Report not found or you do not have permission to view it.\"\n}"
                        }
                    ]
                }
            ]
        }
    ]
} 