Endpoint untuk membaca dan mengelola notifikasi. Tidak ada varian _admin/_crm.
POST /v1/get_notif
Ambil daftar notifikasi dengan pagination.
Handler: handlers/notif_live.go:29 GetNotif
Request body
| Field | Tipe | Wajib | Deskripsi |
|---|---|---|---|
team | string | ✅ | Team ID |
limit | string | ❌ | Jumlah notif per page |
offset | string | ❌ | Offset pagination |
Response (sukses)
{
"result": true,
"data": [/* NotifStruct[] */],
"index": ["notif-id-1", "notif-id-2"],
"total": 42
}Response (error)
{"result": false, "message": "<err>"}Error sources: GetTeam, GetNotifList, GetTotalNotifList.
POST /v1/get_totalnotif
Ambil total notifikasi (count), bisa filter per tipe.
Handler: handlers/notif_live.go:86 GetTotalNotif
Request body
| Field | Tipe | Wajib | Deskripsi |
|---|---|---|---|
team | string | ✅ | Team ID |
type | string | ❌ | Filter tipe (comma-separated, mis. "chat,order") |
Response (sukses)
{
"result": true,
"total": 15
}Response (error)
{"result": false, "message": "<err>"}POST /v1/readall_notif
Tandai semua notifikasi sebagai sudah dibaca.
Handler: handlers/notif_live.go:141 MarkReadAll
Request body
| Field | Tipe | Wajib | Deskripsi |
|---|---|---|---|
team | string | ✅ | Team ID |
Response (sukses)
{"result": true, "message": "Success Mark Read notif"}Response (error)
{"result": false, "message": "<err>"}POST /v1/markread_notif
Tandai satu notifikasi sebagai sudah dibaca.
Handler: handlers/notif_live.go:190 MarkReadNotif
Request body
| Field | Tipe | Wajib | Deskripsi |
|---|---|---|---|
notifId | string | ✅ | Notif ID |
team | string | ✅ | Team ID |
Response (sukses)
{"result": true, "message": "Success Mark Read notif"}Response (error)
| Kondisi | Body |
|---|---|
| GetTeam gagal | {"result": false, "message": "<err>"} |
| Notif tidak ditemukan | {"result": false, "message": "Cant notif data : <err>"} |
| Update gagal | {"result": false, "message": "Cant Mark Read notif data : <err>"} |
POST /v1/getdetail_notif
Ambil detail satu notifikasi.
Handler: handlers/notif_live.go:254 GetNotifdetailData
Request body
| Field | Tipe | Wajib | Deskripsi |
|---|---|---|---|
notifId | string | ✅ | Notif ID |
team | string | ✅ | Team ID |
Response (sukses)
{
"result": true,
"data": {/* NotifStruct */}
}Response (error)
| Kondisi | Body |
|---|---|
| GetTeam gagal | {"result": false, "message": "<err>"} |
| Notif tidak ditemukan | {"result": false, "message": "Cant notif data : <err>"} |
Tipe notifikasi
Notifikasi dibedakan via field type di NotifStruct:
| Tipe | Sumber | Catatan |
|---|---|---|
chat | NotifChatStruct | Notif pesan masuk |
order | NotifOrderStruct | Notif order baru |
subscription | NotifSubscriptionStruct | Notif langganan |
Kembali ke
- API Reference Index — daftar semua grup