Lompat ke konten utama
StableTerakhir diperbarui: 9 Okt 2026, 09.28

All-in-One API (51 Endpoint)

All-in-One API menyediakan agregasi fungsional dari berbagai operasi backend platform DagangBot melalui satu pintu terpadu (prefix /api/v1/all-in-one/). Rute ini dirancang untuk integrasi sistem yang memerlukan kemampuan multi-sektor, seperti Enterprise Resource Planning (ERP), Manajemen Hubungan Pelanggan (CRM) korporat, atau agregator pesanan omni-channel.

Stable

1. Ikhtisar & Nilai Bisnis

Membangun ekosistem ritel yang saling terhubung menuntut kapabilitas integrasi sistem tingkat lanjut. Alih-alih menerbitkan serangkaian API token mandiri yang sulit dikelola, platform ini mendemonstrasikan kekuatan operasional terpusat dengan satu key serba bisa.

  • 51 Titik Integrasi Total: Akses tanpa batas ke operasi pesanan (orders), pengiriman pesan WhatsApp instan, kueri kecerdasan buatan, penagihan (billing), manajemen pemesanan jasa (bookings), konfigurasi webhook, serta otomatisasi pembuatan artikel SEO cerdas (article generator).
  • Pemusatan Hak Akses Integrasi: Menghapus beban teknis rotasi kredensial per aplikasi berkat arsitektur kunci tunggal dengan rentang kontrol granular scope.
  • Isolasi Keamanan 403 (Two-Way Guard): Pengamanan tingkat militer mencegah rekayasa lalu lintas kredensial secara silang antara domain akses pengguna web reguler dan endpoint robot integrasi.
  • Keselamatan Idempotensi Pesanan: Pembentukan transaksi (orders:create) dan pengisian tagihan (billing:topup) dilindungi oleh lapis kunci idempotensi (Idempotency-Key) untuk menjamin keselamatan aset modal dalam transisi gangguan jaringan (rekonsiliasi mutlak, anti-transaksi-ganda).
  • Format Respons Konsisten: Skema pembalasan diseragamkan dengan envelope pembungkus JSON terstandarisasi untuk kesederhanaan parsing data.
Dokumentasi Gap Spec OpenAPI

Berdasarkan audit internal, spesifikasi OpenAPI standar kami pada saat publikasi ini mungkin melewatkan dokumentasi untuk rute GET /api/v1/all-in-one/products/{id}. Namun, rute tersebut telah diregistrasi di router API dan diverifikasi aktif.

2. Alur Visual & Antarmuka

Visualisasi arsitektur All-in-One API dapat dilihat pada antarmuka Dashboard pengembang yang intuitif, mulai dari kartu API Key terpadu hingga pusat kendali integrasi platform:

Kartu akses modul integrasi API Key All-in-One di dashboard DagangBot
Kartu API Key All-in-One dengan status kunci aktif, tombol salin instan, dan contoh perintah cURL terpadu.
Tampilan dasbor integrasi pengembang lengkap dengan monitoring saldo token dan IP allowlist
Dasbor integrasi pengembang terpusat dengan monitoring saldo token, status API Key, dan katalog saluran data.

3. Panduan Langkah-demi-Langkah

Untuk menunjukkan daya dukung operasional All-in-One API, berikut adalah tiga prosedur integrasi yang mewakili frekuensi penggunaan (Most-Used Endpoints).

Langkah 1: Kasus Penggunaan 1 — Mengirim Pesan WhatsApp (Notifikasi)

Mengintegrasikan pengiriman pesan asinkron melalui gateway DagangBot:

GET/all-in-one/accountApiKeyAuth

Baca detail akun merchant

Identitas, langganan, saldo token, statistik. Scope `account:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/account" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail akun
GET/all-in-one/mediaApiKeyAuth

Daftar media library tenant

Daftar aset (foto produk, media katalog WA, lampiran bukti bayar). Read-only. Scope `media:read`. Query `module`, `file_type`, `page`, `per_page` (maks 100).

Parameter

NamaLokasiWajibTipeDeskripsi
modulequeryTidakstring-
file_typequeryTidakstring-
pagequeryTidakinteger-
per_pagequeryTidakinteger-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/media" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar aset beserta meta paginasi
403Key tidak punya scope media:read (key lama perlu migrasi 000341)
POST/all-in-one/otp/sendApiKeyAuth

Kirim OTP

Scope `otp:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
contoh-body.json
{
  "phone": "6281234567890"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/otp/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890" }'

Respons

StatusDeskripsi
200OTP terkirim
POST/all-in-one/otp/verifyApiKeyAuth

Verifikasi OTP

Scope `otp:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
otp_codeYastring-
contoh-body.json
{
  "phone": "6281234567890",
  "otp_code": "123456"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/otp/verify" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "otp_code": "123456" }'

Respons

StatusDeskripsi
200OTP tervalidasi
POST/all-in-one/rag/queryApiKeyAuth

Query RAG (jawaban dari knowledge base)

Pencarian vektor + sintesis jawaban AI atas knowledge base merchant. Scope `rag:read`. Bila provider embedding tidak tersedia, otomatis beralih ke pencarian kata kunci (field `used_fallback` = true).

Body (wajib)

FieldWajibTipeDeskripsi
queryYastring-
top_kTidakinteger-
contoh-body.json
{
  "query": "<teks>",
  "top_k": 0
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/rag/query" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "<teks>", "top_k": 0 }'

Respons

StatusDeskripsi
200Jawaban + hasil pencarian
POST/all-in-one/notify/sendApiKeyAuth

Kirim notifikasi multi-kanal

Scope `notify:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
template_typeYastring-
contentTidakstring-
variablesTidakobject-
contoh-body.json
{
  "phone": "6281234567890",
  "template_type": "<teks>",
  "content": "<teks>",
  "variables": {}
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/notify/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "template_type": "<teks>", "content": "<teks>", "variables": {} }'

Respons

StatusDeskripsi
200Notifikasi terkirim
POST/all-in-one/messages/sendApiKeyAuth

Kirim pesan WhatsApp ke satu nomor

Scope `messages:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
contentTidakstring-
media_urlTidakstring-
contoh-body.json
{
  "phone": "6281234567890",
  "content": "<teks>",
  "media_url": "https://contoh.id"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/messages/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "content": "<teks>", "media_url": "https://contoh.id" }'

Respons

StatusDeskripsi
200Pesan terkirim
422Nomor / konten tidak valid
POST/all-in-one/webhookApiKeyAuth

Terima event webhook masuk (dua arah)

Menyimpan event ke inbox tenant. Scope `webhook:receive`.

Body (opsional)

FieldWajibTipeDeskripsi
eventTidakstring-
dataTidakobject-
contoh-body.json
{
  "event": "<teks>",
  "data": {}
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/webhook" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "event": "<teks>", "data": {} }'

Respons

StatusDeskripsi
202Event diterima
GET/all-in-one/wa/instancesApiKeyAuth

Daftar instance WhatsApp

Menampilkan nomor WhatsApp milik tenant beserta status koneksinya (id, instance_name, phone_number, connection_status, connection_type, service_role, dsb). Scope `wa:manage`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/wa/instances" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar instance WhatsApp
POST/all-in-one/wa/instancesApiKeyAuth

Tambah nomor WhatsApp baru

Membuat sesi WhatsApp baru di gateway lalu menyimpannya. Scope `wa:manage`. Rate-limited (SensitiveLimit). Untuk tenant dengan scope cabang, `branch_id` wajib diisi.

Body (wajib)

FieldWajibTipeDeskripsi
instance_nameYastring-
connection_typeTidakstring-
service_roleTidakstring-
branch_idTidakstring (uuid)Wajib bila tenant memakai scope cabang
contoh-body.json
{
  "instance_name": "Contoh Nama",
  "connection_type": "unofficial",
  "service_role": "<teks>",
  "branch_id": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/wa/instances" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "instance_name": "Contoh Nama", "connection_type": "unofficial", "service_role": "<teks>", "branch_id": "<teks>" }'

Respons

StatusDeskripsi
201Instance dibuat (menyertakan qr_code bila unofficial)
400Nama instance tidak valid
403Kuota nomor WA tercapai atau plan tidak mengizinkan
409Nama instance sudah dipakai
GET/all-in-one/wa/instances/{id}/qrApiKeyAuth

Ambil kode QR untuk scan

Mengembalikan QR live (data URL base64) untuk memindai nomor. Bila perangkat sudah tersambung, balasan berisi connected=true tanpa QR. Scope `wa:manage`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}/qr" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200{ qr_code, pairing_code, status, ... }
404Instance tidak ditemukan
POST/all-in-one/wa/instances/{id}/restartApiKeyAuth

Restart koneksi sesi WhatsApp

Scope `wa:manage`. Rate-limited (SensitiveLimit).

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}/restart" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Sesi WhatsApp direstart
404Instance tidak ditemukan
DELETE/all-in-one/wa/instances/{id}ApiKeyAuth

Hapus instance WhatsApp

Memutus dan menghapus instance. Scope `wa:manage`. Rate-limited (SensitiveLimit).

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
purge_modequeryTidakstring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Instance WhatsApp dihapus
404Instance tidak ditemukan
GET/all-in-one/billing/balanceApiKeyAuth

Lihat saldo token

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/balance" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Saldo token & ringkasan
GET/all-in-one/billing/transactionsApiKeyAuth

Riwayat transaksi token

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/transactions" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar transaksi
GET/all-in-one/billing/invoicesApiKeyAuth

Daftar invoice

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/invoices" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar invoice
POST/all-in-one/billing/topupApiKeyAuth

Topup saldo (membuat invoice pembayaran)

Membuat invoice top-up saldo token lewat payment gateway. Saldo bertambah setelah pembayaran terkonfirmasi (webhook gateway). Scope `billing:create`. Wajib header `Idempotency-Key`.

Parameter

NamaLokasiWajibTipeDeskripsi
Idempotency-KeyheaderYastring-

Body (wajib)

FieldWajibTipeDeskripsi
amountYanumber-
payment_gatewayTidakstring-
contoh-body.json
{
  "amount": 0,
  "payment_gateway": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/billing/topup" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 0, "payment_gateway": "<teks>" }'

Respons

StatusDeskripsi
201Invoice topup dibuat + info pembayaran
422Nominal tidak valid
GET/all-in-one/productsApiKeyAuth

Daftar produk

Scope `products:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/products" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar produk
POST/all-in-one/productsApiKeyAuth

Buat produk

Scope `products:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/products" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Produk dibuat
PUT/all-in-one/products/{id}ApiKeyAuth

Ubah produk

Scope `products:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/products/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Produk diperbarui
DELETE/all-in-one/products/{id}ApiKeyAuth

Hapus produk

Scope `products:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/products/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Produk dihapus
GET/all-in-one/ordersApiKeyAuth

Daftar pesanan

Scope `orders:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/orders" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pesanan
POST/all-in-one/ordersApiKeyAuth

Buat pesanan

Scope `orders:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/orders" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Pesanan dibuat
GET/all-in-one/orders/{id}ApiKeyAuth

Detail pesanan

Scope `orders:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/orders/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail pesanan
PUT/all-in-one/orders/{id}/statusApiKeyAuth

Ubah status pesanan

Scope `orders:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/orders/{id}/status" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Status diperbarui
GET/all-in-one/customersApiKeyAuth

Daftar pelanggan

Scope `customers:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/customers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pelanggan
GET/all-in-one/customers/{id}ApiKeyAuth

Detail pelanggan

Scope `customers:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/customers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail pelanggan
PUT/all-in-one/customers/{id}ApiKeyAuth

Ubah pelanggan

Scope `customers:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/customers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Pelanggan diperbarui
GET/all-in-one/vouchersApiKeyAuth

Daftar voucher

Scope `vouchers:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/vouchers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar voucher
POST/all-in-one/vouchersApiKeyAuth

Buat voucher

Scope `vouchers:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/vouchers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Voucher dibuat
POST/all-in-one/vouchers/validateApiKeyAuth

Validasi voucher

Scope `vouchers:read`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/vouchers/validate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Hasil validasi
GET/all-in-one/vouchers/{id}ApiKeyAuth

Detail voucher

Scope `vouchers:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail voucher
PUT/all-in-one/vouchers/{id}ApiKeyAuth

Ubah voucher

Scope `vouchers:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Voucher diperbarui
DELETE/all-in-one/vouchers/{id}ApiKeyAuth

Hapus voucher

Scope `vouchers:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Voucher dihapus
GET/all-in-one/servicesApiKeyAuth

Daftar layanan (service catalog)

Scope `services:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/services" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar layanan
POST/all-in-one/servicesApiKeyAuth

Buat layanan

Scope `services:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/services" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Layanan dibuat
PUT/all-in-one/services/{id}ApiKeyAuth

Ubah layanan

Scope `services:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/services/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Layanan diperbarui
DELETE/all-in-one/services/{id}ApiKeyAuth

Hapus layanan

Scope `services:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/services/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Layanan dihapus
GET/all-in-one/bookingsApiKeyAuth

Daftar booking

Scope `bookings:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/bookings" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar booking
GET/all-in-one/bookings/{id}ApiKeyAuth

Detail booking

Scope `bookings:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail booking
PUT/all-in-one/bookings/{id}/statusApiKeyAuth

Ubah status booking

Scope `bookings:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}/status" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Status booking diperbarui
PUT/all-in-one/bookings/{id}/cancelApiKeyAuth

Batalkan booking

Scope `bookings:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}/cancel" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Booking dibatalkan
GET/all-in-one/conversationsApiKeyAuth

Daftar percakapan (inbox)

Scope `conversations:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar percakapan
GET/all-in-one/conversations/{id}ApiKeyAuth

Detail percakapan

Scope `conversations:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail percakapan
GET/all-in-one/conversations/{id}/messagesApiKeyAuth

Pesan dalam percakapan

Scope `conversations:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}/messages" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pesan
POST/all-in-one/conversations/{id}/replyApiKeyAuth

Balas percakapan

Scope `conversations:create` atau `conversations:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-

Body (wajib)

FieldWajibTipeDeskripsi
contentTidakstring-
media_urlTidakstring-
contoh-body.json
{
  "content": "<teks>",
  "media_url": "https://contoh.id"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}/reply" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "content": "<teks>", "media_url": "https://contoh.id" }'

Respons

StatusDeskripsi
200Balasan terkirim
POST/all-in-one/article-gen/generateApiKeyAuth

Buat antrian generate artikel AI

Scope `article_gen`. Menerima project_id atau daftar keywords langsung untuk generate artikel SEO otomatis.

Body (wajib)

FieldWajibTipeDeskripsi
project_idTidakstring-
keywordsTidakstring[]-
toneTidakstring-
categoryTidakstring-
webhook_urlTidakstring-
webhook_secretTidakstring-
company_contextTidakstring-
contoh-body.json
{
  "project_id": "<teks>",
  "keywords": [],
  "tone": "<teks>",
  "category": "<teks>",
  "webhook_url": "https://contoh.id",
  "webhook_secret": "<teks>",
  "company_context": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/article-gen/generate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "project_id": "<teks>", "keywords": [], "tone": "<teks>", "category": "<teks>", "webhook_url": "https://contoh.id", "webhook_secret": "<teks>", "company_context": "<teks>" }'

Respons

StatusDeskripsi
202Batch generate diterima
GET/all-in-one/article-gen/batches/{id}ApiKeyAuth

Status dan progres antrian batch artikel

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/batches/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail status batch artikel
GET/all-in-one/article-gen/batches/{id}/articlesApiKeyAuth

Daftar artikel dalam batch

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/batches/{id}/articles" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar artikel dalam batch
GET/all-in-one/article-gen/articles/{id}ApiKeyAuth

Detail artikel hasil generate

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/articles/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail lengkap artikel
POST/all-in-one/article-gen/estimateApiKeyAuth

Estimasi biaya dan kuota artikel

Scope `article_gen`.

Body (wajib)

FieldWajibTipeDeskripsi
keyword_idsYastring[]-
contoh-body.json
{
  "keyword_ids": []
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/article-gen/estimate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "keyword_ids": [] }'

Respons

StatusDeskripsi
200Estimasi kuota gratis dan biaya IDR
bash
curl -X POST "https://dagangbot.web.id/api/v1/all-in-one/messages/send" \
  -H "X-API-Key: dgb_all_ContohKunciRahasiaAnda123" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "6281234567890",
    "content": "Halo! Paket pesanan #INV-990 telah diserahkan ke kurir."
  }'

Langkah 2: Kasus Penggunaan 2 — Memeriksa Saldo Penagihan

Integrasi manajemen token AI dan saldo operasional merchant:

GET/all-in-one/accountApiKeyAuth

Baca detail akun merchant

Identitas, langganan, saldo token, statistik. Scope `account:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/account" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail akun
GET/all-in-one/mediaApiKeyAuth

