{"info": {"_postman_id": "notif-lokal-0001", "description": "Koleksi API App Notifikasi (NUP-locked). Isi variables sesuai environment lalu kirim berurutan: health \u2192 login \u2192 notifications.", "name": "App Notifikasi", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"}, "item": [{"item": [{"name": "Login (Keycloak via proxy)", "request": {"body": {"mode": "raw", "options": {"raw": {"language": "json"}}, "raw": "{\n  \"username\": \"demo\",\n  \"password\": \"ganti-password\"\n}"}, "header": [{"key": "Content-Type", "value": "application/json"}], "method": "POST", "url": {"host": ["{{baseUrl}}"], "path": ["auth", "login"], "raw": "{{baseUrl}}/auth/login"}}, "response": []}, {"name": "Refresh token", "request": {"body": {"mode": "raw", "options": {"raw": {"language": "json"}}, "raw": "{\n  \"refresh_token\": \"{{refresh_token}}\"\n}"}, "header": [{"key": "Content-Type", "value": "application/json"}], "method": "POST", "url": {"host": ["{{baseUrl}}"], "path": ["auth", "refresh"], "raw": "{{baseUrl}}/auth/refresh"}}, "response": []}, {"name": "Userinfo", "request": {"header": [{"key": "Authorization", "value": "Bearer {{access_token}}"}], "method": "GET", "url": {"host": ["{{baseUrl}}"], "path": ["auth", "userinfo"], "raw": "{{baseUrl}}/auth/userinfo"}}, "response": []}], "name": "Auth"}, {"item": [{"name": "Health (publik)", "request": {"method": "GET", "url": {"host": ["{{baseUrl}}"], "path": ["health"], "raw": "{{baseUrl}}/health"}}, "response": []}, {"name": "APK info", "request": {"method": "GET", "url": {"host": ["{{baseUrl}}"], "path": ["apk", "info"], "raw": "{{baseUrl}}/apk/info"}}, "response": []}], "name": "Umum"}, {"item": [{"name": "Register device", "request": {"body": {"mode": "raw", "options": {"raw": {"language": "json"}}, "raw": "{\n  \"device_id\": \"test-device-001\",\n  \"device_name\": \"HP Test\",\n  \"platform\": \"android\"\n}"}, "header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}, {"key": "Content-Type", "value": "application/json"}], "method": "POST", "url": {"host": ["{{baseUrl}}"], "path": ["register"], "raw": "{{baseUrl}}/register"}}, "response": []}], "name": "Device"}, {"item": [{"name": "List (NUP-locked)", "request": {"header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}], "method": "GET", "url": {"host": ["{{baseUrl}}"], "path": ["notifications"], "query": [{"key": "nup", "value": "{{nup}}"}, {"key": "employee_token", "value": "{{employee_token}}"}], "raw": "{{baseUrl}}/notifications?nup={{nup}}&employee_token={{employee_token}}"}}, "response": []}, {"name": "Detail", "request": {"header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}], "method": "GET", "url": {"host": ["{{baseUrl}}"], "path": ["notifications", ":id"], "query": [{"key": "nup", "value": "{{nup}}"}, {"key": "employee_token", "value": "{{employee_token}}"}], "raw": "{{baseUrl}}/notifications/:id?nup={{nup}}&employee_token={{employee_token}}", "variable": [{"key": "id", "value": "1"}]}}, "response": []}, {"name": "Buat tunggal + target NUP", "request": {"body": {"mode": "raw", "options": {"raw": {"language": "json"}}, "raw": "{\n  \"title\": \"Info\",\n  \"body\": \"Isi pesan\",\n  \"priority\": \"normal\",\n  \"target_nups\": [\"{{nup}}\"]\n}"}, "header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}, {"key": "Content-Type", "value": "application/json"}], "method": "POST", "url": {"host": ["{{baseUrl}}"], "path": ["notifications"], "raw": "{{baseUrl}}/notifications"}}, "response": []}, {"name": "Tandai dibaca", "request": {"body": {"mode": "raw", "options": {"raw": {"language": "json"}}, "raw": "{\n  \"device_id\": \"{{employee_token}}\",\n  \"employee_token\": \"{{employee_token}}\",\n  \"nup\": \"{{nup}}\"\n}"}, "header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}, {"key": "Content-Type", "value": "application/json"}], "method": "POST", "url": {"host": ["{{baseUrl}}"], "path": ["notifications", ":id", "acknowledge"], "raw": "{{baseUrl}}/notifications/:id/acknowledge", "variable": [{"key": "id", "value": "1"}]}}, "response": []}, {"name": "Broadcast semua device", "request": {"body": {"mode": "raw", "options": {"raw": {"language": "json"}}, "raw": "{\n  \"title\": \"Pengumuman\",\n  \"body\": \"Untuk semua\",\n  \"priority\": \"high\"\n}"}, "header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}, {"key": "Content-Type", "value": "application/json"}], "method": "POST", "url": {"host": ["{{baseUrl}}"], "path": ["notifications", "broadcast"], "raw": "{{baseUrl}}/notifications/broadcast"}}, "response": []}, {"name": "Broadcast NUP (Excel NUPNIP)", "request": {"body": {"mode": "raw", "options": {"raw": {"language": "json"}}, "raw": "{\n  \"title\": \"Khusus\",\n  \"body\": \"Hanya NUP terpilih\",\n  \"priority\": \"normal\",\n  \"link\": \"https://example.com/doc.pdf\",\n  \"target_nups\": [\"{{nup}}\"]\n}"}, "header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}, {"key": "Content-Type", "value": "application/json"}], "method": "POST", "url": {"host": ["{{baseUrl}}"], "path": ["notifications", "broadcast"], "raw": "{{baseUrl}}/notifications/broadcast"}}, "response": []}, {"name": "Broadcast device terpilih", "request": {"body": {"mode": "raw", "options": {"raw": {"language": "json"}}, "raw": "{\n  \"title\": \"Personal\",\n  \"body\": \"Hanya device ini\",\n  \"priority\": \"normal\",\n  \"device_ids\": [\"{{employee_token}}\"]\n}"}, "header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}, {"key": "Content-Type", "value": "application/json"}], "method": "POST", "url": {"host": ["{{baseUrl}}"], "path": ["notifications", "broadcast"], "raw": "{{baseUrl}}/notifications/broadcast"}}, "response": []}, {"name": "Soft delete (admin)", "request": {"header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}], "method": "DELETE", "url": {"host": ["{{baseUrl}}"], "path": ["notifications", ":id"], "raw": "{{baseUrl}}/notifications/:id", "variable": [{"key": "id", "value": "1"}]}}, "response": []}, {"name": "Restore (admin)", "request": {"header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}], "method": "POST", "url": {"host": ["{{baseUrl}}"], "path": ["notifications", ":id", "restore"], "raw": "{{baseUrl}}/notifications/:id/restore", "variable": [{"key": "id", "value": "1"}]}}, "response": []}], "name": "Notifikasi"}, {"item": [{"name": "Log notifikasi", "request": {"header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}], "method": "GET", "url": {"host": ["{{baseUrl}}"], "path": ["admin", "notifications"], "raw": "{{baseUrl}}/admin/notifications"}}, "response": []}, {"name": "Daftar device", "request": {"header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}], "method": "GET", "url": {"host": ["{{baseUrl}}"], "path": ["admin", "devices"], "raw": "{{baseUrl}}/admin/devices"}}, "response": []}, {"name": "Statistik", "request": {"header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}], "method": "GET", "url": {"host": ["{{baseUrl}}"], "path": ["admin", "stats"], "raw": "{{baseUrl}}/admin/stats"}}, "response": []}], "name": "Admin"}, {"item": [{"name": "List semua", "request": {"header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}], "method": "GET", "url": {"host": ["{{baseUrl}}"], "path": ["employees"], "raw": "{{baseUrl}}/employees"}}, "response": []}, {"name": "Cari by NUP", "request": {"header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}], "method": "GET", "url": {"host": ["{{baseUrl}}"], "path": ["employees"], "query": [{"key": "nup", "value": "{{nup}}"}], "raw": "{{baseUrl}}/employees?nup={{nup}}"}}, "response": []}, {"name": "Tambah", "request": {"body": {"mode": "raw", "options": {"raw": {"language": "json"}}, "raw": "{\n  \"nama\": \"Budi Santoso\",\n  \"nup\": \"12345\",\n  \"unit_kerja\": \"IT\",\n  \"jabatan\": \"Staff\",\n  \"status_pegawai\": \"Aktif\"\n}"}, "header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}, {"key": "Content-Type", "value": "application/json"}], "method": "POST", "url": {"host": ["{{baseUrl}}"], "path": ["employees"], "raw": "{{baseUrl}}/employees"}}, "response": []}, {"name": "Update", "request": {"body": {"mode": "raw", "options": {"raw": {"language": "json"}}, "raw": "{\n  \"id\": 1,\n  \"jabatan\": \"Supervisor\"\n}"}, "header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}, {"key": "Content-Type", "value": "application/json"}], "method": "PUT", "url": {"host": ["{{baseUrl}}"], "path": ["employees"], "raw": "{{baseUrl}}/employees"}}, "response": []}, {"name": "Hapus", "request": {"body": {"mode": "raw", "options": {"raw": {"language": "json"}}, "raw": "{\n  \"id\": 1\n}"}, "header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}, {"key": "Content-Type", "value": "application/json"}], "method": "DELETE", "url": {"host": ["{{baseUrl}}"], "path": ["employees"], "raw": "{{baseUrl}}/employees"}}, "response": []}, {"name": "Regenerate token", "request": {"header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}], "method": "POST", "url": {"host": ["{{baseUrl}}"], "path": ["employees", ":id", "regenerate-token"], "raw": "{{baseUrl}}/employees/:id/regenerate-token", "variable": [{"key": "id", "value": "1"}]}}, "response": []}], "name": "Pegawai"}, {"item": [{"name": "Hari ini", "request": {"header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}], "method": "GET", "url": {"host": ["{{baseUrl}}"], "path": ["attendance", "today"], "query": [{"key": "nup", "value": "{{nup}}"}], "raw": "{{baseUrl}}/attendance/today?nup={{nup}}"}}, "response": []}, {"name": "Riwayat", "request": {"header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}], "method": "GET", "url": {"host": ["{{baseUrl}}"], "path": ["attendance"], "query": [{"key": "from", "value": "2026-09-01"}, {"key": "nup", "value": "{{nup}}"}, {"key": "to", "value": "2026-09-13"}], "raw": "{{baseUrl}}/attendance?nup={{nup}}&from=2026-09-01&to=2026-09-13"}}, "response": []}, {"name": "Upsert (admin)", "request": {"body": {"mode": "raw", "options": {"raw": {"language": "json"}}, "raw": "{\n  \"nup\": \"{{nup}}\",\n  \"tanggal\": \"2026-09-13\",\n  \"jam_masuk\": \"08:00\",\n  \"jam_pulang\": \"17:00\"\n}"}, "header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}, {"key": "Content-Type", "value": "application/json"}], "method": "POST", "url": {"host": ["{{baseUrl}}"], "path": ["attendance", "upsert"], "raw": "{{baseUrl}}/attendance/upsert"}}, "response": []}], "name": "Absensi"}, {"item": [{"name": "Bind device", "request": {"body": {"mode": "raw", "options": {"raw": {"language": "json"}}, "raw": "{\n  \"device_uuid\": \"uuid-hp-001\",\n  \"employee_token\": \"{{employee_token}}\"\n}"}, "header": [{"key": "Content-Type", "value": "application/json"}], "method": "POST", "url": {"host": ["{{baseUrl}}"], "path": ["session", "bind"], "raw": "{{baseUrl}}/session/bind"}}, "response": []}, {"name": "Cek sesi", "request": {"method": "GET", "url": {"host": ["{{baseUrl}}"], "path": ["session", "check"], "query": [{"key": "device_uuid", "value": "uuid-hp-001"}, {"key": "employee_token", "value": "{{employee_token}}"}], "raw": "{{baseUrl}}/session/check?employee_token={{employee_token}}&device_uuid=uuid-hp-001"}}, "response": []}], "name": "Sesi"}, {"item": [{"name": "Dummy absensi", "request": {"body": {"mode": "raw", "options": {"raw": {"language": "json"}}, "raw": "{}"}, "header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}, {"key": "Content-Type", "value": "application/json"}], "method": "POST", "url": {"host": ["{{baseUrl}}"], "path": ["test", "attendance"], "raw": "{{baseUrl}}/test/attendance"}}, "response": []}, {"name": "Dummy broadcast", "request": {"body": {"mode": "raw", "options": {"raw": {"language": "json"}}, "raw": "{}"}, "header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}, {"key": "Content-Type", "value": "application/json"}], "method": "POST", "url": {"host": ["{{baseUrl}}"], "path": ["test", "notification"], "raw": "{{baseUrl}}/test/notification"}}, "response": []}, {"name": "Reset", "request": {"body": {"mode": "raw", "options": {"raw": {"language": "json"}}, "raw": "{}"}, "header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}, {"key": "Content-Type", "value": "application/json"}], "method": "POST", "url": {"host": ["{{baseUrl}}"], "path": ["test", "reset"], "raw": "{{baseUrl}}/test/reset"}}, "response": []}, {"name": "Reset SEMUA tabel (bahaya: token hangus)", "request": {"body": {"mode": "raw", "options": {"raw": {"language": "json"}}, "raw": "{\n  \"tables\": [\"all\"]\n}"}, "header": [{"key": "Authorization", "value": "Bearer {{api_token}}"}, {"key": "Content-Type", "value": "application/json"}], "method": "POST", "url": {"host": ["{{baseUrl}}"], "path": ["test", "reset"], "raw": "{{baseUrl}}/test/reset"}}, "response": []}], "name": "Test"}], "variable": [{"key": "access_token", "value": "ISI_DARI_LOGIN"}, {"key": "api_token", "value": "notif-secret-key-2026"}, {"key": "baseUrl", "value": "http://notif.kuroichi.my.id/api"}, {"key": "employee_token", "value": "ISI_TOKEN_PEGAWAI"}, {"key": "nup", "value": "2211331144"}, {"key": "refresh_token", "value": "ISI_DARI_LOGIN"}]}