{
  "info": {
    "name": "SIMKATMAWA - Prestasi Mahasiswa API",
    "description": "API gabungan prestasi mahasiswa (prestasi_mandiri, kegiatan_mhs_berprestasi, skpi_kegiatan_mhs). Auth: Bearer token, bikin token via halaman Developer > API Client di dashboard (php artisan api:client:create \"Nama Partner\").",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      { "key": "token", "value": "{{api_token}}", "type": "string" }
    ]
  },
  "variable": [
    { "key": "base_url", "value": "http://localhost:8000", "type": "string" },
    { "key": "api_token", "value": "", "type": "string" }
  ],
  "item": [
    {
      "name": "List Prestasi",
      "request": {
        "method": "GET",
        "header": [
          { "key": "Accept", "value": "application/json" }
        ],
        "url": {
          "raw": "{{base_url}}/api/v1/prestasi?nim=&source_type=",
          "host": ["{{base_url}}"],
          "path": ["api", "v1", "prestasi"],
          "query": [
            { "key": "nim", "value": "", "description": "Filter substring NIM (opsional)" },
            { "key": "source_type", "value": "", "description": "prestasi_mandiri | kegiatan_berprestasi | kegiatan_fakultas (opsional)" }
          ]
        },
        "description": "List gabungan prestasi mahasiswa, paginated (50/halaman), diurutin synced_at terbaru. Response: paginator standar Laravel (data/links/meta + total/current_page/last_page dst)."
      },
      "response": [
        {
          "name": "200 OK",
          "originalRequest": { "method": "GET", "url": "{{base_url}}/api/v1/prestasi" },
          "status": "OK",
          "code": 200,
          "header": [{ "key": "Content-Type", "value": "application/json" }],
          "body": "{\n  \"current_page\": 1,\n  \"data\": [\n    {\n      \"nim\": \"51422001\",\n      \"nama\": \"Lomba Basket Antar Fakultas\",\n      \"sumber\": \"kegiatan_fakultas\",\n      \"tingkat\": \"Nasional\",\n      \"peringkat\": \"Juara 1\",\n      \"tanggal\": \"2025-05-01\",\n      \"validasi_kemahasiswaan_universitas\": \"1\",\n      \"validasikaprodi\": \"1\",\n      \"validasi_kemahasiswaan_fakultas\": \"1\",\n      \"synced_at\": \"2026-08-05T07:57:02+00:00\"\n    }\n  ],\n  \"first_page_url\": \"http://localhost:8000/api/v1/prestasi?page=1\",\n  \"from\": 1,\n  \"last_page\": 187,\n  \"per_page\": 50,\n  \"total\": 9327\n}"
        }
      ]
    },
    {
      "name": "Detail Prestasi per NIM",
      "request": {
        "method": "GET",
        "header": [
          { "key": "Accept", "value": "application/json" }
        ],
        "url": {
          "raw": "{{base_url}}/api/v1/prestasi/mahasiswa/:nim",
          "host": ["{{base_url}}"],
          "path": ["api", "v1", "prestasi", "mahasiswa", ":nim"],
          "variable": [
            { "key": "nim", "value": "51422001", "description": "NIM mahasiswa" }
          ]
        },
        "description": "Semua prestasi (dari 3 sumber) milik satu NIM."
      },
      "response": [
        {
          "name": "200 OK",
          "originalRequest": { "method": "GET", "url": "{{base_url}}/api/v1/prestasi/mahasiswa/51422001" },
          "status": "OK",
          "code": 200,
          "header": [{ "key": "Content-Type", "value": "application/json" }],
          "body": "{\n  \"nim\": \"51422001\",\n  \"prestasi\": [\n    {\n      \"nim\": \"51422001\",\n      \"nama\": \"Lomba Basket Antar Fakultas\",\n      \"sumber\": \"kegiatan_fakultas\",\n      \"tingkat\": \"Nasional\",\n      \"peringkat\": \"Juara 1\",\n      \"tanggal\": \"2025-05-01\",\n      \"validasi_kemahasiswaan_universitas\": \"1\",\n      \"validasikaprodi\": \"1\",\n      \"validasi_kemahasiswaan_fakultas\": \"1\",\n      \"synced_at\": \"2026-08-05T07:57:02+00:00\"\n    }\n  ]\n}"
        }
      ]
    },
    {
      "name": "Unauthorized (tanpa/token salah)",
      "request": {
        "method": "GET",
        "header": [{ "key": "Accept", "value": "application/json" }],
        "auth": { "type": "noauth" },
        "url": {
          "raw": "{{base_url}}/api/v1/prestasi",
          "host": ["{{base_url}}"],
          "path": ["api", "v1", "prestasi"]
        },
        "description": "Contoh request tanpa Authorization header buat verifikasi 401."
      },
      "response": [
        {
          "name": "401 Unauthorized",
          "originalRequest": { "method": "GET", "url": "{{base_url}}/api/v1/prestasi" },
          "status": "Unauthorized",
          "code": 401,
          "header": [{ "key": "Content-Type", "value": "application/json" }],
          "body": "{\n  \"message\": \"Unauthenticated.\"\n}"
        }
      ]
    }
  ]
}
