Lewati ke konten utama

Referensi REST API Lengkap

Dokumentasi spesifikasi teknis REST API untuk seluruh endpoint Wedding Operations, Guests, Check-in, Souvenir, Reports, dan WhatsApp.


Standar Permintaan (Request Standard)

Base URL

https://api.codeverta.com/api

Header Autentikasi

Seluruh endpoint privat membutuhkan header HTTP Authorization dengan format JSON Web Token (JWT):

Authorization: Bearer <access_token>
Content-Type: application/json

1. Modul Wedding Events (/api/events)

Buat Wedding Event Baru

  • Method: POST
  • Path: /api/events
  • Request Body:
{
"title": "The Wedding of Romeo & Juliet",
"slug": "romeo-juliet",
"groom_name": "Romeo Montague",
"bride_name": "Juliet Capulet",
"status": "PUBLISHED",
"event_date": "2026-09-20T08:00:00Z",
"location_name": "Grand Ballroom",
"location_address": "Jl. Sudirman No. 1, Jakarta"
}
  • Response 201 Created:
{
"id": "e9b21f3a-9c71-4a16-a192-38d7426189ab",
"title": "The Wedding of Romeo & Juliet",
"slug": "romeo-juliet",
"status": "PUBLISHED",
"created_at": "2026-08-15T10:00:00Z"
}

Daftar Wedding Events

  • Method: GET
  • Path: /api/events?page=1&limit=10&search=romeo

Detail Event by ID

  • Method: GET
  • Path: /api/events/:id

Update Event

  • Method: PUT
  • Path: /api/events/:id

Hapus Event

  • Method: DELETE
  • Path: /api/events/:id

2. Modul Tamu & Undangan (/api/events/:id/guests)

Daftar Tamu Event

  • Method: GET
  • Path: /api/events/:id/guests?page=1&limit=50&category=VIP&rsvp=HADIR&search=Budi

Tambah Tamu Satuan

  • Method: POST
  • Path: /api/events/:id/guests
  • Request Body:
{
"name": "Bpk. Budi Santoso",
"phone": "6281234567890",
"email": "budi@example.com",
"category": "VIP",
"priority": "VIP",
"table_number": "Meja 01",
"session_name": "Resepsi Siang",
"invitation_quota": 2,
"companion_count": 1,
"souvenir_allowance": 1
}
  • Response 201 Created:
{
"id": "7fa12b9c-4e89-4d22-901a-8c5e93fa1100",
"event_id": "e9b21f3a-9c71-4a16-a192-38d7426189ab",
"name": "Bpk. Budi Santoso",
"invitation_code": "WED-ROMEO-B8921",
"rsvp_status": "BELUM_MENJAWAB",
"souvenir_allowance": 1,
"souvenir_claimed": 0
}

Import Tamu Massal via Excel

  • Method: POST
  • Path: /api/events/:id/guests/import
  • Content-Type: multipart/form-data
  • Form Fields: file (File .xlsx, maks 10 MB).
  • Response 200 OK:
{
"message": "import tamu selesai",
"total": 120,
"imported": 115,
"skipped": 5
}

Dapatkan Gambar QR Code Tamu

  • Method: GET
  • Path: /api/events/:id/guests/:guestId/qr
  • Response: Image binary stream (Content-Type: image/png).

Update Status "WhatsApp Dibuka"

  • Method: PUT
  • Path: /api/events/:id/guests/:guestId/whatsapp-opened
  • Request Body:
{
"is_opened": true
}

3. Modul Template Pesan WhatsApp (/api/events/:id/guest-message-templates)

MethodPathDeskripsi
GET/api/events/:id/guest-message-templatesAmbil daftar template pesan event
POST/api/events/:id/guest-message-templatesBuat template pesan baru
PUT/api/events/:id/guest-message-templates/:templateIdPerbarui template pesan
DELETE/api/events/:id/guest-message-templates/:templateIdHapus template pesan

4. Modul Meja Resepsi & Check-in (/api/events/:id/check-ins)

Melakukan Check-in Tamu

  • Method: POST
  • Path: /api/events/:id/check-ins
  • Request Body:
{
"invitation_code": "WED-ROMEO-B8921",
"scan_method": "SCANNER_HARDWARE",
"actual_pax": 2,
"device_info": "FrontDesk-Laptop-01",
"client_operation_id": "9f21b7c4-5d32-4e11-89a1-7c9802a43bb2"
}
  • Response 200 OK (Berhasil):
{
"status": "SUCCESS",
"message": "Check-in berhasil",
"guest": {
"id": "7fa12b9c-4e89-4d22-901a-8c5e93fa1100",
"name": "Bpk. Budi Santoso",
"category": "VIP",
"priority": "VIP",
"table_number": "Meja 01",
"actual_pax": 2
},
"checked_in_at": "2026-08-15T11:05:22Z"
}
  • Response 409 Conflict (Duplikasi Check-in Terdeteksi):
{
"status": "DUPLICATE",
"message": "Tamu sudah pernah melakukan check-in sebelumnya",
"first_check_in": {
"checked_in_at": "2026-08-15T10:14:02Z",
"device_info": "FrontDesk-Gate-2",
"actual_pax": 2
}
}