Daftar media library tenant

Daftar aset (foto produk, media katalog WA, lampiran bukti bayar). Read-only. Scope `media:read`. Query `module`, `file_type`, `page`, `per_page` (maks 100).

Parameter

NamaLokasiWajibTipeDeskripsi
modulequeryTidakstring-
file_typequeryTidakstring-
pagequeryTidakinteger-
per_pagequeryTidakinteger-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/media" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar aset beserta meta paginasi
403Key tidak punya scope media:read (key lama perlu migrasi 000341)
POST/all-in-one/otp/sendApiKeyAuth

Kirim OTP

Scope `otp:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
contoh-body.json
{
  "phone": "6281234567890"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/otp/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890" }'

Respons

StatusDeskripsi
200OTP terkirim
POST/all-in-one/otp/verifyApiKeyAuth

Verifikasi OTP

Scope `otp:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
otp_codeYastring-
contoh-body.json
{
  "phone": "6281234567890",
  "otp_code": "123456"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/otp/verify" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "otp_code": "123456" }'

Respons

StatusDeskripsi
200OTP tervalidasi
POST/all-in-one/rag/queryApiKeyAuth

Query RAG (jawaban dari knowledge base)

Pencarian vektor + sintesis jawaban AI atas knowledge base merchant. Scope `rag:read`. Bila provider embedding tidak tersedia, otomatis beralih ke pencarian kata kunci (field `used_fallback` = true).

Body (wajib)

FieldWajibTipeDeskripsi
queryYastring-
top_kTidakinteger-
contoh-body.json
{
  "query": "<teks>",
  "top_k": 0
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/rag/query" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "<teks>", "top_k": 0 }'

Respons

StatusDeskripsi
200Jawaban + hasil pencarian
POST/all-in-one/notify/sendApiKeyAuth

Kirim notifikasi multi-kanal

Scope `notify:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
template_typeYastring-
contentTidakstring-
variablesTidakobject-
contoh-body.json
{
  "phone": "6281234567890",
  "template_type": "<teks>",
  "content": "<teks>",
  "variables": {}
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/notify/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "template_type": "<teks>", "content": "<teks>", "variables": {} }'

Respons

StatusDeskripsi
200Notifikasi terkirim
POST/all-in-one/messages/sendApiKeyAuth

Kirim pesan WhatsApp ke satu nomor

Scope `messages:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
contentTidakstring-
media_urlTidakstring-
contoh-body.json
{
  "phone": "6281234567890",
  "content": "<teks>",
  "media_url": "https://contoh.id"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/messages/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "content": "<teks>", "media_url": "https://contoh.id" }'

Respons

StatusDeskripsi
200Pesan terkirim
422Nomor / konten tidak valid
POST/all-in-one/webhookApiKeyAuth

Terima event webhook masuk (dua arah)

Menyimpan event ke inbox tenant. Scope `webhook:receive`.

Body (opsional)

FieldWajibTipeDeskripsi
eventTidakstring-
dataTidakobject-
contoh-body.json
{
  "event": "<teks>",
  "data": {}
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/webhook" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "event": "<teks>", "data": {} }'

Respons

StatusDeskripsi
202Event diterima
GET/all-in-one/wa/instancesApiKeyAuth

Daftar instance WhatsApp

Menampilkan nomor WhatsApp milik tenant beserta status koneksinya (id, instance_name, phone_number, connection_status, connection_type, service_role, dsb). Scope `wa:manage`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/wa/instances" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar instance WhatsApp
POST/all-in-one/wa/instancesApiKeyAuth

Tambah nomor WhatsApp baru

Membuat sesi WhatsApp baru di gateway lalu menyimpannya. Scope `wa:manage`. Rate-limited (SensitiveLimit). Untuk tenant dengan scope cabang, `branch_id` wajib diisi.

Body (wajib)

FieldWajibTipeDeskripsi
instance_nameYastring-
connection_typeTidakstring-
service_roleTidakstring-
branch_idTidakstring (uuid)Wajib bila tenant memakai scope cabang
contoh-body.json
{
  "instance_name": "Contoh Nama",
  "connection_type": "unofficial",
  "service_role": "<teks>",
  "branch_id": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/wa/instances" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "instance_name": "Contoh Nama", "connection_type": "unofficial", "service_role": "<teks>", "branch_id": "<teks>" }'

Respons

StatusDeskripsi
201Instance dibuat (menyertakan qr_code bila unofficial)
400Nama instance tidak valid
403Kuota nomor WA tercapai atau plan tidak mengizinkan
409Nama instance sudah dipakai
GET/all-in-one/wa/instances/{id}/qrApiKeyAuth

Ambil kode QR untuk scan

Mengembalikan QR live (data URL base64) untuk memindai nomor. Bila perangkat sudah tersambung, balasan berisi connected=true tanpa QR. Scope `wa:manage`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}/qr" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200{ qr_code, pairing_code, status, ... }
404Instance tidak ditemukan
POST/all-in-one/wa/instances/{id}/restartApiKeyAuth

Restart koneksi sesi WhatsApp

Scope `wa:manage`. Rate-limited (SensitiveLimit).

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}/restart" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Sesi WhatsApp direstart
404Instance tidak ditemukan
DELETE/all-in-one/wa/instances/{id}ApiKeyAuth

Hapus instance WhatsApp

Memutus dan menghapus instance. Scope `wa:manage`. Rate-limited (SensitiveLimit).

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
purge_modequeryTidakstring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Instance WhatsApp dihapus
404Instance tidak ditemukan
GET/all-in-one/billing/balanceApiKeyAuth

Lihat saldo token

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/balance" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Saldo token & ringkasan
GET/all-in-one/billing/transactionsApiKeyAuth

Riwayat transaksi token

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/transactions" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar transaksi
GET/all-in-one/billing/invoicesApiKeyAuth

Daftar invoice

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/invoices" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar invoice
POST/all-in-one/billing/topupApiKeyAuth

Topup saldo (membuat invoice pembayaran)

Membuat invoice top-up saldo token lewat payment gateway. Saldo bertambah setelah pembayaran terkonfirmasi (webhook gateway). Scope `billing:create`. Wajib header `Idempotency-Key`.

Parameter

NamaLokasiWajibTipeDeskripsi
Idempotency-KeyheaderYastring-

Body (wajib)

FieldWajibTipeDeskripsi
amountYanumber-
payment_gatewayTidakstring-
contoh-body.json
{
  "amount": 0,
  "payment_gateway": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/billing/topup" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 0, "payment_gateway": "<teks>" }'

Respons

StatusDeskripsi
201Invoice topup dibuat + info pembayaran
422Nominal tidak valid
GET/all-in-one/productsApiKeyAuth

Daftar produk

Scope `products:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/products" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar produk
POST/all-in-one/productsApiKeyAuth

Buat produk

Scope `products:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/products" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Produk dibuat
PUT/all-in-one/products/{id}ApiKeyAuth

Ubah produk

Scope `products:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/products/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Produk diperbarui
DELETE/all-in-one/products/{id}ApiKeyAuth

Hapus produk

Scope `products:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/products/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Produk dihapus
GET/all-in-one/ordersApiKeyAuth

Daftar pesanan

Scope `orders:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/orders" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pesanan
POST/all-in-one/ordersApiKeyAuth

Buat pesanan

Scope `orders:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/orders" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Pesanan dibuat
GET/all-in-one/orders/{id}ApiKeyAuth

Detail pesanan

Scope `orders:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/orders/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail pesanan
PUT/all-in-one/orders/{id}/statusApiKeyAuth

Ubah status pesanan

Scope `orders:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/orders/{id}/status" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Status diperbarui
GET/all-in-one/customersApiKeyAuth

Daftar pelanggan

Scope `customers:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/customers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pelanggan
GET/all-in-one/customers/{id}ApiKeyAuth

Detail pelanggan

Scope `customers:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/customers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail pelanggan
PUT/all-in-one/customers/{id}ApiKeyAuth

Ubah pelanggan

Scope `customers:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/customers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Pelanggan diperbarui
GET/all-in-one/vouchersApiKeyAuth

Daftar voucher

Scope `vouchers:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/vouchers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar voucher
POST/all-in-one/vouchersApiKeyAuth

Buat voucher

Scope `vouchers:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/vouchers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Voucher dibuat
POST/all-in-one/vouchers/validateApiKeyAuth

Validasi voucher

Scope `vouchers:read`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/vouchers/validate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Hasil validasi
GET/all-in-one/vouchers/{id}ApiKeyAuth

Detail voucher

Scope `vouchers:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail voucher
PUT/all-in-one/vouchers/{id}ApiKeyAuth

Ubah voucher

Scope `vouchers:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Voucher diperbarui
DELETE/all-in-one/vouchers/{id}ApiKeyAuth

Hapus voucher

Scope `vouchers:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Voucher dihapus
GET/all-in-one/servicesApiKeyAuth

Daftar layanan (service catalog)

Scope `services:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/services" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar layanan
POST/all-in-one/servicesApiKeyAuth

Buat layanan

Scope `services:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/services" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Layanan dibuat
PUT/all-in-one/services/{id}ApiKeyAuth

Ubah layanan

Scope `services:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/services/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Layanan diperbarui
DELETE/all-in-one/services/{id}ApiKeyAuth

Hapus layanan

Scope `services:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/services/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Layanan dihapus
GET/all-in-one/bookingsApiKeyAuth

Daftar booking

Scope `bookings:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/bookings" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar booking
GET/all-in-one/bookings/{id}ApiKeyAuth

Detail booking

Scope `bookings:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail booking
PUT/all-in-one/bookings/{id}/statusApiKeyAuth

Ubah status booking

Scope `bookings:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}/status" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Status booking diperbarui
PUT/all-in-one/bookings/{id}/cancelApiKeyAuth

Batalkan booking

Scope `bookings:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}/cancel" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Booking dibatalkan
GET/all-in-one/conversationsApiKeyAuth

Daftar percakapan (inbox)

Scope `conversations:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar percakapan
GET/all-in-one/conversations/{id}ApiKeyAuth

Detail percakapan

Scope `conversations:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail percakapan
GET/all-in-one/conversations/{id}/messagesApiKeyAuth

Pesan dalam percakapan

Scope `conversations:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}/messages" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pesan
POST/all-in-one/conversations/{id}/replyApiKeyAuth

Balas percakapan

Scope `conversations:create` atau `conversations:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-

Body (wajib)

FieldWajibTipeDeskripsi
contentTidakstring-
media_urlTidakstring-
contoh-body.json
{
  "content": "<teks>",
  "media_url": "https://contoh.id"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}/reply" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "content": "<teks>", "media_url": "https://contoh.id" }'

Respons

StatusDeskripsi
200Balasan terkirim
POST/all-in-one/article-gen/generateApiKeyAuth

Buat antrian generate artikel AI

Scope `article_gen`. Menerima project_id atau daftar keywords langsung untuk generate artikel SEO otomatis.

Body (wajib)

FieldWajibTipeDeskripsi
project_idTidakstring-
keywordsTidakstring[]-
toneTidakstring-
categoryTidakstring-
webhook_urlTidakstring-
webhook_secretTidakstring-
company_contextTidakstring-
contoh-body.json
{
  "project_id": "<teks>",
  "keywords": [],
  "tone": "<teks>",
  "category": "<teks>",
  "webhook_url": "https://contoh.id",
  "webhook_secret": "<teks>",
  "company_context": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/article-gen/generate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "project_id": "<teks>", "keywords": [], "tone": "<teks>", "category": "<teks>", "webhook_url": "https://contoh.id", "webhook_secret": "<teks>", "company_context": "<teks>" }'

Respons

StatusDeskripsi
202Batch generate diterima
GET/all-in-one/article-gen/batches/{id}ApiKeyAuth

Status dan progres antrian batch artikel

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/batches/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail status batch artikel
GET/all-in-one/article-gen/batches/{id}/articlesApiKeyAuth

Daftar artikel dalam batch

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/batches/{id}/articles" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar artikel dalam batch
GET/all-in-one/article-gen/articles/{id}ApiKeyAuth

Detail artikel hasil generate

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/articles/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail lengkap artikel
POST/all-in-one/article-gen/estimateApiKeyAuth

Estimasi biaya dan kuota artikel

Scope `article_gen`.

Body (wajib)

FieldWajibTipeDeskripsi
keyword_idsYastring[]-
contoh-body.json
{
  "keyword_ids": []
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/article-gen/estimate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "keyword_ids": [] }'

Respons

StatusDeskripsi
200Estimasi kuota gratis dan biaya IDR
bash
curl -X GET "https://dagangbot.web.id/api/v1/all-in-one/billing/balance" \
  -H "X-API-Key: dgb_all_ContohKunciRahasiaAnda123"

Langkah 3: Kasus Penggunaan 3 — Membuat Pesanan Transaksional Baru

Menyuntikkan pemesanan dari eksternal:

GET/all-in-one/accountApiKeyAuth

Baca detail akun merchant

Identitas, langganan, saldo token, statistik. Scope `account:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/account" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail akun
GET/all-in-one/mediaApiKeyAuth

Daftar media library tenant

Daftar aset (foto produk, media katalog WA, lampiran bukti bayar). Read-only. Scope `media:read`. Query `module`, `file_type`, `page`, `per_page` (maks 100).

Parameter

NamaLokasiWajibTipeDeskripsi
modulequeryTidakstring-
file_typequeryTidakstring-
pagequeryTidakinteger-
per_pagequeryTidakinteger-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/media" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar aset beserta meta paginasi
403Key tidak punya scope media:read (key lama perlu migrasi 000341)
POST/all-in-one/otp/sendApiKeyAuth

Kirim OTP

Scope `otp:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
contoh-body.json
{
  "phone": "6281234567890"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/otp/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890" }'

Respons

StatusDeskripsi
200OTP terkirim
POST/all-in-one/otp/verifyApiKeyAuth

Verifikasi OTP

Scope `otp:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
otp_codeYastring-
contoh-body.json
{
  "phone": "6281234567890",
  "otp_code": "123456"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/otp/verify" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "otp_code": "123456" }'

Respons

StatusDeskripsi
200OTP tervalidasi
POST/all-in-one/rag/queryApiKeyAuth

Query RAG (jawaban dari knowledge base)

Pencarian vektor + sintesis jawaban AI atas knowledge base merchant. Scope `rag:read`. Bila provider embedding tidak tersedia, otomatis beralih ke pencarian kata kunci (field `used_fallback` = true).

Body (wajib)

FieldWajibTipeDeskripsi
queryYastring-
top_kTidakinteger-
contoh-body.json
{
  "query": "<teks>",
  "top_k": 0
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/rag/query" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "<teks>", "top_k": 0 }'

Respons

StatusDeskripsi
200Jawaban + hasil pencarian
POST/all-in-one/notify/sendApiKeyAuth

Kirim notifikasi multi-kanal

Scope `notify:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
template_typeYastring-
contentTidakstring-
variablesTidakobject-
contoh-body.json
{
  "phone": "6281234567890",
  "template_type": "<teks>",
  "content": "<teks>",
  "variables": {}
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/notify/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "template_type": "<teks>", "content": "<teks>", "variables": {} }'

Respons

StatusDeskripsi
200Notifikasi terkirim
POST/all-in-one/messages/sendApiKeyAuth

Kirim pesan WhatsApp ke satu nomor

Scope `messages:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
contentTidakstring-
media_urlTidakstring-
contoh-body.json
{
  "phone": "6281234567890",
  "content": "<teks>",
  "media_url": "https://contoh.id"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/messages/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "content": "<teks>", "media_url": "https://contoh.id" }'

Respons

StatusDeskripsi
200Pesan terkirim
422Nomor / konten tidak valid
POST/all-in-one/webhookApiKeyAuth

Terima event webhook masuk (dua arah)

Menyimpan event ke inbox tenant. Scope `webhook:receive`.

Body (opsional)

FieldWajibTipeDeskripsi
eventTidakstring-
dataTidakobject-
contoh-body.json
{
  "event": "<teks>",
  "data": {}
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/webhook" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "event": "<teks>", "data": {} }'

Respons

StatusDeskripsi
202Event diterima
GET/all-in-one/wa/instancesApiKeyAuth

Daftar instance WhatsApp

Menampilkan nomor WhatsApp milik tenant beserta status koneksinya (id, instance_name, phone_number, connection_status, connection_type, service_role, dsb). Scope `wa:manage`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/wa/instances" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar instance WhatsApp
POST/all-in-one/wa/instancesApiKeyAuth

Tambah nomor WhatsApp baru

Membuat sesi WhatsApp baru di gateway lalu menyimpannya. Scope `wa:manage`. Rate-limited (SensitiveLimit). Untuk tenant dengan scope cabang, `branch_id` wajib diisi.

Body (wajib)

FieldWajibTipeDeskripsi
instance_nameYastring-
connection_typeTidakstring-
service_roleTidakstring-
branch_idTidakstring (uuid)Wajib bila tenant memakai scope cabang
contoh-body.json
{
  "instance_name": "Contoh Nama",
  "connection_type": "unofficial",
  "service_role": "<teks>",
  "branch_id": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/wa/instances" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "instance_name": "Contoh Nama", "connection_type": "unofficial", "service_role": "<teks>", "branch_id": "<teks>" }'

Respons

StatusDeskripsi
201Instance dibuat (menyertakan qr_code bila unofficial)
400Nama instance tidak valid
403Kuota nomor WA tercapai atau plan tidak mengizinkan
409Nama instance sudah dipakai
GET/all-in-one/wa/instances/{id}/qrApiKeyAuth

Ambil kode QR untuk scan

Mengembalikan QR live (data URL base64) untuk memindai nomor. Bila perangkat sudah tersambung, balasan berisi connected=true tanpa QR. Scope `wa:manage`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}/qr" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200{ qr_code, pairing_code, status, ... }
404Instance tidak ditemukan
POST/all-in-one/wa/instances/{id}/restartApiKeyAuth

Restart koneksi sesi WhatsApp

Scope `wa:manage`. Rate-limited (SensitiveLimit).

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}/restart" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Sesi WhatsApp direstart
404Instance tidak ditemukan
DELETE/all-in-one/wa/instances/{id}ApiKeyAuth

Hapus instance WhatsApp

Memutus dan menghapus instance. Scope `wa:manage`. Rate-limited (SensitiveLimit).

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
purge_modequeryTidakstring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Instance WhatsApp dihapus
404Instance tidak ditemukan
GET/all-in-one/billing/balanceApiKeyAuth

Lihat saldo token

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/balance" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Saldo token & ringkasan
GET/all-in-one/billing/transactionsApiKeyAuth

Riwayat transaksi token

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/transactions" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar transaksi
GET/all-in-one/billing/invoicesApiKeyAuth

Daftar invoice

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/invoices" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar invoice
POST/all-in-one/billing/topupApiKeyAuth

Topup saldo (membuat invoice pembayaran)

Membuat invoice top-up saldo token lewat payment gateway. Saldo bertambah setelah pembayaran terkonfirmasi (webhook gateway). Scope `billing:create`. Wajib header `Idempotency-Key`.

Parameter

NamaLokasiWajibTipeDeskripsi
Idempotency-KeyheaderYastring-

Body (wajib)

FieldWajibTipeDeskripsi
amountYanumber-
payment_gatewayTidakstring-
contoh-body.json
{
  "amount": 0,
  "payment_gateway": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/billing/topup" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 0, "payment_gateway": "<teks>" }'

Respons

StatusDeskripsi
201Invoice topup dibuat + info pembayaran
422Nominal tidak valid
GET/all-in-one/productsApiKeyAuth

Daftar produk

Scope `products:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/products" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar produk
POST/all-in-one/productsApiKeyAuth

Buat produk

Scope `products:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/products" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Produk dibuat
PUT/all-in-one/products/{id}ApiKeyAuth

Ubah produk

Scope `products:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/products/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Produk diperbarui
DELETE/all-in-one/products/{id}ApiKeyAuth

Hapus produk

Scope `products:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/products/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Produk dihapus
GET/all-in-one/ordersApiKeyAuth

Daftar pesanan

Scope `orders:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/orders" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pesanan
POST/all-in-one/ordersApiKeyAuth

Buat pesanan

Scope `orders:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/orders" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Pesanan dibuat
GET/all-in-one/orders/{id}ApiKeyAuth

Detail pesanan

Scope `orders:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/orders/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail pesanan
PUT/all-in-one/orders/{id}/statusApiKeyAuth

Ubah status pesanan

Scope `orders:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/orders/{id}/status" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Status diperbarui
GET/all-in-one/customersApiKeyAuth

Daftar pelanggan

Scope `customers:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/customers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pelanggan
GET/all-in-one/customers/{id}ApiKeyAuth

Detail pelanggan

Scope `customers:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/customers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail pelanggan
PUT/all-in-one/customers/{id}ApiKeyAuth

Ubah pelanggan

Scope `customers:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/customers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Pelanggan diperbarui
GET/all-in-one/vouchersApiKeyAuth

Daftar voucher

Scope `vouchers:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/vouchers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar voucher
POST/all-in-one/vouchersApiKeyAuth

Buat voucher

Scope `vouchers:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/vouchers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Voucher dibuat
POST/all-in-one/vouchers/validateApiKeyAuth

Validasi voucher

Scope `vouchers:read`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/vouchers/validate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Hasil validasi
GET/all-in-one/vouchers/{id}ApiKeyAuth

Detail voucher

Scope `vouchers:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail voucher
PUT/all-in-one/vouchers/{id}ApiKeyAuth

Ubah voucher

Scope `vouchers:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Voucher diperbarui
DELETE/all-in-one/vouchers/{id}ApiKeyAuth

Hapus voucher

Scope `vouchers:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Voucher dihapus
GET/all-in-one/servicesApiKeyAuth

Daftar layanan (service catalog)

Scope `services:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/services" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar layanan
POST/all-in-one/servicesApiKeyAuth

Buat layanan

Scope `services:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/services" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Layanan dibuat
PUT/all-in-one/services/{id}ApiKeyAuth

Ubah layanan

Scope `services:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/services/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Layanan diperbarui
DELETE/all-in-one/services/{id}ApiKeyAuth

Hapus layanan

Scope `services:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/services/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Layanan dihapus
GET/all-in-one/bookingsApiKeyAuth

Daftar booking

Scope `bookings:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/bookings" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar booking
GET/all-in-one/bookings/{id}ApiKeyAuth

Detail booking

Scope `bookings:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail booking
PUT/all-in-one/bookings/{id}/statusApiKeyAuth

Ubah status booking

Scope `bookings:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}/status" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Status booking diperbarui
PUT/all-in-one/bookings/{id}/cancelApiKeyAuth

Batalkan booking

Scope `bookings:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}/cancel" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Booking dibatalkan
GET/all-in-one/conversationsApiKeyAuth

Daftar percakapan (inbox)

Scope `conversations:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar percakapan
GET/all-in-one/conversations/{id}ApiKeyAuth

Detail percakapan

Scope `conversations:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail percakapan
GET/all-in-one/conversations/{id}/messagesApiKeyAuth

Pesan dalam percakapan

Scope `conversations:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}/messages" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pesan
POST/all-in-one/conversations/{id}/replyApiKeyAuth

Balas percakapan

Scope `conversations:create` atau `conversations:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-

Body (wajib)

FieldWajibTipeDeskripsi
contentTidakstring-
media_urlTidakstring-
contoh-body.json
{
  "content": "<teks>",
  "media_url": "https://contoh.id"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}/reply" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "content": "<teks>", "media_url": "https://contoh.id" }'

Respons

StatusDeskripsi
200Balasan terkirim
POST/all-in-one/article-gen/generateApiKeyAuth

Buat antrian generate artikel AI

Scope `article_gen`. Menerima project_id atau daftar keywords langsung untuk generate artikel SEO otomatis.

Body (wajib)

FieldWajibTipeDeskripsi
project_idTidakstring-
keywordsTidakstring[]-
toneTidakstring-
categoryTidakstring-
webhook_urlTidakstring-
webhook_secretTidakstring-
company_contextTidakstring-
contoh-body.json
{
  "project_id": "<teks>",
  "keywords": [],
  "tone": "<teks>",
  "category": "<teks>",
  "webhook_url": "https://contoh.id",
  "webhook_secret": "<teks>",
  "company_context": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/article-gen/generate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "project_id": "<teks>", "keywords": [], "tone": "<teks>", "category": "<teks>", "webhook_url": "https://contoh.id", "webhook_secret": "<teks>", "company_context": "<teks>" }'

Respons

StatusDeskripsi
202Batch generate diterima
GET/all-in-one/article-gen/batches/{id}ApiKeyAuth

Status dan progres antrian batch artikel

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/batches/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail status batch artikel
GET/all-in-one/article-gen/batches/{id}/articlesApiKeyAuth

Daftar artikel dalam batch

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/batches/{id}/articles" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar artikel dalam batch
GET/all-in-one/article-gen/articles/{id}ApiKeyAuth

Detail artikel hasil generate

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/articles/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail lengkap artikel
POST/all-in-one/article-gen/estimateApiKeyAuth

Estimasi biaya dan kuota artikel

Scope `article_gen`.

Body (wajib)

FieldWajibTipeDeskripsi
keyword_idsYastring[]-
contoh-body.json
{
  "keyword_ids": []
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/article-gen/estimate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "keyword_ids": [] }'

Respons

StatusDeskripsi
200Estimasi kuota gratis dan biaya IDR
bash
curl -X POST "https://dagangbot.web.id/api/v1/all-in-one/orders" \
  -H "X-API-Key: dgb_all_ContohKunciRahasiaAnda123" \
  -H "Idempotency-Key: ext_order_sync_1001" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "cust_88a912bb",
    "items": [
      { "product_id": "prod_55bb91", "quantity": 2 }
    ],
    "payment_status": "paid"
  }'

Langkah 6: Kasus Penggunaan 5 — Sinkronisasi Inventaris Produk (Stok Gudang)

Katalog produk seringkali dikelola dari sistem eksternal ERP (Enterprise Resource Planning). Rute PUT /all-in-one/products/{id} sangat krusial untuk sinkronisasi inventaris harian.

GET/all-in-one/accountApiKeyAuth

Baca detail akun merchant

Identitas, langganan, saldo token, statistik. Scope `account:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/account" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail akun
GET/all-in-one/mediaApiKeyAuth

Daftar media library tenant

Daftar aset (foto produk, media katalog WA, lampiran bukti bayar). Read-only. Scope `media:read`. Query `module`, `file_type`, `page`, `per_page` (maks 100).

Parameter

NamaLokasiWajibTipeDeskripsi
modulequeryTidakstring-
file_typequeryTidakstring-
pagequeryTidakinteger-
per_pagequeryTidakinteger-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/media" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar aset beserta meta paginasi
403Key tidak punya scope media:read (key lama perlu migrasi 000341)
POST/all-in-one/otp/sendApiKeyAuth

Kirim OTP

Scope `otp:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
contoh-body.json
{
  "phone": "6281234567890"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/otp/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890" }'

Respons

StatusDeskripsi
200OTP terkirim
POST/all-in-one/otp/verifyApiKeyAuth

Verifikasi OTP

Scope `otp:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
otp_codeYastring-
contoh-body.json
{
  "phone": "6281234567890",
  "otp_code": "123456"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/otp/verify" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "otp_code": "123456" }'

Respons

StatusDeskripsi
200OTP tervalidasi
POST/all-in-one/rag/queryApiKeyAuth

Query RAG (jawaban dari knowledge base)

Pencarian vektor + sintesis jawaban AI atas knowledge base merchant. Scope `rag:read`. Bila provider embedding tidak tersedia, otomatis beralih ke pencarian kata kunci (field `used_fallback` = true).

Body (wajib)

FieldWajibTipeDeskripsi
queryYastring-
top_kTidakinteger-
contoh-body.json
{
  "query": "<teks>",
  "top_k": 0
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/rag/query" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "<teks>", "top_k": 0 }'

Respons

StatusDeskripsi
200Jawaban + hasil pencarian
POST/all-in-one/notify/sendApiKeyAuth

Kirim notifikasi multi-kanal

Scope `notify:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
template_typeYastring-
contentTidakstring-
variablesTidakobject-
contoh-body.json
{
  "phone": "6281234567890",
  "template_type": "<teks>",
  "content": "<teks>",
  "variables": {}
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/notify/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "template_type": "<teks>", "content": "<teks>", "variables": {} }'

Respons

StatusDeskripsi
200Notifikasi terkirim
POST/all-in-one/messages/sendApiKeyAuth

Kirim pesan WhatsApp ke satu nomor

Scope `messages:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
contentTidakstring-
media_urlTidakstring-
contoh-body.json
{
  "phone": "6281234567890",
  "content": "<teks>",
  "media_url": "https://contoh.id"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/messages/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "content": "<teks>", "media_url": "https://contoh.id" }'

Respons

StatusDeskripsi
200Pesan terkirim
422Nomor / konten tidak valid
POST/all-in-one/webhookApiKeyAuth

Terima event webhook masuk (dua arah)

Menyimpan event ke inbox tenant. Scope `webhook:receive`.

Body (opsional)

FieldWajibTipeDeskripsi
eventTidakstring-
dataTidakobject-
contoh-body.json
{
  "event": "<teks>",
  "data": {}
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/webhook" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "event": "<teks>", "data": {} }'

Respons

StatusDeskripsi
202Event diterima
GET/all-in-one/wa/instancesApiKeyAuth

Daftar instance WhatsApp

Menampilkan nomor WhatsApp milik tenant beserta status koneksinya (id, instance_name, phone_number, connection_status, connection_type, service_role, dsb). Scope `wa:manage`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/wa/instances" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar instance WhatsApp
POST/all-in-one/wa/instancesApiKeyAuth

Tambah nomor WhatsApp baru

Membuat sesi WhatsApp baru di gateway lalu menyimpannya. Scope `wa:manage`. Rate-limited (SensitiveLimit). Untuk tenant dengan scope cabang, `branch_id` wajib diisi.

Body (wajib)

FieldWajibTipeDeskripsi
instance_nameYastring-
connection_typeTidakstring-
service_roleTidakstring-
branch_idTidakstring (uuid)Wajib bila tenant memakai scope cabang
contoh-body.json
{
  "instance_name": "Contoh Nama",
  "connection_type": "unofficial",
  "service_role": "<teks>",
  "branch_id": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/wa/instances" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "instance_name": "Contoh Nama", "connection_type": "unofficial", "service_role": "<teks>", "branch_id": "<teks>" }'

Respons

StatusDeskripsi
201Instance dibuat (menyertakan qr_code bila unofficial)
400Nama instance tidak valid
403Kuota nomor WA tercapai atau plan tidak mengizinkan
409Nama instance sudah dipakai
GET/all-in-one/wa/instances/{id}/qrApiKeyAuth

Ambil kode QR untuk scan

Mengembalikan QR live (data URL base64) untuk memindai nomor. Bila perangkat sudah tersambung, balasan berisi connected=true tanpa QR. Scope `wa:manage`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}/qr" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200{ qr_code, pairing_code, status, ... }
404Instance tidak ditemukan
POST/all-in-one/wa/instances/{id}/restartApiKeyAuth

Restart koneksi sesi WhatsApp

Scope `wa:manage`. Rate-limited (SensitiveLimit).

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}/restart" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Sesi WhatsApp direstart
404Instance tidak ditemukan
DELETE/all-in-one/wa/instances/{id}ApiKeyAuth

Hapus instance WhatsApp

Memutus dan menghapus instance. Scope `wa:manage`. Rate-limited (SensitiveLimit).

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
purge_modequeryTidakstring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Instance WhatsApp dihapus
404Instance tidak ditemukan
GET/all-in-one/billing/balanceApiKeyAuth

Lihat saldo token

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/balance" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Saldo token & ringkasan
GET/all-in-one/billing/transactionsApiKeyAuth

Riwayat transaksi token

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/transactions" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar transaksi
GET/all-in-one/billing/invoicesApiKeyAuth

Daftar invoice

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/invoices" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar invoice
POST/all-in-one/billing/topupApiKeyAuth

Topup saldo (membuat invoice pembayaran)

Membuat invoice top-up saldo token lewat payment gateway. Saldo bertambah setelah pembayaran terkonfirmasi (webhook gateway). Scope `billing:create`. Wajib header `Idempotency-Key`.

Parameter

NamaLokasiWajibTipeDeskripsi
Idempotency-KeyheaderYastring-

Body (wajib)

FieldWajibTipeDeskripsi
amountYanumber-
payment_gatewayTidakstring-
contoh-body.json
{
  "amount": 0,
  "payment_gateway": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/billing/topup" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 0, "payment_gateway": "<teks>" }'

Respons

StatusDeskripsi
201Invoice topup dibuat + info pembayaran
422Nominal tidak valid
GET/all-in-one/productsApiKeyAuth

Daftar produk

Scope `products:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/products" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar produk
POST/all-in-one/productsApiKeyAuth

Buat produk

Scope `products:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/products" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Produk dibuat
PUT/all-in-one/products/{id}ApiKeyAuth

Ubah produk

Scope `products:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/products/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Produk diperbarui
DELETE/all-in-one/products/{id}ApiKeyAuth

Hapus produk

Scope `products:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/products/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Produk dihapus
GET/all-in-one/ordersApiKeyAuth

Daftar pesanan

Scope `orders:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/orders" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pesanan
POST/all-in-one/ordersApiKeyAuth

Buat pesanan

Scope `orders:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/orders" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Pesanan dibuat
GET/all-in-one/orders/{id}ApiKeyAuth

Detail pesanan

Scope `orders:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/orders/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail pesanan
PUT/all-in-one/orders/{id}/statusApiKeyAuth

Ubah status pesanan

Scope `orders:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/orders/{id}/status" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Status diperbarui
GET/all-in-one/customersApiKeyAuth

Daftar pelanggan

Scope `customers:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/customers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pelanggan
GET/all-in-one/customers/{id}ApiKeyAuth

Detail pelanggan

Scope `customers:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/customers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail pelanggan
PUT/all-in-one/customers/{id}ApiKeyAuth

Ubah pelanggan

Scope `customers:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/customers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Pelanggan diperbarui
GET/all-in-one/vouchersApiKeyAuth

Daftar voucher

Scope `vouchers:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/vouchers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar voucher
POST/all-in-one/vouchersApiKeyAuth

Buat voucher

Scope `vouchers:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/vouchers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Voucher dibuat
POST/all-in-one/vouchers/validateApiKeyAuth

Validasi voucher

Scope `vouchers:read`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/vouchers/validate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Hasil validasi
GET/all-in-one/vouchers/{id}ApiKeyAuth

Detail voucher

Scope `vouchers:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail voucher
PUT/all-in-one/vouchers/{id}ApiKeyAuth

Ubah voucher

Scope `vouchers:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Voucher diperbarui
DELETE/all-in-one/vouchers/{id}ApiKeyAuth

Hapus voucher

Scope `vouchers:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Voucher dihapus
GET/all-in-one/servicesApiKeyAuth

Daftar layanan (service catalog)

Scope `services:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/services" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar layanan
POST/all-in-one/servicesApiKeyAuth

Buat layanan

Scope `services:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/services" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Layanan dibuat
PUT/all-in-one/services/{id}ApiKeyAuth

Ubah layanan

Scope `services:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/services/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Layanan diperbarui
DELETE/all-in-one/services/{id}ApiKeyAuth

Hapus layanan

Scope `services:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/services/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Layanan dihapus
GET/all-in-one/bookingsApiKeyAuth

Daftar booking

Scope `bookings:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/bookings" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar booking
GET/all-in-one/bookings/{id}ApiKeyAuth

Detail booking

Scope `bookings:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail booking
PUT/all-in-one/bookings/{id}/statusApiKeyAuth

Ubah status booking

Scope `bookings:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}/status" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Status booking diperbarui
PUT/all-in-one/bookings/{id}/cancelApiKeyAuth

Batalkan booking

Scope `bookings:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}/cancel" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Booking dibatalkan
GET/all-in-one/conversationsApiKeyAuth

Daftar percakapan (inbox)

Scope `conversations:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar percakapan
GET/all-in-one/conversations/{id}ApiKeyAuth

Detail percakapan

Scope `conversations:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail percakapan
GET/all-in-one/conversations/{id}/messagesApiKeyAuth

Pesan dalam percakapan

Scope `conversations:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}/messages" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pesan
POST/all-in-one/conversations/{id}/replyApiKeyAuth

Balas percakapan

Scope `conversations:create` atau `conversations:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-

Body (wajib)

FieldWajibTipeDeskripsi
contentTidakstring-
media_urlTidakstring-
contoh-body.json
{
  "content": "<teks>",
  "media_url": "https://contoh.id"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}/reply" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "content": "<teks>", "media_url": "https://contoh.id" }'

Respons

StatusDeskripsi
200Balasan terkirim
POST/all-in-one/article-gen/generateApiKeyAuth

Buat antrian generate artikel AI

Scope `article_gen`. Menerima project_id atau daftar keywords langsung untuk generate artikel SEO otomatis.

Body (wajib)

FieldWajibTipeDeskripsi
project_idTidakstring-
keywordsTidakstring[]-
toneTidakstring-
categoryTidakstring-
webhook_urlTidakstring-
webhook_secretTidakstring-
company_contextTidakstring-
contoh-body.json
{
  "project_id": "<teks>",
  "keywords": [],
  "tone": "<teks>",
  "category": "<teks>",
  "webhook_url": "https://contoh.id",
  "webhook_secret": "<teks>",
  "company_context": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/article-gen/generate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "project_id": "<teks>", "keywords": [], "tone": "<teks>", "category": "<teks>", "webhook_url": "https://contoh.id", "webhook_secret": "<teks>", "company_context": "<teks>" }'

Respons

StatusDeskripsi
202Batch generate diterima
GET/all-in-one/article-gen/batches/{id}ApiKeyAuth

Status dan progres antrian batch artikel

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/batches/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail status batch artikel
GET/all-in-one/article-gen/batches/{id}/articlesApiKeyAuth

Daftar artikel dalam batch

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/batches/{id}/articles" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar artikel dalam batch
GET/all-in-one/article-gen/articles/{id}ApiKeyAuth

Detail artikel hasil generate

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/articles/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail lengkap artikel
POST/all-in-one/article-gen/estimateApiKeyAuth

Estimasi biaya dan kuota artikel

Scope `article_gen`.

Body (wajib)

FieldWajibTipeDeskripsi
keyword_idsYastring[]-
contoh-body.json
{
  "keyword_ids": []
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/article-gen/estimate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "keyword_ids": [] }'

Respons

StatusDeskripsi
200Estimasi kuota gratis dan biaya IDR
bash
curl -X PUT "https://dagangbot.web.id/api/v1/all-in-one/products/prod_102a98f" \
  -H "X-API-Key: dgb_all_ContohKunciRahasiaAnda123" \
  -H "Content-Type: application/json" \
  -d '{
    "stock_available": 14,
    "price": 250000,
    "status": "published",
    "name": "Sepatu Lari Maraton Pro"
  }'

Respons Sukses (200 OK):

json
{
  "status": "success",
  "data": {
    "product_id": "prod_102a98f",
    "updated_at": "2026-10-08T15:00:10Z"
  }
}

Langkah 7: Kasus Penggunaan 6 — Inisiasi Kueri Basis Pengetahuan (RAG AI)

Untuk memanfaatkan kecerdasan buatan berbasis Retrieval-Augmented Generation (RAG) platform ini langsung dari portal aplikasi web milik Anda (di luar WhatsApp), panggil fungsi query RAG secara langsung. Fungsi ini memadukan kemampuan dasar Large Language Model (LLM) dengan data referensi katalog toko Anda sendiri.

GET/all-in-one/accountApiKeyAuth

Baca detail akun merchant

Identitas, langganan, saldo token, statistik. Scope `account:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/account" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail akun
GET/all-in-one/mediaApiKeyAuth

Daftar media library tenant

Daftar aset (foto produk, media katalog WA, lampiran bukti bayar). Read-only. Scope `media:read`. Query `module`, `file_type`, `page`, `per_page` (maks 100).

Parameter

NamaLokasiWajibTipeDeskripsi
modulequeryTidakstring-
file_typequeryTidakstring-
pagequeryTidakinteger-
per_pagequeryTidakinteger-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/media" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar aset beserta meta paginasi
403Key tidak punya scope media:read (key lama perlu migrasi 000341)
POST/all-in-one/otp/sendApiKeyAuth

Kirim OTP

Scope `otp:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
contoh-body.json
{
  "phone": "6281234567890"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/otp/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890" }'

Respons

StatusDeskripsi
200OTP terkirim
POST/all-in-one/otp/verifyApiKeyAuth

Verifikasi OTP

Scope `otp:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
otp_codeYastring-
contoh-body.json
{
  "phone": "6281234567890",
  "otp_code": "123456"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/otp/verify" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "otp_code": "123456" }'

Respons

StatusDeskripsi
200OTP tervalidasi
POST/all-in-one/rag/queryApiKeyAuth

Query RAG (jawaban dari knowledge base)

Pencarian vektor + sintesis jawaban AI atas knowledge base merchant. Scope `rag:read`. Bila provider embedding tidak tersedia, otomatis beralih ke pencarian kata kunci (field `used_fallback` = true).

Body (wajib)

FieldWajibTipeDeskripsi
queryYastring-
top_kTidakinteger-
contoh-body.json
{
  "query": "<teks>",
  "top_k": 0
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/rag/query" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "<teks>", "top_k": 0 }'

Respons

StatusDeskripsi
200Jawaban + hasil pencarian
POST/all-in-one/notify/sendApiKeyAuth

Kirim notifikasi multi-kanal

Scope `notify:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
template_typeYastring-
contentTidakstring-
variablesTidakobject-
contoh-body.json
{
  "phone": "6281234567890",
  "template_type": "<teks>",
  "content": "<teks>",
  "variables": {}
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/notify/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "template_type": "<teks>", "content": "<teks>", "variables": {} }'

Respons

StatusDeskripsi
200Notifikasi terkirim
POST/all-in-one/messages/sendApiKeyAuth

Kirim pesan WhatsApp ke satu nomor

Scope `messages:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
contentTidakstring-
media_urlTidakstring-
contoh-body.json
{
  "phone": "6281234567890",
  "content": "<teks>",
  "media_url": "https://contoh.id"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/messages/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "content": "<teks>", "media_url": "https://contoh.id" }'

Respons

StatusDeskripsi
200Pesan terkirim
422Nomor / konten tidak valid
POST/all-in-one/webhookApiKeyAuth

Terima event webhook masuk (dua arah)

Menyimpan event ke inbox tenant. Scope `webhook:receive`.

Body (opsional)

FieldWajibTipeDeskripsi
eventTidakstring-
dataTidakobject-
contoh-body.json
{
  "event": "<teks>",
  "data": {}
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/webhook" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "event": "<teks>", "data": {} }'

Respons

StatusDeskripsi
202Event diterima
GET/all-in-one/wa/instancesApiKeyAuth

Daftar instance WhatsApp

Menampilkan nomor WhatsApp milik tenant beserta status koneksinya (id, instance_name, phone_number, connection_status, connection_type, service_role, dsb). Scope `wa:manage`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/wa/instances" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar instance WhatsApp
POST/all-in-one/wa/instancesApiKeyAuth

Tambah nomor WhatsApp baru

Membuat sesi WhatsApp baru di gateway lalu menyimpannya. Scope `wa:manage`. Rate-limited (SensitiveLimit). Untuk tenant dengan scope cabang, `branch_id` wajib diisi.

Body (wajib)

FieldWajibTipeDeskripsi
instance_nameYastring-
connection_typeTidakstring-
service_roleTidakstring-
branch_idTidakstring (uuid)Wajib bila tenant memakai scope cabang
contoh-body.json
{
  "instance_name": "Contoh Nama",
  "connection_type": "unofficial",
  "service_role": "<teks>",
  "branch_id": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/wa/instances" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "instance_name": "Contoh Nama", "connection_type": "unofficial", "service_role": "<teks>", "branch_id": "<teks>" }'

Respons

StatusDeskripsi
201Instance dibuat (menyertakan qr_code bila unofficial)
400Nama instance tidak valid
403Kuota nomor WA tercapai atau plan tidak mengizinkan
409Nama instance sudah dipakai
GET/all-in-one/wa/instances/{id}/qrApiKeyAuth

Ambil kode QR untuk scan

Mengembalikan QR live (data URL base64) untuk memindai nomor. Bila perangkat sudah tersambung, balasan berisi connected=true tanpa QR. Scope `wa:manage`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}/qr" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200{ qr_code, pairing_code, status, ... }
404Instance tidak ditemukan
POST/all-in-one/wa/instances/{id}/restartApiKeyAuth

Restart koneksi sesi WhatsApp

Scope `wa:manage`. Rate-limited (SensitiveLimit).

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}/restart" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Sesi WhatsApp direstart
404Instance tidak ditemukan
DELETE/all-in-one/wa/instances/{id}ApiKeyAuth

Hapus instance WhatsApp

Memutus dan menghapus instance. Scope `wa:manage`. Rate-limited (SensitiveLimit).

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
purge_modequeryTidakstring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Instance WhatsApp dihapus
404Instance tidak ditemukan
GET/all-in-one/billing/balanceApiKeyAuth

Lihat saldo token

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/balance" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Saldo token & ringkasan
GET/all-in-one/billing/transactionsApiKeyAuth

Riwayat transaksi token

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/transactions" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar transaksi
GET/all-in-one/billing/invoicesApiKeyAuth

Daftar invoice

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/invoices" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar invoice
POST/all-in-one/billing/topupApiKeyAuth

Topup saldo (membuat invoice pembayaran)

Membuat invoice top-up saldo token lewat payment gateway. Saldo bertambah setelah pembayaran terkonfirmasi (webhook gateway). Scope `billing:create`. Wajib header `Idempotency-Key`.

Parameter

NamaLokasiWajibTipeDeskripsi
Idempotency-KeyheaderYastring-

Body (wajib)

FieldWajibTipeDeskripsi
amountYanumber-
payment_gatewayTidakstring-
contoh-body.json
{
  "amount": 0,
  "payment_gateway": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/billing/topup" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 0, "payment_gateway": "<teks>" }'

Respons

StatusDeskripsi
201Invoice topup dibuat + info pembayaran
422Nominal tidak valid
GET/all-in-one/productsApiKeyAuth

Daftar produk

Scope `products:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/products" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar produk
POST/all-in-one/productsApiKeyAuth

Buat produk

Scope `products:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/products" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Produk dibuat
PUT/all-in-one/products/{id}ApiKeyAuth

Ubah produk

Scope `products:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/products/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Produk diperbarui
DELETE/all-in-one/products/{id}ApiKeyAuth

Hapus produk

Scope `products:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/products/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Produk dihapus
GET/all-in-one/ordersApiKeyAuth

Daftar pesanan

Scope `orders:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/orders" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pesanan
POST/all-in-one/ordersApiKeyAuth

Buat pesanan

Scope `orders:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/orders" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Pesanan dibuat
GET/all-in-one/orders/{id}ApiKeyAuth

Detail pesanan

Scope `orders:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/orders/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail pesanan
PUT/all-in-one/orders/{id}/statusApiKeyAuth

Ubah status pesanan

Scope `orders:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/orders/{id}/status" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Status diperbarui
GET/all-in-one/customersApiKeyAuth

Daftar pelanggan

Scope `customers:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/customers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pelanggan
GET/all-in-one/customers/{id}ApiKeyAuth

Detail pelanggan

Scope `customers:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/customers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail pelanggan
PUT/all-in-one/customers/{id}ApiKeyAuth

Ubah pelanggan

Scope `customers:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/customers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Pelanggan diperbarui
GET/all-in-one/vouchersApiKeyAuth

Daftar voucher

Scope `vouchers:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/vouchers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar voucher
POST/all-in-one/vouchersApiKeyAuth

Buat voucher

Scope `vouchers:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/vouchers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Voucher dibuat
POST/all-in-one/vouchers/validateApiKeyAuth

Validasi voucher

Scope `vouchers:read`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/vouchers/validate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Hasil validasi
GET/all-in-one/vouchers/{id}ApiKeyAuth

Detail voucher

Scope `vouchers:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail voucher
PUT/all-in-one/vouchers/{id}ApiKeyAuth

Ubah voucher

Scope `vouchers:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Voucher diperbarui
DELETE/all-in-one/vouchers/{id}ApiKeyAuth

Hapus voucher

Scope `vouchers:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Voucher dihapus
GET/all-in-one/servicesApiKeyAuth

Daftar layanan (service catalog)

Scope `services:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/services" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar layanan
POST/all-in-one/servicesApiKeyAuth

Buat layanan

Scope `services:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/services" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Layanan dibuat
PUT/all-in-one/services/{id}ApiKeyAuth

Ubah layanan

Scope `services:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/services/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Layanan diperbarui
DELETE/all-in-one/services/{id}ApiKeyAuth

Hapus layanan

Scope `services:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/services/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Layanan dihapus
GET/all-in-one/bookingsApiKeyAuth

Daftar booking

Scope `bookings:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/bookings" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar booking
GET/all-in-one/bookings/{id}ApiKeyAuth

Detail booking

Scope `bookings:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail booking
PUT/all-in-one/bookings/{id}/statusApiKeyAuth

Ubah status booking

Scope `bookings:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}/status" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Status booking diperbarui
PUT/all-in-one/bookings/{id}/cancelApiKeyAuth

Batalkan booking

Scope `bookings:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}/cancel" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Booking dibatalkan
GET/all-in-one/conversationsApiKeyAuth

Daftar percakapan (inbox)

Scope `conversations:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar percakapan
GET/all-in-one/conversations/{id}ApiKeyAuth

Detail percakapan

Scope `conversations:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail percakapan
GET/all-in-one/conversations/{id}/messagesApiKeyAuth

Pesan dalam percakapan

Scope `conversations:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}/messages" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pesan
POST/all-in-one/conversations/{id}/replyApiKeyAuth

Balas percakapan

Scope `conversations:create` atau `conversations:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-

Body (wajib)

FieldWajibTipeDeskripsi
contentTidakstring-
media_urlTidakstring-
contoh-body.json
{
  "content": "<teks>",
  "media_url": "https://contoh.id"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}/reply" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "content": "<teks>", "media_url": "https://contoh.id" }'

Respons

StatusDeskripsi
200Balasan terkirim
POST/all-in-one/article-gen/generateApiKeyAuth

Buat antrian generate artikel AI

Scope `article_gen`. Menerima project_id atau daftar keywords langsung untuk generate artikel SEO otomatis.

Body (wajib)

FieldWajibTipeDeskripsi
project_idTidakstring-
keywordsTidakstring[]-
toneTidakstring-
categoryTidakstring-
webhook_urlTidakstring-
webhook_secretTidakstring-
company_contextTidakstring-
contoh-body.json
{
  "project_id": "<teks>",
  "keywords": [],
  "tone": "<teks>",
  "category": "<teks>",
  "webhook_url": "https://contoh.id",
  "webhook_secret": "<teks>",
  "company_context": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/article-gen/generate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "project_id": "<teks>", "keywords": [], "tone": "<teks>", "category": "<teks>", "webhook_url": "https://contoh.id", "webhook_secret": "<teks>", "company_context": "<teks>" }'

Respons

StatusDeskripsi
202Batch generate diterima
GET/all-in-one/article-gen/batches/{id}ApiKeyAuth

Status dan progres antrian batch artikel

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/batches/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail status batch artikel
GET/all-in-one/article-gen/batches/{id}/articlesApiKeyAuth

Daftar artikel dalam batch

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/batches/{id}/articles" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar artikel dalam batch
GET/all-in-one/article-gen/articles/{id}ApiKeyAuth

Detail artikel hasil generate

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/articles/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail lengkap artikel
POST/all-in-one/article-gen/estimateApiKeyAuth

Estimasi biaya dan kuota artikel

Scope `article_gen`.

Body (wajib)

FieldWajibTipeDeskripsi
keyword_idsYastring[]-
contoh-body.json
{
  "keyword_ids": []
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/article-gen/estimate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "keyword_ids": [] }'

Respons

StatusDeskripsi
200Estimasi kuota gratis dan biaya IDR
bash
curl -X POST "https://dagangbot.web.id/api/v1/all-in-one/rag/query" \
  -H "X-API-Key: dgb_all_ContohKunciRahasiaAnda123" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "Apakah tas ransel Eiger seri Y memiliki slot laptop dan apakah anti air?",
    "conversation_id": "ctx_9901b",
    "temperature": 0.5
  }'

Respons Sukses (200 OK):

json
{
  "status": "success",
  "data": {
    "answer": "Ya, tas ransel Eiger seri Y memiliki kompartemen laptop berukuran hingga 15 inci dengan bantalan pengaman. Bahannya terbuat dari poliester berlapis ganda yang bersifat tahan air (water-resistant) untuk hujan intensitas ringan hingga sedang.",
    "citations": [
      {
        "document_id": "doc_tas_ransel_eiger_y",
        "snippet": "Kompartemen laptop 15" dan material water-resistant."
      }
    ]
  }
}

Langkah 8: Kasus Penggunaan 7 — Manajemen Voucer Diskon Eksternal

Skrip Anda dapat secara otomatis membuat voucer pada sistem DagangBot saat pelanggan menukarkan poin loyalitas di aplikasi eksternal Anda. Anda memanggil rute POST /all-in-one/vouchers yang membutuhkan scope vouchers:create.

GET/all-in-one/accountApiKeyAuth

Baca detail akun merchant

Identitas, langganan, saldo token, statistik. Scope `account:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/account" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail akun
GET/all-in-one/mediaApiKeyAuth

Daftar media library tenant

Daftar aset (foto produk, media katalog WA, lampiran bukti bayar). Read-only. Scope `media:read`. Query `module`, `file_type`, `page`, `per_page` (maks 100).

Parameter

NamaLokasiWajibTipeDeskripsi
modulequeryTidakstring-
file_typequeryTidakstring-
pagequeryTidakinteger-
per_pagequeryTidakinteger-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/media" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar aset beserta meta paginasi
403Key tidak punya scope media:read (key lama perlu migrasi 000341)
POST/all-in-one/otp/sendApiKeyAuth

Kirim OTP

Scope `otp:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
contoh-body.json
{
  "phone": "6281234567890"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/otp/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890" }'

Respons

StatusDeskripsi
200OTP terkirim
POST/all-in-one/otp/verifyApiKeyAuth

Verifikasi OTP

Scope `otp:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
otp_codeYastring-
contoh-body.json
{
  "phone": "6281234567890",
  "otp_code": "123456"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/otp/verify" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "otp_code": "123456" }'

Respons

StatusDeskripsi
200OTP tervalidasi
POST/all-in-one/rag/queryApiKeyAuth

Query RAG (jawaban dari knowledge base)

Pencarian vektor + sintesis jawaban AI atas knowledge base merchant. Scope `rag:read`. Bila provider embedding tidak tersedia, otomatis beralih ke pencarian kata kunci (field `used_fallback` = true).

Body (wajib)

FieldWajibTipeDeskripsi
queryYastring-
top_kTidakinteger-
contoh-body.json
{
  "query": "<teks>",
  "top_k": 0
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/rag/query" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "<teks>", "top_k": 0 }'

Respons

StatusDeskripsi
200Jawaban + hasil pencarian
POST/all-in-one/notify/sendApiKeyAuth

Kirim notifikasi multi-kanal

Scope `notify:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
template_typeYastring-
contentTidakstring-
variablesTidakobject-
contoh-body.json
{
  "phone": "6281234567890",
  "template_type": "<teks>",
  "content": "<teks>",
  "variables": {}
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/notify/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "template_type": "<teks>", "content": "<teks>", "variables": {} }'

Respons

StatusDeskripsi
200Notifikasi terkirim
POST/all-in-one/messages/sendApiKeyAuth

Kirim pesan WhatsApp ke satu nomor

Scope `messages:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
contentTidakstring-
media_urlTidakstring-
contoh-body.json
{
  "phone": "6281234567890",
  "content": "<teks>",
  "media_url": "https://contoh.id"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/messages/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "content": "<teks>", "media_url": "https://contoh.id" }'

Respons

StatusDeskripsi
200Pesan terkirim
422Nomor / konten tidak valid
POST/all-in-one/webhookApiKeyAuth

Terima event webhook masuk (dua arah)

Menyimpan event ke inbox tenant. Scope `webhook:receive`.

Body (opsional)

FieldWajibTipeDeskripsi
eventTidakstring-
dataTidakobject-
contoh-body.json
{
  "event": "<teks>",
  "data": {}
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/webhook" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "event": "<teks>", "data": {} }'

Respons

StatusDeskripsi
202Event diterima
GET/all-in-one/wa/instancesApiKeyAuth

Daftar instance WhatsApp

Menampilkan nomor WhatsApp milik tenant beserta status koneksinya (id, instance_name, phone_number, connection_status, connection_type, service_role, dsb). Scope `wa:manage`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/wa/instances" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar instance WhatsApp
POST/all-in-one/wa/instancesApiKeyAuth

Tambah nomor WhatsApp baru

Membuat sesi WhatsApp baru di gateway lalu menyimpannya. Scope `wa:manage`. Rate-limited (SensitiveLimit). Untuk tenant dengan scope cabang, `branch_id` wajib diisi.

Body (wajib)

FieldWajibTipeDeskripsi
instance_nameYastring-
connection_typeTidakstring-
service_roleTidakstring-
branch_idTidakstring (uuid)Wajib bila tenant memakai scope cabang
contoh-body.json
{
  "instance_name": "Contoh Nama",
  "connection_type": "unofficial",
  "service_role": "<teks>",
  "branch_id": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/wa/instances" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "instance_name": "Contoh Nama", "connection_type": "unofficial", "service_role": "<teks>", "branch_id": "<teks>" }'

Respons

StatusDeskripsi
201Instance dibuat (menyertakan qr_code bila unofficial)
400Nama instance tidak valid
403Kuota nomor WA tercapai atau plan tidak mengizinkan
409Nama instance sudah dipakai
GET/all-in-one/wa/instances/{id}/qrApiKeyAuth

Ambil kode QR untuk scan

Mengembalikan QR live (data URL base64) untuk memindai nomor. Bila perangkat sudah tersambung, balasan berisi connected=true tanpa QR. Scope `wa:manage`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}/qr" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200{ qr_code, pairing_code, status, ... }
404Instance tidak ditemukan
POST/all-in-one/wa/instances/{id}/restartApiKeyAuth

Restart koneksi sesi WhatsApp

Scope `wa:manage`. Rate-limited (SensitiveLimit).

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}/restart" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Sesi WhatsApp direstart
404Instance tidak ditemukan
DELETE/all-in-one/wa/instances/{id}ApiKeyAuth

Hapus instance WhatsApp

Memutus dan menghapus instance. Scope `wa:manage`. Rate-limited (SensitiveLimit).

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
purge_modequeryTidakstring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Instance WhatsApp dihapus
404Instance tidak ditemukan
GET/all-in-one/billing/balanceApiKeyAuth

Lihat saldo token

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/balance" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Saldo token & ringkasan
GET/all-in-one/billing/transactionsApiKeyAuth

Riwayat transaksi token

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/transactions" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar transaksi
GET/all-in-one/billing/invoicesApiKeyAuth

Daftar invoice

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/invoices" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar invoice
POST/all-in-one/billing/topupApiKeyAuth

Topup saldo (membuat invoice pembayaran)

Membuat invoice top-up saldo token lewat payment gateway. Saldo bertambah setelah pembayaran terkonfirmasi (webhook gateway). Scope `billing:create`. Wajib header `Idempotency-Key`.

Parameter

NamaLokasiWajibTipeDeskripsi
Idempotency-KeyheaderYastring-

Body (wajib)

FieldWajibTipeDeskripsi
amountYanumber-
payment_gatewayTidakstring-
contoh-body.json
{
  "amount": 0,
  "payment_gateway": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/billing/topup" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 0, "payment_gateway": "<teks>" }'

Respons

StatusDeskripsi
201Invoice topup dibuat + info pembayaran
422Nominal tidak valid
GET/all-in-one/productsApiKeyAuth

Daftar produk

Scope `products:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/products" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar produk
POST/all-in-one/productsApiKeyAuth

Buat produk

Scope `products:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/products" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Produk dibuat
PUT/all-in-one/products/{id}ApiKeyAuth

Ubah produk

Scope `products:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/products/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Produk diperbarui
DELETE/all-in-one/products/{id}ApiKeyAuth

Hapus produk

Scope `products:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/products/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Produk dihapus
GET/all-in-one/ordersApiKeyAuth

Daftar pesanan

Scope `orders:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/orders" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pesanan
POST/all-in-one/ordersApiKeyAuth

Buat pesanan

Scope `orders:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/orders" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Pesanan dibuat
GET/all-in-one/orders/{id}ApiKeyAuth

Detail pesanan

Scope `orders:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/orders/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail pesanan
PUT/all-in-one/orders/{id}/statusApiKeyAuth

Ubah status pesanan

Scope `orders:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/orders/{id}/status" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Status diperbarui
GET/all-in-one/customersApiKeyAuth

Daftar pelanggan

Scope `customers:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/customers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pelanggan
GET/all-in-one/customers/{id}ApiKeyAuth

Detail pelanggan

Scope `customers:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/customers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail pelanggan
PUT/all-in-one/customers/{id}ApiKeyAuth

Ubah pelanggan

Scope `customers:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/customers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Pelanggan diperbarui
GET/all-in-one/vouchersApiKeyAuth

Daftar voucher

Scope `vouchers:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/vouchers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar voucher
POST/all-in-one/vouchersApiKeyAuth

Buat voucher

Scope `vouchers:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/vouchers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Voucher dibuat
POST/all-in-one/vouchers/validateApiKeyAuth

Validasi voucher

Scope `vouchers:read`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/vouchers/validate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Hasil validasi
GET/all-in-one/vouchers/{id}ApiKeyAuth

Detail voucher

Scope `vouchers:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail voucher
PUT/all-in-one/vouchers/{id}ApiKeyAuth

Ubah voucher

Scope `vouchers:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Voucher diperbarui
DELETE/all-in-one/vouchers/{id}ApiKeyAuth

Hapus voucher

Scope `vouchers:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Voucher dihapus
GET/all-in-one/servicesApiKeyAuth

Daftar layanan (service catalog)

Scope `services:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/services" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar layanan
POST/all-in-one/servicesApiKeyAuth

Buat layanan

Scope `services:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/services" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Layanan dibuat
PUT/all-in-one/services/{id}ApiKeyAuth

Ubah layanan

Scope `services:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/services/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Layanan diperbarui
DELETE/all-in-one/services/{id}ApiKeyAuth

Hapus layanan

Scope `services:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/services/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Layanan dihapus
GET/all-in-one/bookingsApiKeyAuth

Daftar booking

Scope `bookings:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/bookings" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar booking
GET/all-in-one/bookings/{id}ApiKeyAuth

Detail booking

Scope `bookings:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail booking
PUT/all-in-one/bookings/{id}/statusApiKeyAuth

Ubah status booking

Scope `bookings:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}/status" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Status booking diperbarui
PUT/all-in-one/bookings/{id}/cancelApiKeyAuth

Batalkan booking

Scope `bookings:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}/cancel" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Booking dibatalkan
GET/all-in-one/conversationsApiKeyAuth

Daftar percakapan (inbox)

Scope `conversations:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar percakapan
GET/all-in-one/conversations/{id}ApiKeyAuth

Detail percakapan

Scope `conversations:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail percakapan
GET/all-in-one/conversations/{id}/messagesApiKeyAuth

Pesan dalam percakapan

Scope `conversations:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}/messages" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pesan
POST/all-in-one/conversations/{id}/replyApiKeyAuth

Balas percakapan

Scope `conversations:create` atau `conversations:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-

Body (wajib)

FieldWajibTipeDeskripsi
contentTidakstring-
media_urlTidakstring-
contoh-body.json
{
  "content": "<teks>",
  "media_url": "https://contoh.id"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}/reply" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "content": "<teks>", "media_url": "https://contoh.id" }'

Respons

StatusDeskripsi
200Balasan terkirim
POST/all-in-one/article-gen/generateApiKeyAuth

Buat antrian generate artikel AI

Scope `article_gen`. Menerima project_id atau daftar keywords langsung untuk generate artikel SEO otomatis.

Body (wajib)

FieldWajibTipeDeskripsi
project_idTidakstring-
keywordsTidakstring[]-
toneTidakstring-
categoryTidakstring-
webhook_urlTidakstring-
webhook_secretTidakstring-
company_contextTidakstring-
contoh-body.json
{
  "project_id": "<teks>",
  "keywords": [],
  "tone": "<teks>",
  "category": "<teks>",
  "webhook_url": "https://contoh.id",
  "webhook_secret": "<teks>",
  "company_context": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/article-gen/generate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "project_id": "<teks>", "keywords": [], "tone": "<teks>", "category": "<teks>", "webhook_url": "https://contoh.id", "webhook_secret": "<teks>", "company_context": "<teks>" }'

Respons

StatusDeskripsi
202Batch generate diterima
GET/all-in-one/article-gen/batches/{id}ApiKeyAuth

Status dan progres antrian batch artikel

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/batches/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail status batch artikel
GET/all-in-one/article-gen/batches/{id}/articlesApiKeyAuth

Daftar artikel dalam batch

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/batches/{id}/articles" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar artikel dalam batch
GET/all-in-one/article-gen/articles/{id}ApiKeyAuth

Detail artikel hasil generate

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/articles/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail lengkap artikel
POST/all-in-one/article-gen/estimateApiKeyAuth

Estimasi biaya dan kuota artikel

Scope `article_gen`.

Body (wajib)

FieldWajibTipeDeskripsi
keyword_idsYastring[]-
contoh-body.json
{
  "keyword_ids": []
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/article-gen/estimate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "keyword_ids": [] }'

Respons

StatusDeskripsi
200Estimasi kuota gratis dan biaya IDR
bash
curl -X POST "https://dagangbot.web.id/api/v1/all-in-one/vouchers" \
  -H "X-API-Key: dgb_all_ContohKunciRahasiaAnda123" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "LOYALTY50K",
    "discount_type": "fixed",
    "discount_amount": 50000,
    "max_uses": 1,
    "valid_until": "2026-12-31T23:59:59Z"
  }'

Respons Sukses (201 Created):

json
{
  "status": "success",
  "data": {
    "voucher_id": "vch_99abc",
    "code": "LOYALTY50K",
    "status": "active"
  }
}

Langkah 9: Kasus Penggunaan 8 — Menerima Notifikasi Webhook

Sistem ERP Anda bisa mengirimkan data peristiwa (event) ke DagangBot melalui titik POST /all-in-one/webhook. Hal ini mengharuskan Anda memiliki kunci dengan scope webhook:receive. Rute ini sangat berguna untuk memberi tahu asisten bahwa sebuah pembayaran dari Payment Gateway telah sukses, sehingga asisten dapat melanjutkan percakapan.

GET/all-in-one/accountApiKeyAuth

Baca detail akun merchant

Identitas, langganan, saldo token, statistik. Scope `account:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/account" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail akun
GET/all-in-one/mediaApiKeyAuth

Daftar media library tenant

Daftar aset (foto produk, media katalog WA, lampiran bukti bayar). Read-only. Scope `media:read`. Query `module`, `file_type`, `page`, `per_page` (maks 100).

Parameter

NamaLokasiWajibTipeDeskripsi
modulequeryTidakstring-
file_typequeryTidakstring-
pagequeryTidakinteger-
per_pagequeryTidakinteger-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/media" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar aset beserta meta paginasi
403Key tidak punya scope media:read (key lama perlu migrasi 000341)
POST/all-in-one/otp/sendApiKeyAuth

Kirim OTP

Scope `otp:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
contoh-body.json
{
  "phone": "6281234567890"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/otp/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890" }'

Respons

StatusDeskripsi
200OTP terkirim
POST/all-in-one/otp/verifyApiKeyAuth

Verifikasi OTP

Scope `otp:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
otp_codeYastring-
contoh-body.json
{
  "phone": "6281234567890",
  "otp_code": "123456"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/otp/verify" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "otp_code": "123456" }'

Respons

StatusDeskripsi
200OTP tervalidasi
POST/all-in-one/rag/queryApiKeyAuth

Query RAG (jawaban dari knowledge base)

Pencarian vektor + sintesis jawaban AI atas knowledge base merchant. Scope `rag:read`. Bila provider embedding tidak tersedia, otomatis beralih ke pencarian kata kunci (field `used_fallback` = true).

Body (wajib)

FieldWajibTipeDeskripsi
queryYastring-
top_kTidakinteger-
contoh-body.json
{
  "query": "<teks>",
  "top_k": 0
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/rag/query" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "<teks>", "top_k": 0 }'

Respons

StatusDeskripsi
200Jawaban + hasil pencarian
POST/all-in-one/notify/sendApiKeyAuth

Kirim notifikasi multi-kanal

Scope `notify:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
template_typeYastring-
contentTidakstring-
variablesTidakobject-
contoh-body.json
{
  "phone": "6281234567890",
  "template_type": "<teks>",
  "content": "<teks>",
  "variables": {}
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/notify/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "template_type": "<teks>", "content": "<teks>", "variables": {} }'

Respons

StatusDeskripsi
200Notifikasi terkirim
POST/all-in-one/messages/sendApiKeyAuth

Kirim pesan WhatsApp ke satu nomor

Scope `messages:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
contentTidakstring-
media_urlTidakstring-
contoh-body.json
{
  "phone": "6281234567890",
  "content": "<teks>",
  "media_url": "https://contoh.id"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/messages/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "content": "<teks>", "media_url": "https://contoh.id" }'

Respons

StatusDeskripsi
200Pesan terkirim
422Nomor / konten tidak valid
POST/all-in-one/webhookApiKeyAuth

Terima event webhook masuk (dua arah)

Menyimpan event ke inbox tenant. Scope `webhook:receive`.

Body (opsional)

FieldWajibTipeDeskripsi
eventTidakstring-
dataTidakobject-
contoh-body.json
{
  "event": "<teks>",
  "data": {}
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/webhook" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "event": "<teks>", "data": {} }'

Respons

StatusDeskripsi
202Event diterima
GET/all-in-one/wa/instancesApiKeyAuth

Daftar instance WhatsApp

Menampilkan nomor WhatsApp milik tenant beserta status koneksinya (id, instance_name, phone_number, connection_status, connection_type, service_role, dsb). Scope `wa:manage`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/wa/instances" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar instance WhatsApp
POST/all-in-one/wa/instancesApiKeyAuth

Tambah nomor WhatsApp baru

Membuat sesi WhatsApp baru di gateway lalu menyimpannya. Scope `wa:manage`. Rate-limited (SensitiveLimit). Untuk tenant dengan scope cabang, `branch_id` wajib diisi.

Body (wajib)

FieldWajibTipeDeskripsi
instance_nameYastring-
connection_typeTidakstring-
service_roleTidakstring-
branch_idTidakstring (uuid)Wajib bila tenant memakai scope cabang
contoh-body.json
{
  "instance_name": "Contoh Nama",
  "connection_type": "unofficial",
  "service_role": "<teks>",
  "branch_id": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/wa/instances" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "instance_name": "Contoh Nama", "connection_type": "unofficial", "service_role": "<teks>", "branch_id": "<teks>" }'

Respons

StatusDeskripsi
201Instance dibuat (menyertakan qr_code bila unofficial)
400Nama instance tidak valid
403Kuota nomor WA tercapai atau plan tidak mengizinkan
409Nama instance sudah dipakai
GET/all-in-one/wa/instances/{id}/qrApiKeyAuth

Ambil kode QR untuk scan

Mengembalikan QR live (data URL base64) untuk memindai nomor. Bila perangkat sudah tersambung, balasan berisi connected=true tanpa QR. Scope `wa:manage`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}/qr" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200{ qr_code, pairing_code, status, ... }
404Instance tidak ditemukan
POST/all-in-one/wa/instances/{id}/restartApiKeyAuth

Restart koneksi sesi WhatsApp

Scope `wa:manage`. Rate-limited (SensitiveLimit).

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}/restart" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Sesi WhatsApp direstart
404Instance tidak ditemukan
DELETE/all-in-one/wa/instances/{id}ApiKeyAuth

Hapus instance WhatsApp

Memutus dan menghapus instance. Scope `wa:manage`. Rate-limited (SensitiveLimit).

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
purge_modequeryTidakstring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Instance WhatsApp dihapus
404Instance tidak ditemukan
GET/all-in-one/billing/balanceApiKeyAuth

Lihat saldo token

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/balance" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Saldo token & ringkasan
GET/all-in-one/billing/transactionsApiKeyAuth

Riwayat transaksi token

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/transactions" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar transaksi
GET/all-in-one/billing/invoicesApiKeyAuth

Daftar invoice

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/invoices" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar invoice
POST/all-in-one/billing/topupApiKeyAuth

Topup saldo (membuat invoice pembayaran)

Membuat invoice top-up saldo token lewat payment gateway. Saldo bertambah setelah pembayaran terkonfirmasi (webhook gateway). Scope `billing:create`. Wajib header `Idempotency-Key`.

Parameter

NamaLokasiWajibTipeDeskripsi
Idempotency-KeyheaderYastring-

Body (wajib)

FieldWajibTipeDeskripsi
amountYanumber-
payment_gatewayTidakstring-
contoh-body.json
{
  "amount": 0,
  "payment_gateway": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/billing/topup" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 0, "payment_gateway": "<teks>" }'

Respons

StatusDeskripsi
201Invoice topup dibuat + info pembayaran
422Nominal tidak valid
GET/all-in-one/productsApiKeyAuth

Daftar produk

Scope `products:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/products" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar produk
POST/all-in-one/productsApiKeyAuth

Buat produk

Scope `products:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/products" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Produk dibuat
PUT/all-in-one/products/{id}ApiKeyAuth

Ubah produk

Scope `products:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/products/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Produk diperbarui
DELETE/all-in-one/products/{id}ApiKeyAuth

Hapus produk

Scope `products:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/products/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Produk dihapus
GET/all-in-one/ordersApiKeyAuth

Daftar pesanan

Scope `orders:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/orders" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pesanan
POST/all-in-one/ordersApiKeyAuth

Buat pesanan

Scope `orders:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/orders" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Pesanan dibuat
GET/all-in-one/orders/{id}ApiKeyAuth

Detail pesanan

Scope `orders:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/orders/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail pesanan
PUT/all-in-one/orders/{id}/statusApiKeyAuth

Ubah status pesanan

Scope `orders:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/orders/{id}/status" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Status diperbarui
GET/all-in-one/customersApiKeyAuth

Daftar pelanggan

Scope `customers:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/customers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pelanggan
GET/all-in-one/customers/{id}ApiKeyAuth

Detail pelanggan

Scope `customers:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/customers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail pelanggan
PUT/all-in-one/customers/{id}ApiKeyAuth

Ubah pelanggan

Scope `customers:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/customers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Pelanggan diperbarui
GET/all-in-one/vouchersApiKeyAuth

Daftar voucher

Scope `vouchers:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/vouchers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar voucher
POST/all-in-one/vouchersApiKeyAuth

Buat voucher

Scope `vouchers:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/vouchers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Voucher dibuat
POST/all-in-one/vouchers/validateApiKeyAuth

Validasi voucher

Scope `vouchers:read`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/vouchers/validate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Hasil validasi
GET/all-in-one/vouchers/{id}ApiKeyAuth

Detail voucher

Scope `vouchers:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail voucher
PUT/all-in-one/vouchers/{id}ApiKeyAuth

Ubah voucher

Scope `vouchers:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Voucher diperbarui
DELETE/all-in-one/vouchers/{id}ApiKeyAuth

Hapus voucher

Scope `vouchers:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Voucher dihapus
GET/all-in-one/servicesApiKeyAuth

Daftar layanan (service catalog)

Scope `services:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/services" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar layanan
POST/all-in-one/servicesApiKeyAuth

Buat layanan

Scope `services:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/services" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Layanan dibuat
PUT/all-in-one/services/{id}ApiKeyAuth

Ubah layanan

Scope `services:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/services/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Layanan diperbarui
DELETE/all-in-one/services/{id}ApiKeyAuth

Hapus layanan

Scope `services:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/services/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Layanan dihapus
GET/all-in-one/bookingsApiKeyAuth

Daftar booking

Scope `bookings:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/bookings" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar booking
GET/all-in-one/bookings/{id}ApiKeyAuth

Detail booking

Scope `bookings:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail booking
PUT/all-in-one/bookings/{id}/statusApiKeyAuth

Ubah status booking

Scope `bookings:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}/status" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Status booking diperbarui
PUT/all-in-one/bookings/{id}/cancelApiKeyAuth

Batalkan booking

Scope `bookings:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}/cancel" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Booking dibatalkan
GET/all-in-one/conversationsApiKeyAuth

Daftar percakapan (inbox)

Scope `conversations:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar percakapan
GET/all-in-one/conversations/{id}ApiKeyAuth

Detail percakapan

Scope `conversations:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail percakapan
GET/all-in-one/conversations/{id}/messagesApiKeyAuth

Pesan dalam percakapan

Scope `conversations:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}/messages" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pesan
POST/all-in-one/conversations/{id}/replyApiKeyAuth

Balas percakapan

Scope `conversations:create` atau `conversations:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-

Body (wajib)

FieldWajibTipeDeskripsi
contentTidakstring-
media_urlTidakstring-
contoh-body.json
{
  "content": "<teks>",
  "media_url": "https://contoh.id"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}/reply" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "content": "<teks>", "media_url": "https://contoh.id" }'

Respons

StatusDeskripsi
200Balasan terkirim
POST/all-in-one/article-gen/generateApiKeyAuth

Buat antrian generate artikel AI

Scope `article_gen`. Menerima project_id atau daftar keywords langsung untuk generate artikel SEO otomatis.

Body (wajib)

FieldWajibTipeDeskripsi
project_idTidakstring-
keywordsTidakstring[]-
toneTidakstring-
categoryTidakstring-
webhook_urlTidakstring-
webhook_secretTidakstring-
company_contextTidakstring-
contoh-body.json
{
  "project_id": "<teks>",
  "keywords": [],
  "tone": "<teks>",
  "category": "<teks>",
  "webhook_url": "https://contoh.id",
  "webhook_secret": "<teks>",
  "company_context": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/article-gen/generate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "project_id": "<teks>", "keywords": [], "tone": "<teks>", "category": "<teks>", "webhook_url": "https://contoh.id", "webhook_secret": "<teks>", "company_context": "<teks>" }'

Respons

StatusDeskripsi
202Batch generate diterima
GET/all-in-one/article-gen/batches/{id}ApiKeyAuth

Status dan progres antrian batch artikel

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/batches/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail status batch artikel
GET/all-in-one/article-gen/batches/{id}/articlesApiKeyAuth

Daftar artikel dalam batch

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/batches/{id}/articles" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar artikel dalam batch
GET/all-in-one/article-gen/articles/{id}ApiKeyAuth

Detail artikel hasil generate

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/articles/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail lengkap artikel
POST/all-in-one/article-gen/estimateApiKeyAuth

Estimasi biaya dan kuota artikel

Scope `article_gen`.

Body (wajib)

FieldWajibTipeDeskripsi
keyword_idsYastring[]-
contoh-body.json
{
  "keyword_ids": []
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/article-gen/estimate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "keyword_ids": [] }'

Respons

StatusDeskripsi
200Estimasi kuota gratis dan biaya IDR
bash
curl -X POST "https://dagangbot.web.id/api/v1/all-in-one/webhook" \
  -H "X-API-Key: dgb_all_ContohKunciRahasiaAnda123" \
  -H "Content-Type: application/json" \
  -d '{
    "event": "payment.success",
    "payload": {
      "order_id": "ord_10294",
      "amount": 250000
    }
  }'

Penggunaan skenario webhook masukan (inbound webhook) ini menjamin status di dalam database platform sinkron dengan layanan penagihan milik Anda, menghapus kebutuhan polling dari platform terhadap API eksternal.

Langkah 10: Kasus Penggunaan 9 — Otomatisasi Pembuatan Artikel SEO (Article Generator)

Platform menyediakan mesin generator artikel teroptimasi SEO (Article Generator) yang dapat diakses secara langsung lewat All-in-One API. Anda dapat menyuntikkan daftar kata kunci secara langsung atau mereferensikan proyek tertentu. Antrean akan diproses secara asinkron di latar belakang, dan status pengerjaan dapat dipantau berkala atau diterima otomatis melalui webhook.

GET/all-in-one/accountApiKeyAuth

Baca detail akun merchant

Identitas, langganan, saldo token, statistik. Scope `account:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/account" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail akun
GET/all-in-one/mediaApiKeyAuth

Daftar media library tenant

Daftar aset (foto produk, media katalog WA, lampiran bukti bayar). Read-only. Scope `media:read`. Query `module`, `file_type`, `page`, `per_page` (maks 100).

Parameter

NamaLokasiWajibTipeDeskripsi
modulequeryTidakstring-
file_typequeryTidakstring-
pagequeryTidakinteger-
per_pagequeryTidakinteger-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/media" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar aset beserta meta paginasi
403Key tidak punya scope media:read (key lama perlu migrasi 000341)
POST/all-in-one/otp/sendApiKeyAuth

Kirim OTP

Scope `otp:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
contoh-body.json
{
  "phone": "6281234567890"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/otp/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890" }'

Respons

StatusDeskripsi
200OTP terkirim
POST/all-in-one/otp/verifyApiKeyAuth

Verifikasi OTP

Scope `otp:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
otp_codeYastring-
contoh-body.json
{
  "phone": "6281234567890",
  "otp_code": "123456"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/otp/verify" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "otp_code": "123456" }'

Respons

StatusDeskripsi
200OTP tervalidasi
POST/all-in-one/rag/queryApiKeyAuth

Query RAG (jawaban dari knowledge base)

Pencarian vektor + sintesis jawaban AI atas knowledge base merchant. Scope `rag:read`. Bila provider embedding tidak tersedia, otomatis beralih ke pencarian kata kunci (field `used_fallback` = true).

Body (wajib)

FieldWajibTipeDeskripsi
queryYastring-
top_kTidakinteger-
contoh-body.json
{
  "query": "<teks>",
  "top_k": 0
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/rag/query" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "<teks>", "top_k": 0 }'

Respons

StatusDeskripsi
200Jawaban + hasil pencarian
POST/all-in-one/notify/sendApiKeyAuth

Kirim notifikasi multi-kanal

Scope `notify:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
template_typeYastring-
contentTidakstring-
variablesTidakobject-
contoh-body.json
{
  "phone": "6281234567890",
  "template_type": "<teks>",
  "content": "<teks>",
  "variables": {}
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/notify/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "template_type": "<teks>", "content": "<teks>", "variables": {} }'

Respons

StatusDeskripsi
200Notifikasi terkirim
POST/all-in-one/messages/sendApiKeyAuth

Kirim pesan WhatsApp ke satu nomor

Scope `messages:send`.

Body (wajib)

FieldWajibTipeDeskripsi
phoneYastring-
contentTidakstring-
media_urlTidakstring-
contoh-body.json
{
  "phone": "6281234567890",
  "content": "<teks>",
  "media_url": "https://contoh.id"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/messages/send" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "6281234567890", "content": "<teks>", "media_url": "https://contoh.id" }'

Respons

StatusDeskripsi
200Pesan terkirim
422Nomor / konten tidak valid
POST/all-in-one/webhookApiKeyAuth

Terima event webhook masuk (dua arah)

Menyimpan event ke inbox tenant. Scope `webhook:receive`.

Body (opsional)

FieldWajibTipeDeskripsi
eventTidakstring-
dataTidakobject-
contoh-body.json
{
  "event": "<teks>",
  "data": {}
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/webhook" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "event": "<teks>", "data": {} }'

Respons

StatusDeskripsi
202Event diterima
GET/all-in-one/wa/instancesApiKeyAuth

Daftar instance WhatsApp

Menampilkan nomor WhatsApp milik tenant beserta status koneksinya (id, instance_name, phone_number, connection_status, connection_type, service_role, dsb). Scope `wa:manage`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/wa/instances" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar instance WhatsApp
POST/all-in-one/wa/instancesApiKeyAuth

Tambah nomor WhatsApp baru

Membuat sesi WhatsApp baru di gateway lalu menyimpannya. Scope `wa:manage`. Rate-limited (SensitiveLimit). Untuk tenant dengan scope cabang, `branch_id` wajib diisi.

Body (wajib)

FieldWajibTipeDeskripsi
instance_nameYastring-
connection_typeTidakstring-
service_roleTidakstring-
branch_idTidakstring (uuid)Wajib bila tenant memakai scope cabang
contoh-body.json
{
  "instance_name": "Contoh Nama",
  "connection_type": "unofficial",
  "service_role": "<teks>",
  "branch_id": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/wa/instances" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "instance_name": "Contoh Nama", "connection_type": "unofficial", "service_role": "<teks>", "branch_id": "<teks>" }'

Respons

StatusDeskripsi
201Instance dibuat (menyertakan qr_code bila unofficial)
400Nama instance tidak valid
403Kuota nomor WA tercapai atau plan tidak mengizinkan
409Nama instance sudah dipakai
GET/all-in-one/wa/instances/{id}/qrApiKeyAuth

Ambil kode QR untuk scan

Mengembalikan QR live (data URL base64) untuk memindai nomor. Bila perangkat sudah tersambung, balasan berisi connected=true tanpa QR. Scope `wa:manage`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}/qr" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200{ qr_code, pairing_code, status, ... }
404Instance tidak ditemukan
POST/all-in-one/wa/instances/{id}/restartApiKeyAuth

Restart koneksi sesi WhatsApp

Scope `wa:manage`. Rate-limited (SensitiveLimit).

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}/restart" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Sesi WhatsApp direstart
404Instance tidak ditemukan
DELETE/all-in-one/wa/instances/{id}ApiKeyAuth

Hapus instance WhatsApp

Memutus dan menghapus instance. Scope `wa:manage`. Rate-limited (SensitiveLimit).

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring (uuid)-
purge_modequeryTidakstring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/wa/instances/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Instance WhatsApp dihapus
404Instance tidak ditemukan
GET/all-in-one/billing/balanceApiKeyAuth

Lihat saldo token

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/balance" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Saldo token & ringkasan
GET/all-in-one/billing/transactionsApiKeyAuth

Riwayat transaksi token

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/transactions" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar transaksi
GET/all-in-one/billing/invoicesApiKeyAuth

Daftar invoice

Scope `billing:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/billing/invoices" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar invoice
POST/all-in-one/billing/topupApiKeyAuth

Topup saldo (membuat invoice pembayaran)

Membuat invoice top-up saldo token lewat payment gateway. Saldo bertambah setelah pembayaran terkonfirmasi (webhook gateway). Scope `billing:create`. Wajib header `Idempotency-Key`.

Parameter

NamaLokasiWajibTipeDeskripsi
Idempotency-KeyheaderYastring-

Body (wajib)

FieldWajibTipeDeskripsi
amountYanumber-
payment_gatewayTidakstring-
contoh-body.json
{
  "amount": 0,
  "payment_gateway": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/billing/topup" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 0, "payment_gateway": "<teks>" }'

Respons

StatusDeskripsi
201Invoice topup dibuat + info pembayaran
422Nominal tidak valid
GET/all-in-one/productsApiKeyAuth

Daftar produk

Scope `products:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/products" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar produk
POST/all-in-one/productsApiKeyAuth

Buat produk

Scope `products:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/products" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Produk dibuat
PUT/all-in-one/products/{id}ApiKeyAuth

Ubah produk

Scope `products:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/products/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Produk diperbarui
DELETE/all-in-one/products/{id}ApiKeyAuth

Hapus produk

Scope `products:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/products/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Produk dihapus
GET/all-in-one/ordersApiKeyAuth

Daftar pesanan

Scope `orders:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/orders" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pesanan
POST/all-in-one/ordersApiKeyAuth

Buat pesanan

Scope `orders:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/orders" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Pesanan dibuat
GET/all-in-one/orders/{id}ApiKeyAuth

Detail pesanan

Scope `orders:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/orders/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail pesanan
PUT/all-in-one/orders/{id}/statusApiKeyAuth

Ubah status pesanan

Scope `orders:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/orders/{id}/status" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Status diperbarui
GET/all-in-one/customersApiKeyAuth

Daftar pelanggan

Scope `customers:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/customers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pelanggan
GET/all-in-one/customers/{id}ApiKeyAuth

Detail pelanggan

Scope `customers:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/customers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail pelanggan
PUT/all-in-one/customers/{id}ApiKeyAuth

Ubah pelanggan

Scope `customers:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/customers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Pelanggan diperbarui
GET/all-in-one/vouchersApiKeyAuth

Daftar voucher

Scope `vouchers:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/vouchers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar voucher
POST/all-in-one/vouchersApiKeyAuth

Buat voucher

Scope `vouchers:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/vouchers" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Voucher dibuat
POST/all-in-one/vouchers/validateApiKeyAuth

Validasi voucher

Scope `vouchers:read`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/vouchers/validate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Hasil validasi
GET/all-in-one/vouchers/{id}ApiKeyAuth

Detail voucher

Scope `vouchers:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail voucher
PUT/all-in-one/vouchers/{id}ApiKeyAuth

Ubah voucher

Scope `vouchers:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Voucher diperbarui
DELETE/all-in-one/vouchers/{id}ApiKeyAuth

Hapus voucher

Scope `vouchers:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/vouchers/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Voucher dihapus
GET/all-in-one/servicesApiKeyAuth

Daftar layanan (service catalog)

Scope `services:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/services" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar layanan
POST/all-in-one/servicesApiKeyAuth

Buat layanan

Scope `services:create`.

curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/services" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
201Layanan dibuat
PUT/all-in-one/services/{id}ApiKeyAuth

Ubah layanan

Scope `services:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/services/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Layanan diperbarui
DELETE/all-in-one/services/{id}ApiKeyAuth

Hapus layanan

Scope `services:delete`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X DELETE "https://dagangbot.co.id/api/v1/all-in-one/services/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Layanan dihapus
GET/all-in-one/bookingsApiKeyAuth

Daftar booking

Scope `bookings:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/bookings" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar booking
GET/all-in-one/bookings/{id}ApiKeyAuth

Detail booking

Scope `bookings:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail booking
PUT/all-in-one/bookings/{id}/statusApiKeyAuth

Ubah status booking

Scope `bookings:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}/status" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Status booking diperbarui
PUT/all-in-one/bookings/{id}/cancelApiKeyAuth

Batalkan booking

Scope `bookings:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X PUT "https://dagangbot.co.id/api/v1/all-in-one/bookings/{id}/cancel" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Booking dibatalkan
GET/all-in-one/conversationsApiKeyAuth

Daftar percakapan (inbox)

Scope `conversations:read`.

curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar percakapan
GET/all-in-one/conversations/{id}ApiKeyAuth

Detail percakapan

Scope `conversations:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail percakapan
GET/all-in-one/conversations/{id}/messagesApiKeyAuth

Pesan dalam percakapan

Scope `conversations:read`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}/messages" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar pesan
POST/all-in-one/conversations/{id}/replyApiKeyAuth

Balas percakapan

Scope `conversations:create` atau `conversations:update`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-

Body (wajib)

FieldWajibTipeDeskripsi
contentTidakstring-
media_urlTidakstring-
contoh-body.json
{
  "content": "<teks>",
  "media_url": "https://contoh.id"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/conversations/{id}/reply" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "content": "<teks>", "media_url": "https://contoh.id" }'

Respons

StatusDeskripsi
200Balasan terkirim
POST/all-in-one/article-gen/generateApiKeyAuth

Buat antrian generate artikel AI

Scope `article_gen`. Menerima project_id atau daftar keywords langsung untuk generate artikel SEO otomatis.

Body (wajib)

FieldWajibTipeDeskripsi
project_idTidakstring-
keywordsTidakstring[]-
toneTidakstring-
categoryTidakstring-
webhook_urlTidakstring-
webhook_secretTidakstring-
company_contextTidakstring-
contoh-body.json
{
  "project_id": "<teks>",
  "keywords": [],
  "tone": "<teks>",
  "category": "<teks>",
  "webhook_url": "https://contoh.id",
  "webhook_secret": "<teks>",
  "company_context": "<teks>"
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/article-gen/generate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "project_id": "<teks>", "keywords": [], "tone": "<teks>", "category": "<teks>", "webhook_url": "https://contoh.id", "webhook_secret": "<teks>", "company_context": "<teks>" }'

Respons

StatusDeskripsi
202Batch generate diterima
GET/all-in-one/article-gen/batches/{id}ApiKeyAuth

Status dan progres antrian batch artikel

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/batches/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail status batch artikel
GET/all-in-one/article-gen/batches/{id}/articlesApiKeyAuth

Daftar artikel dalam batch

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/batches/{id}/articles" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Daftar artikel dalam batch
GET/all-in-one/article-gen/articles/{id}ApiKeyAuth

Detail artikel hasil generate

Scope `article_gen`.

Parameter

NamaLokasiWajibTipeDeskripsi
idpathYastring-
curl
curl -X GET "https://dagangbot.co.id/api/v1/all-in-one/article-gen/articles/{id}" \
  -H "X-API-Key: $DAGANGBOT_API_KEY"

Respons

StatusDeskripsi
200Detail lengkap artikel
POST/all-in-one/article-gen/estimateApiKeyAuth

Estimasi biaya dan kuota artikel

Scope `article_gen`.

Body (wajib)

FieldWajibTipeDeskripsi
keyword_idsYastring[]-
contoh-body.json
{
  "keyword_ids": []
}
curl
curl -X POST "https://dagangbot.co.id/api/v1/all-in-one/article-gen/estimate" \
  -H "X-API-Key: $DAGANGBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "keyword_ids": [] }'

Respons

StatusDeskripsi
200Estimasi kuota gratis dan biaya IDR
bash
curl -X POST "https://dagangbot.web.id/api/v1/all-in-one/article-gen/generate" \
  -H "X-API-Key: dgb_all_ContohKunciRahasiaAnda123" \
  -H "Content-Type: application/json" \
  -d '{
    "keywords": ["sepatu kulit pria terbaik", "review sepatu pantofel"],
    "tone": "profesional",
    "category": "Fashion Pria",
    "company_context": "Produsen dan distributor retail sepatu kulit asli terpercaya di Bandung.",
    "webhook_url": "https://erp.perusahaan-anda.com/webhooks/article-gen",
    "webhook_secret": "kunci_rahasia_webhook_123"
  }'

Respons Sukses (202 Accepted):

json
{
  "status": "success",
  "data": {
    "batch_id": "7f8b91a2-3c4d-5e6f-7a8b-9c0d1e2f3a4b",
    "status": "queued",
    "total_articles": 2,
    "estimated": {
      "cost": "400.00",
      "free_articles": 0,
      "billable_articles": 2
    }
  }
}

Setelah antrian batch dibuat:

  1. Panggil GET /all-in-one/article-gen/batches/{id} untuk memantau status antrean (queued -> processing -> completed).
  2. Panggil GET /all-in-one/article-gen/batches/{id}/articles untuk mengambil daftar seluruh artikel yang dihasilkan dalam batch tersebut.
  3. Panggil GET /all-in-one/article-gen/articles/{id} untuk membaca konten Markdown, metadata SERP, dan evaluasi 18 parameter SEO artikel secara terperinci.
  4. Apabila parameter webhook_url disertakan, server akan mengirimkan event batch.completed dengan tanda tangan kriptografis X-DagangBot-Signature begitu seluruh artikel selesai digenerate.

4. Parameter & Spesifikasi Teknis

Keseluruhan agregasi 51 endpoint diklasifikasikan ke dalam ranah granular scopes. Tabel di bawah memetakan entitas operasional dan izin yang diperlukan:

Domain Fungsional Rute Endpoint Metode HTTP Kebutuhan Scope Otorisasi
Profil & Keamanan /account GET account:read
Pustaka Media /media GET media:read
Keamanan (OTP) /otp/send POST otp:send
/otp/verify POST otp:send
AI Knowledge Base /rag/query POST rag:read
Notifikasi WA /notify/send POST notify:send
/messages/send POST messages:send
Inbound Event /webhook POST webhook:receive
WA Instances /wa/instances GET, POST wa:manage
/wa/instances/{id}/qr GET wa:manage
/wa/instances/{id}/restart POST wa:manage
/wa/instances/{id} DELETE wa:manage
Katalog Produk /products GET, POST products:read, products:create
/products/{id} GET, PUT, DELETE products:read, products:update, products:delete
Kasir & Pesanan /orders GET, POST orders:read, orders:create
/orders/{id} GET orders:read
/orders/{id}/status PUT orders:update
Data Pelanggan /customers GET customers:read
/customers/{id} GET, PUT customers:read, customers:update
Manajemen Kupon /vouchers GET, POST vouchers:read, vouchers:create
/vouchers/validate POST vouchers:read
/vouchers/{id} GET, PUT, DELETE vouchers:read, vouchers:update, vouchers:delete
Layanan Jasa /services GET, POST services:read, services:create
/services/{id} PUT, DELETE services:update, services:delete
Jadwal Booking /bookings GET bookings:read
/bookings/{id} GET bookings:read
/bookings/{id}/status PUT bookings:update
/bookings/{id}/cancel PUT bookings:update
CRM Live Chat /conversations GET conversations:read
/conversations/{id} GET conversations:read
/conversations/{id}/messages GET conversations:read
/conversations/{id}/reply POST conversations:create / update
Keuangan Billing /billing/balance GET billing:read
/billing/transactions GET billing:read
/billing/invoices GET billing:read
/billing/topup POST billing:create
Generator Artikel (AI) /article-gen/generate POST article_gen
/article-gen/batches/{id} GET article_gen
/article-gen/batches/{id}/articles GET article_gen
/article-gen/articles/{id} GET article_gen
/article-gen/estimate POST article_gen

Peringatan Teknis: Setiap rute penulisan data dilindungi pembatas Rate Limiter tingkat sensitif (Sensitive Limit) jika menyangkut interaksi berbiaya langsung (contoh billing/topup dan messages/send).

Arsitektur Bucket Limiter (Rate Limiting) pada Ekosistem All-in-One

Demi mempertahankan stabilitas throughput dan menjauhkan platform dari skenario kelebihan beban (Overload) akibat sistem otomatisator infinite-loop klien, kami memberlakukan pembatasan laju (Rate Limiting) ketat. Metodologi yang digunakan adalah algoritma keranjang token ganda terdistribusi (Distributed Token Bucket Algorithm).

  1. Aturan Pembacaan (General Read Limits): Untuk permintaan berorientasi GET yang tidak merekayasa kondisi data (contohnya pembacaan data klien di rute /customers atau profil /account), batas atas diletakkan pada rasio 300 kueri per menit per kunci (queries-per-minute / QPM).
  2. Aturan Manipulasi Bebas Biaya (Standard Write Limits): Operasi penulisan wujud logikal seperti perbaruan rincian pesanan /orders/{id}/status dibatasi pada 150 request per menit. Hal ini dirancang untuk mencegah potensi kehabisan sumber daya konjungsi penulisan pangkalan data (Database Connection Pool Exhaustion).
  3. Aturan Keuangan & Telemetri Berbayar (Sensitive Limits): Rute yang pada akhirnya menciptakan tagihan pihak ketiga atau menghabiskan kuota token berbayar Anda (seperti pengiriman OTP keluar melalui WhatsApp di /otp/send dan notifikasi asinkron di /notify/send) diberlakukan pagar paling ketat. Sistem hanya mengizinkan 30 permintaan per menit secara global. Apabila terdeteksi penembusan batas yang masif, peladen API seketika mengambil status defensif sirkuit pemutus (Circuit Breaker) dengan penguncian sementara IP Anda selama 5 menit untuk melindungi dari bahaya ledakan tagihan operasional (Billing Shock).

Dalam setiap balasan respons pembatasan (429 Too Many Requests), API senantiasa melempar properti Retry-After dengan indikator unit detik penahanan.

Standar Paginasi Koleksi Data (Pagination Standard)

Ketika mengakses antarmuka yang membungkus pengembalian koleksi jamak (seperti GET /all-in-one/customers atau GET /all-in-one/products), ukuran hasil dijamin tidak akan membengkak merusak batas memori berkat implementasi mekanisme paginasi (Pagination) berbasis kursor berbasis batasan Offset.

Secara default, array balasan dikunci pada elemen sejumlah limit=50. Pengembang integrator bisa mengatur limit kueri (hingga maksimal 100), dan melompat halaman demi halaman secara kontinu menggunakan parameter page.

Respons untuk jenis ini akan memiliki struktur meta:

json
{
  "status": "success",
  "data": [
    { ... }
  ],
  "meta": {
    "current_page": 1,
    "total_pages": 45,
    "total_count": 2240,
    "limit_per_page": 50
  }
}

Rute yang pada akhirnya menciptakan tagihan pihak ketiga atau menghabiskan kuota token berbayar Anda (seperti pengiriman OTP keluar melalui WhatsApp di /otp/send dan notifikasi asinkron di /notify/send) diberlakukan pagar paling ketat. Sistem hanya mengizinkan 30 permintaan per menit secara global. Apabila terdeteksi penembusan batas yang masif, peladen API seketika mengambil status defensif sirkuit pemutus (Circuit Breaker) dengan penguncian sementara IP Anda selama 5 menit untuk melindungi dari bahaya ledakan tagihan operasional (Billing Shock).

Dalam setiap balasan respons pembatasan (429 Too Many Requests), API senantiasa melempar properti Retry-After dengan indikator unit detik penahanan.

Panduan Mendalam Pemilihan Domain Fungsional (Scopes)

  • Grup Data Pelanggan (customers:*): Modul ini wajib dicentang jika aplikasi Anda (seperti alat penemuan prospek/Mailchimp) bertujuan membaca dan memperbarui rincian pelanggan (nama, email, atribusi tags). Jika hanya mengirim pesan mentah via WhatsApp, ini tidak mutlak.
  • Grup Katalog Produk (products:*): Sentral bagi integrasi sinkronisasi gudang (Inventory Management System). Modul ini memungkinkan sistem eksternal untuk memperbarui jumlah stok riil secara waktu nyata setiap lima menit, memastikan sinkronitas lintas platform dan mencegah terjadinya barang terjual habis semu (Overselling).
  • Grup Manajemen Kupon (vouchers:*): Ideal untuk integrasi program loyalitas (Loyalty/Rewards Program). Skrip Anda dapat memvalidasi poin pengguna di database Anda, lalu menggunakan API ini untuk secara programatik menghasilkan dan mendelegasikan kode voucer potongan harga satu kali pakai pada pembelanjaan mereka di toko DagangBot.
  • Grup Otomatisasi Konten (article_gen): Kunci dengan ruang lingkup ini memberikan kendali penuh untuk membuat antrian batch artikel SEO secara programatik, mengontrol gaya bahasa (tone), mengambil draft Markdown dan evaluasi 18 parameter SEO, serta memantau status generasi artikel latar belakang melalui sistem antrean Asynq dan webhook notifikasi otomatis.

5. Relasi & Integrasi

Detail Arsitektur Pelindung Idempotensi (Idempotency Key Middleware)

Seluruh operasi pengubahan wujud data (mutations) pada rute vital telah diintegrasikan langsung dengan komponen Idempotensi. Desain sistem toleransi kesalahan ini mewajibkan sinkronisasi logikal tingkat lanjut.

Pelindung Idempotensi (Idempotency Key Middleware)

Pada ekosistem POST /orders (pembentukan pesanan) dan POST /billing/topup (penambahan saldo dompet token), arsitektur secara tegas mengevaluasi idempotency key.

  1. Klien mengirim pesanan beserta header Idempotency-Key: uuid-v4-abc.
  2. Middleware backend akan menyandikan kunci tersebut dan menyimpan rekam respon berhasil secara tersembunyi di memori Redis.
  3. Apabila terjadi timeout komunikasi SSL dan klien melakukan retri panggilan POST identik, sistem tidak akan menciptakan duplikasi pesanan logistik baru, melainkan mengembalikan hasil respons tangkapan dari pengerjaan yang sudah sukses sebelumnya secara instan.
  4. Ini adalah penangkal andal atas pemotongan ganda (Double Deduction) pada sisa stok barang dan saldo penagihan.

Spesifikasi teknis Idempotensi di platform DagangBot:

  • Format Header: Kami mensyaratkan kunci berbentuk identifikasi unik, yang disarankan berupa UUID versi 4 (contoh: 123e4567-e89b-12d3-a456-426614174000). Meskipun string acak lain diperbolehkan, UUID v4 menjamin tidak terjadinya tabrakan nilai lintas waktu.
  • Penyimpanan Cache (TTL): Hasil sukses dari panggilan awal disimpan dalam memori klaster Redis yang terisolasi dengan struktur Hash. Masa hidup kunci (Time-to-Live / TTL) ditetapkan maksimal selama 24 jam. Apabila Anda mengirim panggilan yang sama menggunakan kunci idempotensi yang identik 25 jam kemudian, peladen akan memproses ulang panggilan tersebut sebagai entitas beban kerja yang benar-benar baru.
  • Keseragaman Payload (Payload Hashing): Middleware tidak hanya mencocokkan teks kunci di header, melainkan juga melakukan hashing fungsi kriptografis SHA-256 pada badan permintaan (Request Body). Apabila klien mendaur ulang sebuah Idempotency Key untuk muatan transaksi yang isinya berbeda (misal, nomor pelanggan yang berbeda), sistem akan langsung menolaknya dengan HTTP 409 Conflict dengan pemberitahuan Idempotency Key Mismatch untuk memastikan kunci tersebut tidak digunakan ganda dengan maksud curang.

Keterkaitan Webhook Dua Arah

Khusus di POST /webhook, endpoint AIO bertindak sebagai gerbang agregasi untuk mengumpan notifikasi kejadian pihak luar (seperti balikan sukses pembayaran gerbang transfer) agar dieksekusi sinkron dengan logika DAG (Directed Acyclic Graph) proses internal.

6. Pemecahan Masalah (Troubleshooting)

Berurusan dengan 46 titik ujung membutuhkan pemahaman komprehensif terkait perilaku jaringan. Gunakan referensi pemecahan masalah cepat berikut apabila integrasi mesin tertahan.

Gejala Teramati di Klien Investigasi Penyebab Akar Mitigasi dan Solusi Rekomendasi
Mendapat HTTP 422 INVALID_PHONE secara konstan Input nomor lokal pengguna gagal normalisasi fungsi format E.164 internal (misal 0812 bukan 62812). Sesuaikan utilitas regex pada sistem ERP/CRM Anda sebelum dipicu ke API. Pastikan panjang > 8 digit.
Menerima balasan HTTP 502 SEND_FAILED pada endpoint pesan WA Layanan konektor jembatan (WhatsApp Instance) pada ID tenant bersangkutan dalam status terputus (Offline). Otomatisasi panggilan ke rute POST /wa/instances/{id}/restart dan tunggu latensi stabilisasi webhook balikan.
Transaksi retri memicu respons 409 Conflict dengan klaim Duplicate Header Idempotensi digunakan ulang untuk isi muatan muatan (payload body) yang benar-benar berbeda. Regenerasi UID acak idempotency untuk transaksi organik baru, jangan daur ulang kuncinya.
Pengisian ulang (topup) gagal menembus lapisan pelindung keamanan Terjegal Rate Limiter ganda (Sensitive Limit) karena pengulangan di bawah durasi jendela waktu (Time Window) pelarangan. Lakukan perlambatan (throttling) pada eksekusi iteratif cron scheduler aplikasi backend penagihan Anda.

Integrasi Pemantauan Log (Monitoring Logging)

Beranjak dari konsep pemecahan masalah insidental, tim pengembang yang matang direkomendasikan untuk menyambungkan balasan galat (Error Response) langsung ke alat manajemen log telemetri sistem (misalnya Datadog, ELK Stack, atau Sentry).

Dalam setiap balasan error dari titik API All-in-One, server kami secara inklusif menyisipkan header diagnostik berupa X-Request-Id (contoh: req_1234abc5678def). Nomor identifikasi pelacakan ini (trace ID) harus selalu Anda kumpulkan ke dalam pusat logger aplikasi klien. Ketika klien integrator menemui situasi di mana kode balasan 500 Internal Server Error diproduksi, penyertaan X-Request-Id tersebut dalam tiket meja bantuan (Helpdesk Ticket) kepada teknisi L3 DagangBot akan mempersingkat fase investigasi (Mean Time to Resolution / MTTR) dari ukuran hari menjadi sebatas belasan menit saja.

Tanpa penjejak pelacakan tersebut, para teknisi kami akan kesulitan melakukan pemilahan (triage) untuk menemukan log spesifik yang terkubur di bawah tumpukan log harian berukuran ratusan Gigabyte.

7. Kode Error & Penanganan

Akurasi analisis kesalahan adalah nyawa dari layanan otomatis. Berikut matriks penanganan balasan respons kegagalan API spesifik dari grup AIO ini:

Kode HTTP Penanda Kesalahan (Error Code) Konteks Muncul / Skenario Terjadinya
401 UNAUTHORIZED Header kredensial kunci salah ketik, dimodifikasi, atau tidak diakui cache karena rotasi Dashboard telah dilakukan.
403 FORBIDDEN Pemanggil API terotentikasi, namun rentang otorisasi Scope Picker pada kunci tidak memuat ruang perizinan rute spesifik ini.
404 RESOURCE_NOT_FOUND Parameter Path Variable {id} (misal UUID Produk) gagal terdeteksi pada Row Level Security pangkalan data tenant pengguna.
422 VALIDATION_ERROR Terdapat tipe data meleset dari kontrak skema, misalnya mengirim string ke parameter integer pada quantity.
502 GATEWAY_ERROR Jembatan asinkron ke layanan WhatsApp Cloud sedang memantulkan penolakan atau timeout.
409 CONFLICT_IDEMPOTENCY Header Idempotency-Key Anda ditemukan telah terpakai untuk paket payload yang berbeda.
400 MALFORMED_REQUEST Kegagalan parsing struktur JSON awal secara harfiah; indikasi rusaknya kompresi body HTTP klien.
503 SERVICE_UNAVAILABLE Pangkalan data atau sistem Redis tengah melakukan failover darurat (Peralihan Primer-Sekunder) berdurasi pendek.

Penanganan Lanjutan Kesalahan Skema Terkait

Saat Anda menerima galat validasi 422 VALIDATION_ERROR, peladen secara otomatis menyertakan senarai rincian kesalahan yang berisi letak atribut JSON spesifik yang melanggar kontrak skema, beserta pesan penjelasannya (misalnya, Field 'phone_number' failed on rule: required). Perilaku standar yang sangat dianjurkan bagi pengembang sistem terintegrasi adalah merekam (log) isi lengkap rincian 422 tersebut tanpa manipulasi, sehingga mempermudah proses pelacakan mandiri terhadap versi payload yang usang akibat perubahan kontrak antarmuka API seiring dengan pemutakhiran layanan platform kami. Kejelasan pesan galat hierarkis ini dapat dikirimkan langsung ke antarmuka aplikasi akhir milik merchant Anda tanpa perlu disandikan ulang, karena pesan dirancang cukup deskriptif bagi teknisi tingkat pertama (Level 1 Support).

8. Referensi Terkait

Untuk detail teknis arsitektur di baliknya, pastikan tim pengembang peranti lunak Anda mengulas dokumen pendukung:

content/docs/integrations/all-in-one-api.mdx
Terakhir diperbarui: 9 Okt 2026, 09.28

Dokumentasi teknis DagangBot