AtourinAtourin
Home
API Reference
Home
API Reference
  • API Reference

    • Autentikasi (Auth)
    • Theme & Konfigurasi Aplikasi
    • Home & Discovery
    • Produk & Pengalaman Wisata
    • Destinasi & Area Wisata
    • Homestay (Akomodasi)
    • ARTI (Atourin Regenerative Tourism Initiative)
    • Promo & Voucher
    • Pencarian (Search)
    • Upload File
    • Transaksi & Pesanan (Orders)
    • Pembayaran (Payments)
    • Asuransi (Insurance)
    • Ulasan (Reviews)
    • Profil Pengguna (Profile)
    • Daftar Keinginan (Wishlist)
    • Notifikasi (Notifications)
    • FAQ (Pertanyaan Umum)
    • Blog & Artikel

Notifikasi (Notifications)

Dokumentasi API untuk manajemen pesan sistem, pemberitahuan transaksi, dan promo khusus pengguna.

Endpoint Overview

MethodEndpointDeskripsi
GET/notificationsMengambil daftar notifikasi dengan pagination & filter.
GET/notifications/:idMengambil detail lengkap satu notifikasi.
PUT/notifications/:id/readMenandai satu notifikasi sebagai sudah dibaca.
PUT/notifications/read-allMenandai semua notifikasi sebagai sudah dibaca.
GET/notifications/unread-countMengambil jumlah notifikasi yang belum dibaca.

1. Get Notification List

Mengambil daftar pemberitahuan untuk pengguna yang sedang login.

  • URL: /notifications
  • Method: GET
  • Headers: Authorization: Bearer {{token}}
  • Query Parameters:
    • page, max: Pagination (default: 1, 10).
    • type: Filter tipe (transaction, promotion, system).
    • is_read: Filter status baca (true/false).
  • Response (200 OK):
{
  "total_rows": 25,
  "rows": [
    {
      "id": "uuid-01",
      "type": "transaction",
      "subtype": "payment_success",
      "title": "Pembayaran Berhasil",
      "body": "Pembayaran untuk Tour Bali telah berhasil diproses",
      "is_read": false,
      "created_at": "2026-03-20T10:00:00Z"
    }
  ]
}

2. Mark as Read

Menandai notifikasi tertentu atau seluruh notifikasi sebagai sudah dibaca untuk menghilangkan indikator (badge) di aplikasi.

  • URL: /notifications/:id/read (Single) atau /notifications/read-all (Global)
  • Method: PUT
  • Response (200 OK):
{
  "message": "Notification marked as read"
}

🔥 Uji Coba API (Simulator)

Gunakan simulator di bawah ini untuk mencoba seluruh endpoint di atas secara langsung. Anda dapat mengubah URL, Method, Headers, dan Body sesuai kebutuhan.

Last Updated: 3/27/26, 5:05 AM
Contributors: Priyono Atourin
Prev
Daftar Keinginan (Wishlist)
Next
FAQ (Pertanyaan Umum)