Ambil Check-in Terbaru untuk Layar LED Sambutan

  • Method: GET
  • Path: /api/events/:id/check-ins/latest
  • Response 200 OK:
{
"guest_name": "Bpk. Budi Santoso",
"priority": "VIP",
"table_number": "Meja 01",
"checked_in_at": "2026-08-15T11:05:22Z"
}

5. Modul Souvenir & Voucher (/api/events/:id/souvenirs)

Daftar Item Souvenir & Stok

  • Method: GET
  • Path: /api/events/:id/souvenirs

Tambah Item Souvenir

  • Method: POST
  • Path: /api/events/:id/souvenirs
  • Request Body:
{
"name": "Tumbler Stainless Custom",
"sku": "SVN-TMB-01",
"initial_stock": 500,
"low_stock_threshold": 30
}

Penyesuaian Stok Souvenir

  • Method: POST
  • Path: /api/events/:id/souvenirs/:souvenirId/stock
  • Request Body:
{
"adjustment_amount": 50,
"reason": "Tambahan pengiriman dari vendor batch 2"
}

Cek Kelayakan & Sisa Jatah Souvenir Tamu

  • Method: GET
  • Path: /api/events/:id/souvenir-eligibility?code=WED-ROMEO-B8921
  • Response 200 OK:
{
"eligible": true,
"guest_name": "Bpk. Budi Santoso",
"total_allowance": 1,
"claimed_count": 0,
"remaining_allowance": 1,
"is_checked_in": true
}

Catat Penyerahan Souvenir (Pickup)

  • Method: POST
  • Path: /api/events/:id/souvenir-pickups
  • Request Body:
{
"guest_id": "7fa12b9c-4e89-4d22-901a-8c5e93fa1100",
"souvenir_item_id": "8bb210fa-11c4-4299-a9a3-982173ea9011",
"quantity": 1,
"client_operation_id": "a128f731-90be-4df1-8e99-012849182377"
}

Batalkan Penyerahan Souvenir (Reversal)

  • Method: POST
  • Path: /api/events/:id/souvenir-pickups/:pickupId/reverse
  • Request Body:
{
"reason": "Koreksi salah input petugas loket"
}

6. Modul Laporan & Analitik (/api/events/:id/reports)

Ringkasan Laporan Operasional Event

  • Method: GET
  • Path: /api/events/:id/reports/overview?from=2026-08-10&to=2026-08-15
  • Response 200 OK:
{
"summary": {
"total_guests": 350,
"total_invitation_pax": 700,
"total_rsvp_yes": 290,
"total_rsvp_no": 25,
"total_rsvp_pending": 35,
"total_checked_in_guests": 280,
"total_actual_pax_attended": 540,
"attendance_rate_percentage": 80.0,
"total_souvenirs_distributed": 275,
"total_whatsapp_opened": 310
},
"attendance_by_hour": [
{ "hour": "10:00", "count": 45 },
{ "hour": "11:00", "count": 130 },
{ "hour": "12:00", "count": 85 },
{ "hour": "13:00", "count": 20 }
],
"checkin_methods": {
"SCANNER_HARDWARE": 230,
"CAMERA": 35,
"MANUAL": 15
},
"category_breakdown": [
{ "category": "VIP", "invited": 50, "attended": 48 },
{ "category": "Keluarga", "invited": 100, "attended": 95 },
{ "category": "Reguler", "invited": 200, "attended": 137 }
]
}

7. Modul WhatsApp Meta Cloud API (/api/whatsapp)

MethodPathDeskripsi
GET/api/whatsapp/connectionCek status koneksi Meta WABA organisasi
PUT/api/whatsapp/connectionHubungkan & verifikasi WABA ID, Phone ID & Token
POST/api/whatsapp/connection/verifyUji ulang koneksi ke Graph API Meta
GET/api/whatsapp/templatesAmbil daftar template pesan tersinkronisasi
POST/api/whatsapp/templates/syncTarik & sinkronkan template dari Meta WABA
POST/api/whatsapp/messages/testKirim uji coba pesan template resmi
GET/api/whatsapp/messagesRiwayat log pesan dan status pengiriman
GET/api/integrations/whatsapp/webhookWebhook verification endpoint (Meta Challenge)
POST/api/integrations/whatsapp/webhookWebhook listener (X-Hub-Signature-256)