{
  "info": {
    "_postman_id": "9c5b3d2a-7e8f-4a6d-b1c9-e8d7f5a4c3b2",
    "name": "ASN Backend API",
    "description": "API endpoints for the ASN Backend Learning Management System",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Authentication",
      "description": "Authentication endpoints",
      "item": [
        {
          "name": "Register",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"John Doe\",\n    \"email\": \"john.doe@example.com\",\n    \"password\": \"password123\",\n    \"password_confirmation\": \"password123\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/register",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "register"
              ]
            },
            "description": "Register a new user account"
          },
          "response": []
        },
        {
          "name": "Login",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"email\": \"john.doe@example.com\",\n    \"password\": \"password123\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/login",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "login"
              ]
            },
            "description": "Login to get an authentication token"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Customer",
      "description": "Endpoints related to customer functionality",
      "item": [
        {
          "name": "Personalized Recommendations",
          "description": "Endpoints for personalized customer recommendations",
          "item": [
            {
              "name": "Quiz Recommendations",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "Bearer {{customer_token}}",
                    "type": "text"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/api/v1/customer/quiz-recommendations",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "customer",
                    "quiz-recommendations"
                  ]
                },
                "description": "Provides personalized quiz recommendations based on the customer's past performance. For new customers with no quiz history, basic/beginner quizzes will be recommended."
              },
              "response": [
                {
                  "name": "New Customer Response",
                  "originalRequest": {
                    "method": "GET",
                    "header": [
                      {
                        "key": "Authorization",
                        "value": "Bearer {{customer_token}}",
                        "type": "text"
                      }
                    ],
                    "url": {
                      "raw": "{{base_url}}/api/v1/customer/quiz-recommendations",
                      "host": [
                        "{{base_url}}"
                      ],
                      "path": [
                        "api",
                        "v1",
                        "customer",
                        "quiz-recommendations"
                      ]
                    }
                  },
                  "status": "OK",
                  "code": 200,
                  "_postman_previewlanguage": "json",
                  "header": [],
                  "cookie": [],
                  "body": "{\n  \"status\": \"success\",\n  \"message\": \"Beginner quiz recommendations retrieved successfully\",\n  \"data\": {\n    \"practice_quizzes\": [\n      {\n        \"id\": 12,\n        \"name\": \"Basic TWK Practice\",\n        \"description\": \"Basic Tes Wawasan Kebangsaan practice quiz\",\n        \"quiz_type\": \"practice\",\n        \"time_limit\": 1800,\n        \"question_count\": 15,\n        \"passing_score\": 70,\n        \"difficulty_level\": \"beginner\",\n        \"popularity\": 125,\n        \"recommendation_reason\": \"New Customer Starter\"\n      }\n    ],\n    \"tryout_quizzes\": [\n      {\n        \"id\": 25,\n        \"name\": \"Beginner CPNS Tryout\",\n        \"description\": \"Beginner CPNS tryout quiz\",\n        \"quiz_type\": \"tryout\",\n        \"time_limit\": 3600,\n        \"question_count\": 30,\n        \"passing_score\": 65,\n        \"difficulty_level\": \"beginner\",\n        \"popularity\": 98,\n        \"recommendation_reason\": \"New Customer Starter\"\n      }\n    ],\n    \"based_on\": {\n      \"new_customer\": true,\n      \"recommendation_strategy\": \"Beginner Level Introduction\"\n    }\n  }\n}"
                }
              ]
            },
            {
              "name": "Mission Cards",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "Bearer {{customer_token}}",
                    "type": "text"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/api/v1/customer/mission-cards",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "customer",
                    "mission-cards"
                  ]
                },
                "description": "Provides personalized mission cards (actionable goals with rewards) based on the customer's performance data and learning needs. For new customers with no quiz history, starter missions will be provided."
              },
              "response": [
                {
                  "name": "Example Response",
                  "originalRequest": {
                    "method": "GET",
                    "header": [
                      {
                        "key": "Authorization",
                        "value": "Bearer {{customer_token}}",
                        "type": "text"
                      }
                    ],
                    "url": {
                      "raw": "{{base_url}}/api/v1/customer/mission-cards",
                      "host": [
                        "{{base_url}}"
                      ],
                      "path": [
                        "api",
                        "v1",
                        "customer",
                        "mission-cards"
                      ]
                    }
                  },
                  "status": "OK",
                  "code": 200,
                  "_postman_previewlanguage": "json",
                  "header": [],
                  "cookie": [],
                  "body": "{\n  \"status\": \"success\",\n  \"message\": \"Personalized mission cards retrieved successfully\",\n  \"data\": {\n    \"missions\": [\n      {\n        \"id\": \"improve_tiu_1648225896\",\n        \"title\": \"Master TIU\",\n        \"description\": \"Improve your Tes Intelegensi Umum score from 65.5% to at least 75.5%\",\n        \"category\": \"TIU\",\n        \"difficulty\": \"medium\",\n        \"reward\": {\n          \"type\": \"experience\",\n          \"amount\": 150,\n          \"description\": \"150 XP\"\n        },\n        \"requirements\": {\n          \"action\": \"achieve_category_score\",\n          \"category\": \"TIU\",\n          \"target_percentage\": 75.5,\n          \"quiz_count\": 3\n        },\n        \"recommended_quizzes\": [\n          {\n            \"id\": 145,\n            \"name\": \"TIU Advanced Numerical Reasoning\",\n            \"quiz_type\": \"practice\",\n            \"difficulty_level\": \"advanced\"\n          }\n        ],\n        \"estimated_time\": \"2-3 hours\",\n        \"badge\": \"tiu_improver\"\n      }\n    ],\n    \"based_on\": {\n      \"completed_quizzes\": 8,\n      \"performance_metrics\": {\n        \"average_score\": 76.4,\n        \"weak_categories\": [\"TIU\", \"TWK\"],\n        \"strong_categories\": [\"TKP\"],\n        \"time_management\": \"Needs Improvement\"\n      },\n      \"mission_strategy\": [\n        \"Weakness Improvement\"\n      ]\n    }\n  }\n}"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "Categories",
      "description": "Endpoints for categories and sub-categories",
      "item": [
        {
          "name": "Get Main Categories",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{customer_token}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/categories",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "categories"
              ]
            },
            "description": "Get all main categories"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Quizzes",
      "description": "Endpoints for quizzes",
      "item": [
        {
          "name": "Get Quizzes",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{customer_token}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/quizzes",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "quizzes"
              ]
            },
            "description": "Get all quizzes"
          },
          "response": []
        }
      ]
    }
  ],
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          ""
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "exec": [
          ""
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "base_url",
      "value": "http://localhost:8000",
      "type": "string"
    },
    {
      "key": "customer_token",
      "value": "your-customer-token-here",
      "type": "string"
    }
  ]
} 