D
API Reference

Notifications

Endpoint notifikasi — readall_notif, get_notif, get_totalnotif, markread_notif, getdetail_notif. Detail request param dan response.

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

FieldTipeWajibDeskripsi
teamstring✅Team ID
limitstring❌Jumlah notif per page
offsetstring❌Offset pagination

Response (sukses)

json
{
  "result": true,
  "data": [/* NotifStruct[] */],
  "index": ["notif-id-1", "notif-id-2"],
  "total": 42
}

Response (error)

json
{"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

FieldTipeWajibDeskripsi
teamstring✅Team ID
typestring❌Filter tipe (comma-separated, mis. "chat,order")

Response (sukses)

json
{
  "result": true,
  "total": 15
}

Response (error)

json
{"result": false, "message": "<err>"}

POST /v1/readall_notif

Tandai semua notifikasi sebagai sudah dibaca.

Handler: handlers/notif_live.go:141 MarkReadAll

Request body

FieldTipeWajibDeskripsi
teamstring✅Team ID

Response (sukses)

json
{"result": true, "message": "Success Mark Read notif"}

Response (error)

json
{"result": false, "message": "<err>"}

POST /v1/markread_notif

Tandai satu notifikasi sebagai sudah dibaca.

Handler: handlers/notif_live.go:190 MarkReadNotif

Request body

FieldTipeWajibDeskripsi
notifIdstring✅Notif ID
teamstring✅Team ID

Response (sukses)

json
{"result": true, "message": "Success Mark Read notif"}

Response (error)

KondisiBody
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

FieldTipeWajibDeskripsi
notifIdstring✅Notif ID
teamstring✅Team ID

Response (sukses)

json
{
  "result": true,
  "data": {/* NotifStruct */}
}

Response (error)

KondisiBody
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:

TipeSumberCatatan
chatNotifChatStructNotif pesan masuk
orderNotifOrderStructNotif order baru
subscriptionNotifSubscriptionStructNotif langganan

Kembali ke