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


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:
/all-in-one/accountApiKeyAuthBaca detail akun merchant
Identitas, langganan, saldo token, statistik. Scope `account:read`.
Respons
/all-in-one/mediaApiKeyAuthDaftar 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
Respons
/all-in-one/otp/sendApiKeyAuthKirim OTP
Scope `otp:send`.
Body (wajib)
Respons
/all-in-one/otp/verifyApiKeyAuthVerifikasi OTP
Scope `otp:send`.
Body (wajib)
Respons
/all-in-one/rag/queryApiKeyAuthQuery 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)
Respons
/all-in-one/notify/sendApiKeyAuthKirim notifikasi multi-kanal
Scope `notify:send`.
Body (wajib)
Respons
/all-in-one/messages/sendApiKeyAuthKirim pesan WhatsApp ke satu nomor
Scope `messages:send`.
Body (wajib)
Respons
/all-in-one/webhookApiKeyAuthTerima event webhook masuk (dua arah)
Menyimpan event ke inbox tenant. Scope `webhook:receive`.
Body (opsional)
Respons
/all-in-one/wa/instancesApiKeyAuthDaftar 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`.
Respons
/all-in-one/wa/instancesApiKeyAuthTambah 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)
Respons
/all-in-one/wa/instances/{id}/qrApiKeyAuthAmbil 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
Respons
/all-in-one/wa/instances/{id}/restartApiKeyAuthRestart koneksi sesi WhatsApp
Scope `wa:manage`. Rate-limited (SensitiveLimit).
Parameter
Respons
/all-in-one/wa/instances/{id}ApiKeyAuthHapus instance WhatsApp
Memutus dan menghapus instance. Scope `wa:manage`. Rate-limited (SensitiveLimit).
Parameter
Respons
/all-in-one/billing/balanceApiKeyAuthLihat saldo token
Scope `billing:read`.
Respons
/all-in-one/billing/transactionsApiKeyAuthRiwayat transaksi token
Scope `billing:read`.
Respons
/all-in-one/billing/invoicesApiKeyAuthDaftar invoice
Scope `billing:read`.
Respons
/all-in-one/billing/topupApiKeyAuthTopup 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
Body (wajib)
Respons
/all-in-one/productsApiKeyAuthDaftar produk
Scope `products:read`.
Respons
/all-in-one/productsApiKeyAuthBuat produk
Scope `products:create`.
Respons
/all-in-one/products/{id}ApiKeyAuthUbah produk
Scope `products:update`.
Parameter
Respons
/all-in-one/products/{id}ApiKeyAuthHapus produk
Scope `products:delete`.
Parameter
Respons
/all-in-one/ordersApiKeyAuthDaftar pesanan
Scope `orders:read`.
Respons
/all-in-one/ordersApiKeyAuthBuat pesanan
Scope `orders:create`.
Respons
/all-in-one/orders/{id}ApiKeyAuthDetail pesanan
Scope `orders:read`.
Parameter
Respons
/all-in-one/orders/{id}/statusApiKeyAuthUbah status pesanan
Scope `orders:update`.
Parameter
Respons
/all-in-one/customersApiKeyAuthDaftar pelanggan
Scope `customers:read`.
Respons
/all-in-one/customers/{id}ApiKeyAuthDetail pelanggan
Scope `customers:read`.
Parameter
Respons
/all-in-one/customers/{id}ApiKeyAuthUbah pelanggan
Scope `customers:update`.
Parameter
Respons
/all-in-one/vouchersApiKeyAuthDaftar voucher
Scope `vouchers:read`.
Respons
/all-in-one/vouchersApiKeyAuthBuat voucher
Scope `vouchers:create`.
Respons
/all-in-one/vouchers/validateApiKeyAuthValidasi voucher
Scope `vouchers:read`.
Respons
/all-in-one/vouchers/{id}ApiKeyAuthDetail voucher
Scope `vouchers:read`.
Parameter
Respons
/all-in-one/vouchers/{id}ApiKeyAuthUbah voucher
Scope `vouchers:update`.
Parameter
Respons
/all-in-one/vouchers/{id}ApiKeyAuthHapus voucher
Scope `vouchers:delete`.
Parameter
Respons
/all-in-one/servicesApiKeyAuthDaftar layanan (service catalog)
Scope `services:read`.
Respons
/all-in-one/servicesApiKeyAuthBuat layanan
Scope `services:create`.
Respons
/all-in-one/services/{id}ApiKeyAuthUbah layanan
Scope `services:update`.
Parameter
Respons
/all-in-one/services/{id}ApiKeyAuthHapus layanan
Scope `services:delete`.
Parameter
Respons
/all-in-one/bookingsApiKeyAuthDaftar booking
Scope `bookings:read`.
Respons
/all-in-one/bookings/{id}ApiKeyAuthDetail booking
Scope `bookings:read`.
Parameter
Respons
/all-in-one/bookings/{id}/statusApiKeyAuthUbah status booking
Scope `bookings:update`.
Parameter
Respons
/all-in-one/bookings/{id}/cancelApiKeyAuthBatalkan booking
Scope `bookings:update`.
Parameter
Respons
/all-in-one/conversationsApiKeyAuthDaftar percakapan (inbox)
Scope `conversations:read`.
Respons
/all-in-one/conversations/{id}ApiKeyAuthDetail percakapan
Scope `conversations:read`.
Parameter
Respons
/all-in-one/conversations/{id}/messagesApiKeyAuthPesan dalam percakapan
Scope `conversations:read`.
Parameter
Respons
/all-in-one/conversations/{id}/replyApiKeyAuthBalas percakapan
Scope `conversations:create` atau `conversations:update`.
Parameter
Body (wajib)
Respons
/all-in-one/article-gen/generateApiKeyAuthBuat antrian generate artikel AI
Scope `article_gen`. Menerima project_id atau daftar keywords langsung untuk generate artikel SEO otomatis.
Body (wajib)
Respons
/all-in-one/article-gen/batches/{id}ApiKeyAuthStatus dan progres antrian batch artikel
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/batches/{id}/articlesApiKeyAuthDaftar artikel dalam batch
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/articles/{id}ApiKeyAuthDetail artikel hasil generate
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/estimateApiKeyAuthEstimasi biaya dan kuota artikel
Scope `article_gen`.
Body (wajib)
Respons
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:
/all-in-one/accountApiKeyAuthBaca detail akun merchant
Identitas, langganan, saldo token, statistik. Scope `account:read`.
Respons
/all-in-one/mediaApiKeyAuthDaftar 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
Respons
/all-in-one/otp/sendApiKeyAuthKirim OTP
Scope `otp:send`.
Body (wajib)
Respons
/all-in-one/otp/verifyApiKeyAuthVerifikasi OTP
Scope `otp:send`.
Body (wajib)
Respons
/all-in-one/rag/queryApiKeyAuthQuery 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)
Respons
/all-in-one/notify/sendApiKeyAuthKirim notifikasi multi-kanal
Scope `notify:send`.
Body (wajib)
Respons
/all-in-one/messages/sendApiKeyAuthKirim pesan WhatsApp ke satu nomor
Scope `messages:send`.
Body (wajib)
Respons
/all-in-one/webhookApiKeyAuthTerima event webhook masuk (dua arah)
Menyimpan event ke inbox tenant. Scope `webhook:receive`.
Body (opsional)
Respons
/all-in-one/wa/instancesApiKeyAuthDaftar 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`.
Respons
/all-in-one/wa/instancesApiKeyAuthTambah 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)
Respons
/all-in-one/wa/instances/{id}/qrApiKeyAuthAmbil 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
Respons
/all-in-one/wa/instances/{id}/restartApiKeyAuthRestart koneksi sesi WhatsApp
Scope `wa:manage`. Rate-limited (SensitiveLimit).
Parameter
Respons
/all-in-one/wa/instances/{id}ApiKeyAuthHapus instance WhatsApp
Memutus dan menghapus instance. Scope `wa:manage`. Rate-limited (SensitiveLimit).
Parameter
Respons
/all-in-one/billing/balanceApiKeyAuthLihat saldo token
Scope `billing:read`.
Respons
/all-in-one/billing/transactionsApiKeyAuthRiwayat transaksi token
Scope `billing:read`.
Respons
/all-in-one/billing/invoicesApiKeyAuthDaftar invoice
Scope `billing:read`.
Respons
/all-in-one/billing/topupApiKeyAuthTopup 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
Body (wajib)
Respons
/all-in-one/productsApiKeyAuthDaftar produk
Scope `products:read`.
Respons
/all-in-one/productsApiKeyAuthBuat produk
Scope `products:create`.
Respons
/all-in-one/products/{id}ApiKeyAuthUbah produk
Scope `products:update`.
Parameter
Respons
/all-in-one/products/{id}ApiKeyAuthHapus produk
Scope `products:delete`.
Parameter
Respons
/all-in-one/ordersApiKeyAuthDaftar pesanan
Scope `orders:read`.
Respons
/all-in-one/ordersApiKeyAuthBuat pesanan
Scope `orders:create`.
Respons
/all-in-one/orders/{id}ApiKeyAuthDetail pesanan
Scope `orders:read`.
Parameter
Respons
/all-in-one/orders/{id}/statusApiKeyAuthUbah status pesanan
Scope `orders:update`.
Parameter
Respons
/all-in-one/customersApiKeyAuthDaftar pelanggan
Scope `customers:read`.
Respons
/all-in-one/customers/{id}ApiKeyAuthDetail pelanggan
Scope `customers:read`.
Parameter
Respons
/all-in-one/customers/{id}ApiKeyAuthUbah pelanggan
Scope `customers:update`.
Parameter
Respons
/all-in-one/vouchersApiKeyAuthDaftar voucher
Scope `vouchers:read`.
Respons
/all-in-one/vouchersApiKeyAuthBuat voucher
Scope `vouchers:create`.
Respons
/all-in-one/vouchers/validateApiKeyAuthValidasi voucher
Scope `vouchers:read`.
Respons
/all-in-one/vouchers/{id}ApiKeyAuthDetail voucher
Scope `vouchers:read`.
Parameter
Respons
/all-in-one/vouchers/{id}ApiKeyAuthUbah voucher
Scope `vouchers:update`.
Parameter
Respons
/all-in-one/vouchers/{id}ApiKeyAuthHapus voucher
Scope `vouchers:delete`.
Parameter
Respons
/all-in-one/servicesApiKeyAuthDaftar layanan (service catalog)
Scope `services:read`.
Respons
/all-in-one/servicesApiKeyAuthBuat layanan
Scope `services:create`.
Respons
/all-in-one/services/{id}ApiKeyAuthUbah layanan
Scope `services:update`.
Parameter
Respons
/all-in-one/services/{id}ApiKeyAuthHapus layanan
Scope `services:delete`.
Parameter
Respons
/all-in-one/bookingsApiKeyAuthDaftar booking
Scope `bookings:read`.
Respons
/all-in-one/bookings/{id}ApiKeyAuthDetail booking
Scope `bookings:read`.
Parameter
Respons
/all-in-one/bookings/{id}/statusApiKeyAuthUbah status booking
Scope `bookings:update`.
Parameter
Respons
/all-in-one/bookings/{id}/cancelApiKeyAuthBatalkan booking
Scope `bookings:update`.
Parameter
Respons
/all-in-one/conversationsApiKeyAuthDaftar percakapan (inbox)
Scope `conversations:read`.
Respons
/all-in-one/conversations/{id}ApiKeyAuthDetail percakapan
Scope `conversations:read`.
Parameter
Respons
/all-in-one/conversations/{id}/messagesApiKeyAuthPesan dalam percakapan
Scope `conversations:read`.
Parameter
Respons
/all-in-one/conversations/{id}/replyApiKeyAuthBalas percakapan
Scope `conversations:create` atau `conversations:update`.
Parameter
Body (wajib)
Respons
/all-in-one/article-gen/generateApiKeyAuthBuat antrian generate artikel AI
Scope `article_gen`. Menerima project_id atau daftar keywords langsung untuk generate artikel SEO otomatis.
Body (wajib)
Respons
/all-in-one/article-gen/batches/{id}ApiKeyAuthStatus dan progres antrian batch artikel
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/batches/{id}/articlesApiKeyAuthDaftar artikel dalam batch
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/articles/{id}ApiKeyAuthDetail artikel hasil generate
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/estimateApiKeyAuthEstimasi biaya dan kuota artikel
Scope `article_gen`.
Body (wajib)
Respons
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:
/all-in-one/accountApiKeyAuthBaca detail akun merchant
Identitas, langganan, saldo token, statistik. Scope `account:read`.
Respons
/all-in-one/mediaApiKeyAuthDaftar 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
Respons
/all-in-one/otp/sendApiKeyAuthKirim OTP
Scope `otp:send`.
Body (wajib)
Respons
/all-in-one/otp/verifyApiKeyAuthVerifikasi OTP
Scope `otp:send`.
Body (wajib)
Respons
/all-in-one/rag/queryApiKeyAuthQuery 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)
Respons
/all-in-one/notify/sendApiKeyAuthKirim notifikasi multi-kanal
Scope `notify:send`.
Body (wajib)
Respons
/all-in-one/messages/sendApiKeyAuthKirim pesan WhatsApp ke satu nomor
Scope `messages:send`.
Body (wajib)
Respons
/all-in-one/webhookApiKeyAuthTerima event webhook masuk (dua arah)
Menyimpan event ke inbox tenant. Scope `webhook:receive`.
Body (opsional)
Respons
/all-in-one/wa/instancesApiKeyAuthDaftar 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`.
Respons
/all-in-one/wa/instancesApiKeyAuthTambah 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)
Respons
/all-in-one/wa/instances/{id}/qrApiKeyAuthAmbil 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
Respons
/all-in-one/wa/instances/{id}/restartApiKeyAuthRestart koneksi sesi WhatsApp
Scope `wa:manage`. Rate-limited (SensitiveLimit).
Parameter
Respons
/all-in-one/wa/instances/{id}ApiKeyAuthHapus instance WhatsApp
Memutus dan menghapus instance. Scope `wa:manage`. Rate-limited (SensitiveLimit).
Parameter
Respons
/all-in-one/billing/balanceApiKeyAuthLihat saldo token
Scope `billing:read`.
Respons
/all-in-one/billing/transactionsApiKeyAuthRiwayat transaksi token
Scope `billing:read`.
Respons
/all-in-one/billing/invoicesApiKeyAuthDaftar invoice
Scope `billing:read`.
Respons
/all-in-one/billing/topupApiKeyAuthTopup 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
Body (wajib)
Respons
/all-in-one/productsApiKeyAuthDaftar produk
Scope `products:read`.
Respons
/all-in-one/productsApiKeyAuthBuat produk
Scope `products:create`.
Respons
/all-in-one/products/{id}ApiKeyAuthUbah produk
Scope `products:update`.
Parameter
Respons
/all-in-one/products/{id}ApiKeyAuthHapus produk
Scope `products:delete`.
Parameter
Respons
/all-in-one/ordersApiKeyAuthDaftar pesanan
Scope `orders:read`.
Respons
/all-in-one/ordersApiKeyAuthBuat pesanan
Scope `orders:create`.
Respons
/all-in-one/orders/{id}ApiKeyAuthDetail pesanan
Scope `orders:read`.
Parameter
Respons
/all-in-one/orders/{id}/statusApiKeyAuthUbah status pesanan
Scope `orders:update`.
Parameter
Respons
/all-in-one/customersApiKeyAuthDaftar pelanggan
Scope `customers:read`.
Respons
/all-in-one/customers/{id}ApiKeyAuthDetail pelanggan
Scope `customers:read`.
Parameter
Respons
/all-in-one/customers/{id}ApiKeyAuthUbah pelanggan
Scope `customers:update`.
Parameter
Respons
/all-in-one/vouchersApiKeyAuthDaftar voucher
Scope `vouchers:read`.
Respons
/all-in-one/vouchersApiKeyAuthBuat voucher
Scope `vouchers:create`.
Respons
/all-in-one/vouchers/validateApiKeyAuthValidasi voucher
Scope `vouchers:read`.
Respons
/all-in-one/vouchers/{id}ApiKeyAuthDetail voucher
Scope `vouchers:read`.
Parameter
Respons
/all-in-one/vouchers/{id}ApiKeyAuthUbah voucher
Scope `vouchers:update`.
Parameter
Respons
/all-in-one/vouchers/{id}ApiKeyAuthHapus voucher
Scope `vouchers:delete`.
Parameter
Respons
/all-in-one/servicesApiKeyAuthDaftar layanan (service catalog)
Scope `services:read`.
Respons
/all-in-one/servicesApiKeyAuthBuat layanan
Scope `services:create`.
Respons
/all-in-one/services/{id}ApiKeyAuthUbah layanan
Scope `services:update`.
Parameter
Respons
/all-in-one/services/{id}ApiKeyAuthHapus layanan
Scope `services:delete`.
Parameter
Respons
/all-in-one/bookingsApiKeyAuthDaftar booking
Scope `bookings:read`.
Respons
/all-in-one/bookings/{id}ApiKeyAuthDetail booking
Scope `bookings:read`.
Parameter
Respons
/all-in-one/bookings/{id}/statusApiKeyAuthUbah status booking
Scope `bookings:update`.
Parameter
Respons
/all-in-one/bookings/{id}/cancelApiKeyAuthBatalkan booking
Scope `bookings:update`.
Parameter
Respons
/all-in-one/conversationsApiKeyAuthDaftar percakapan (inbox)
Scope `conversations:read`.
Respons
/all-in-one/conversations/{id}ApiKeyAuthDetail percakapan
Scope `conversations:read`.
Parameter
Respons
/all-in-one/conversations/{id}/messagesApiKeyAuthPesan dalam percakapan
Scope `conversations:read`.
Parameter
Respons
/all-in-one/conversations/{id}/replyApiKeyAuthBalas percakapan
Scope `conversations:create` atau `conversations:update`.
Parameter
Body (wajib)
Respons
/all-in-one/article-gen/generateApiKeyAuthBuat antrian generate artikel AI
Scope `article_gen`. Menerima project_id atau daftar keywords langsung untuk generate artikel SEO otomatis.
Body (wajib)
Respons
/all-in-one/article-gen/batches/{id}ApiKeyAuthStatus dan progres antrian batch artikel
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/batches/{id}/articlesApiKeyAuthDaftar artikel dalam batch
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/articles/{id}ApiKeyAuthDetail artikel hasil generate
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/estimateApiKeyAuthEstimasi biaya dan kuota artikel
Scope `article_gen`.
Body (wajib)
Respons
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.
/all-in-one/accountApiKeyAuthBaca detail akun merchant
Identitas, langganan, saldo token, statistik. Scope `account:read`.
Respons
/all-in-one/mediaApiKeyAuthDaftar 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
Respons
/all-in-one/otp/sendApiKeyAuthKirim OTP
Scope `otp:send`.
Body (wajib)
Respons
/all-in-one/otp/verifyApiKeyAuthVerifikasi OTP
Scope `otp:send`.
Body (wajib)
Respons
/all-in-one/rag/queryApiKeyAuthQuery 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)
Respons
/all-in-one/notify/sendApiKeyAuthKirim notifikasi multi-kanal
Scope `notify:send`.
Body (wajib)
Respons
/all-in-one/messages/sendApiKeyAuthKirim pesan WhatsApp ke satu nomor
Scope `messages:send`.
Body (wajib)
Respons
/all-in-one/webhookApiKeyAuthTerima event webhook masuk (dua arah)
Menyimpan event ke inbox tenant. Scope `webhook:receive`.
Body (opsional)
Respons
/all-in-one/wa/instancesApiKeyAuthDaftar 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`.
Respons
/all-in-one/wa/instancesApiKeyAuthTambah 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)
Respons
/all-in-one/wa/instances/{id}/qrApiKeyAuthAmbil 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
Respons
/all-in-one/wa/instances/{id}/restartApiKeyAuthRestart koneksi sesi WhatsApp
Scope `wa:manage`. Rate-limited (SensitiveLimit).
Parameter
Respons
/all-in-one/wa/instances/{id}ApiKeyAuthHapus instance WhatsApp
Memutus dan menghapus instance. Scope `wa:manage`. Rate-limited (SensitiveLimit).
Parameter
Respons
/all-in-one/billing/balanceApiKeyAuthLihat saldo token
Scope `billing:read`.
Respons
/all-in-one/billing/transactionsApiKeyAuthRiwayat transaksi token
Scope `billing:read`.
Respons
/all-in-one/billing/invoicesApiKeyAuthDaftar invoice
Scope `billing:read`.
Respons
/all-in-one/billing/topupApiKeyAuthTopup 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
Body (wajib)
Respons
/all-in-one/productsApiKeyAuthDaftar produk
Scope `products:read`.
Respons
/all-in-one/productsApiKeyAuthBuat produk
Scope `products:create`.
Respons
/all-in-one/products/{id}ApiKeyAuthUbah produk
Scope `products:update`.
Parameter
Respons
/all-in-one/products/{id}ApiKeyAuthHapus produk
Scope `products:delete`.
Parameter
Respons
/all-in-one/ordersApiKeyAuthDaftar pesanan
Scope `orders:read`.
Respons
/all-in-one/ordersApiKeyAuthBuat pesanan
Scope `orders:create`.
Respons
/all-in-one/orders/{id}ApiKeyAuthDetail pesanan
Scope `orders:read`.
Parameter
Respons
/all-in-one/orders/{id}/statusApiKeyAuthUbah status pesanan
Scope `orders:update`.
Parameter
Respons
/all-in-one/customersApiKeyAuthDaftar pelanggan
Scope `customers:read`.
Respons
/all-in-one/customers/{id}ApiKeyAuthDetail pelanggan
Scope `customers:read`.
Parameter
Respons
/all-in-one/customers/{id}ApiKeyAuthUbah pelanggan
Scope `customers:update`.
Parameter
Respons
/all-in-one/vouchersApiKeyAuthDaftar voucher
Scope `vouchers:read`.
Respons
/all-in-one/vouchersApiKeyAuthBuat voucher
Scope `vouchers:create`.
Respons
/all-in-one/vouchers/validateApiKeyAuthValidasi voucher
Scope `vouchers:read`.
Respons
/all-in-one/vouchers/{id}ApiKeyAuthDetail voucher
Scope `vouchers:read`.
Parameter
Respons
/all-in-one/vouchers/{id}ApiKeyAuthUbah voucher
Scope `vouchers:update`.
Parameter
Respons
/all-in-one/vouchers/{id}ApiKeyAuthHapus voucher
Scope `vouchers:delete`.
Parameter
Respons
/all-in-one/servicesApiKeyAuthDaftar layanan (service catalog)
Scope `services:read`.
Respons
/all-in-one/servicesApiKeyAuthBuat layanan
Scope `services:create`.
Respons
/all-in-one/services/{id}ApiKeyAuthUbah layanan
Scope `services:update`.
Parameter
Respons
/all-in-one/services/{id}ApiKeyAuthHapus layanan
Scope `services:delete`.
Parameter
Respons
/all-in-one/bookingsApiKeyAuthDaftar booking
Scope `bookings:read`.
Respons
/all-in-one/bookings/{id}ApiKeyAuthDetail booking
Scope `bookings:read`.
Parameter
Respons
/all-in-one/bookings/{id}/statusApiKeyAuthUbah status booking
Scope `bookings:update`.
Parameter
Respons
/all-in-one/bookings/{id}/cancelApiKeyAuthBatalkan booking
Scope `bookings:update`.
Parameter
Respons
/all-in-one/conversationsApiKeyAuthDaftar percakapan (inbox)
Scope `conversations:read`.
Respons
/all-in-one/conversations/{id}ApiKeyAuthDetail percakapan
Scope `conversations:read`.
Parameter
Respons
/all-in-one/conversations/{id}/messagesApiKeyAuthPesan dalam percakapan
Scope `conversations:read`.
Parameter
Respons
/all-in-one/conversations/{id}/replyApiKeyAuthBalas percakapan
Scope `conversations:create` atau `conversations:update`.
Parameter
Body (wajib)
Respons
/all-in-one/article-gen/generateApiKeyAuthBuat antrian generate artikel AI
Scope `article_gen`. Menerima project_id atau daftar keywords langsung untuk generate artikel SEO otomatis.
Body (wajib)
Respons
/all-in-one/article-gen/batches/{id}ApiKeyAuthStatus dan progres antrian batch artikel
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/batches/{id}/articlesApiKeyAuthDaftar artikel dalam batch
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/articles/{id}ApiKeyAuthDetail artikel hasil generate
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/estimateApiKeyAuthEstimasi biaya dan kuota artikel
Scope `article_gen`.
Body (wajib)
Respons
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):
{
"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.
/all-in-one/accountApiKeyAuthBaca detail akun merchant
Identitas, langganan, saldo token, statistik. Scope `account:read`.
Respons
/all-in-one/mediaApiKeyAuthDaftar 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
Respons
/all-in-one/otp/sendApiKeyAuthKirim OTP
Scope `otp:send`.
Body (wajib)
Respons
/all-in-one/otp/verifyApiKeyAuthVerifikasi OTP
Scope `otp:send`.
Body (wajib)
Respons
/all-in-one/rag/queryApiKeyAuthQuery 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)
Respons
/all-in-one/notify/sendApiKeyAuthKirim notifikasi multi-kanal
Scope `notify:send`.
Body (wajib)
Respons
/all-in-one/messages/sendApiKeyAuthKirim pesan WhatsApp ke satu nomor
Scope `messages:send`.
Body (wajib)
Respons
/all-in-one/webhookApiKeyAuthTerima event webhook masuk (dua arah)
Menyimpan event ke inbox tenant. Scope `webhook:receive`.
Body (opsional)
Respons
/all-in-one/wa/instancesApiKeyAuthDaftar 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`.
Respons
/all-in-one/wa/instancesApiKeyAuthTambah 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)
Respons
/all-in-one/wa/instances/{id}/qrApiKeyAuthAmbil 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
Respons
/all-in-one/wa/instances/{id}/restartApiKeyAuthRestart koneksi sesi WhatsApp
Scope `wa:manage`. Rate-limited (SensitiveLimit).
Parameter
Respons
/all-in-one/wa/instances/{id}ApiKeyAuthHapus instance WhatsApp
Memutus dan menghapus instance. Scope `wa:manage`. Rate-limited (SensitiveLimit).
Parameter
Respons
/all-in-one/billing/balanceApiKeyAuthLihat saldo token
Scope `billing:read`.
Respons
/all-in-one/billing/transactionsApiKeyAuthRiwayat transaksi token
Scope `billing:read`.
Respons
/all-in-one/billing/invoicesApiKeyAuthDaftar invoice
Scope `billing:read`.
Respons
/all-in-one/billing/topupApiKeyAuthTopup 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
Body (wajib)
Respons
/all-in-one/productsApiKeyAuthDaftar produk
Scope `products:read`.
Respons
/all-in-one/productsApiKeyAuthBuat produk
Scope `products:create`.
Respons
/all-in-one/products/{id}ApiKeyAuthUbah produk
Scope `products:update`.
Parameter
Respons
/all-in-one/products/{id}ApiKeyAuthHapus produk
Scope `products:delete`.
Parameter
Respons
/all-in-one/ordersApiKeyAuthDaftar pesanan
Scope `orders:read`.
Respons
/all-in-one/ordersApiKeyAuthBuat pesanan
Scope `orders:create`.
Respons
/all-in-one/orders/{id}ApiKeyAuthDetail pesanan
Scope `orders:read`.
Parameter
Respons
/all-in-one/orders/{id}/statusApiKeyAuthUbah status pesanan
Scope `orders:update`.
Parameter
Respons
/all-in-one/customersApiKeyAuthDaftar pelanggan
Scope `customers:read`.
Respons
/all-in-one/customers/{id}ApiKeyAuthDetail pelanggan
Scope `customers:read`.
Parameter
Respons
/all-in-one/customers/{id}ApiKeyAuthUbah pelanggan
Scope `customers:update`.
Parameter
Respons
/all-in-one/vouchersApiKeyAuthDaftar voucher
Scope `vouchers:read`.
Respons
/all-in-one/vouchersApiKeyAuthBuat voucher
Scope `vouchers:create`.
Respons
/all-in-one/vouchers/validateApiKeyAuthValidasi voucher
Scope `vouchers:read`.
Respons
/all-in-one/vouchers/{id}ApiKeyAuthDetail voucher
Scope `vouchers:read`.
Parameter
Respons
/all-in-one/vouchers/{id}ApiKeyAuthUbah voucher
Scope `vouchers:update`.
Parameter
Respons
/all-in-one/vouchers/{id}ApiKeyAuthHapus voucher
Scope `vouchers:delete`.
Parameter
Respons
/all-in-one/servicesApiKeyAuthDaftar layanan (service catalog)
Scope `services:read`.
Respons
/all-in-one/servicesApiKeyAuthBuat layanan
Scope `services:create`.
Respons
/all-in-one/services/{id}ApiKeyAuthUbah layanan
Scope `services:update`.
Parameter
Respons
/all-in-one/services/{id}ApiKeyAuthHapus layanan
Scope `services:delete`.
Parameter
Respons
/all-in-one/bookingsApiKeyAuthDaftar booking
Scope `bookings:read`.
Respons
/all-in-one/bookings/{id}ApiKeyAuthDetail booking
Scope `bookings:read`.
Parameter
Respons
/all-in-one/bookings/{id}/statusApiKeyAuthUbah status booking
Scope `bookings:update`.
Parameter
Respons
/all-in-one/bookings/{id}/cancelApiKeyAuthBatalkan booking
Scope `bookings:update`.
Parameter
Respons
/all-in-one/conversationsApiKeyAuthDaftar percakapan (inbox)
Scope `conversations:read`.
Respons
/all-in-one/conversations/{id}ApiKeyAuthDetail percakapan
Scope `conversations:read`.
Parameter
Respons
/all-in-one/conversations/{id}/messagesApiKeyAuthPesan dalam percakapan
Scope `conversations:read`.
Parameter
Respons
/all-in-one/conversations/{id}/replyApiKeyAuthBalas percakapan
Scope `conversations:create` atau `conversations:update`.
Parameter
Body (wajib)
Respons
/all-in-one/article-gen/generateApiKeyAuthBuat antrian generate artikel AI
Scope `article_gen`. Menerima project_id atau daftar keywords langsung untuk generate artikel SEO otomatis.
Body (wajib)
Respons
/all-in-one/article-gen/batches/{id}ApiKeyAuthStatus dan progres antrian batch artikel
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/batches/{id}/articlesApiKeyAuthDaftar artikel dalam batch
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/articles/{id}ApiKeyAuthDetail artikel hasil generate
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/estimateApiKeyAuthEstimasi biaya dan kuota artikel
Scope `article_gen`.
Body (wajib)
Respons
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):
{
"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.
/all-in-one/accountApiKeyAuthBaca detail akun merchant
Identitas, langganan, saldo token, statistik. Scope `account:read`.
Respons
/all-in-one/mediaApiKeyAuthDaftar 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
Respons
/all-in-one/otp/sendApiKeyAuthKirim OTP
Scope `otp:send`.
Body (wajib)
Respons
/all-in-one/otp/verifyApiKeyAuthVerifikasi OTP
Scope `otp:send`.
Body (wajib)
Respons
/all-in-one/rag/queryApiKeyAuthQuery 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)
Respons
/all-in-one/notify/sendApiKeyAuthKirim notifikasi multi-kanal
Scope `notify:send`.
Body (wajib)
Respons
/all-in-one/messages/sendApiKeyAuthKirim pesan WhatsApp ke satu nomor
Scope `messages:send`.
Body (wajib)
Respons
/all-in-one/webhookApiKeyAuthTerima event webhook masuk (dua arah)
Menyimpan event ke inbox tenant. Scope `webhook:receive`.
Body (opsional)
Respons
/all-in-one/wa/instancesApiKeyAuthDaftar 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`.
Respons
/all-in-one/wa/instancesApiKeyAuthTambah 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)
Respons
/all-in-one/wa/instances/{id}/qrApiKeyAuthAmbil 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
Respons
/all-in-one/wa/instances/{id}/restartApiKeyAuthRestart koneksi sesi WhatsApp
Scope `wa:manage`. Rate-limited (SensitiveLimit).
Parameter
Respons
/all-in-one/wa/instances/{id}ApiKeyAuthHapus instance WhatsApp
Memutus dan menghapus instance. Scope `wa:manage`. Rate-limited (SensitiveLimit).
Parameter
Respons
/all-in-one/billing/balanceApiKeyAuthLihat saldo token
Scope `billing:read`.
Respons
/all-in-one/billing/transactionsApiKeyAuthRiwayat transaksi token
Scope `billing:read`.
Respons
/all-in-one/billing/invoicesApiKeyAuthDaftar invoice
Scope `billing:read`.
Respons
/all-in-one/billing/topupApiKeyAuthTopup 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
Body (wajib)
Respons
/all-in-one/productsApiKeyAuthDaftar produk
Scope `products:read`.
Respons
/all-in-one/productsApiKeyAuthBuat produk
Scope `products:create`.
Respons
/all-in-one/products/{id}ApiKeyAuthUbah produk
Scope `products:update`.
Parameter
Respons
/all-in-one/products/{id}ApiKeyAuthHapus produk
Scope `products:delete`.
Parameter
Respons
/all-in-one/ordersApiKeyAuthDaftar pesanan
Scope `orders:read`.
Respons
/all-in-one/ordersApiKeyAuthBuat pesanan
Scope `orders:create`.
Respons
/all-in-one/orders/{id}ApiKeyAuthDetail pesanan
Scope `orders:read`.
Parameter
Respons
/all-in-one/orders/{id}/statusApiKeyAuthUbah status pesanan
Scope `orders:update`.
Parameter
Respons
/all-in-one/customersApiKeyAuthDaftar pelanggan
Scope `customers:read`.
Respons
/all-in-one/customers/{id}ApiKeyAuthDetail pelanggan
Scope `customers:read`.
Parameter
Respons
/all-in-one/customers/{id}ApiKeyAuthUbah pelanggan
Scope `customers:update`.
Parameter
Respons
/all-in-one/vouchersApiKeyAuthDaftar voucher
Scope `vouchers:read`.
Respons
/all-in-one/vouchersApiKeyAuthBuat voucher
Scope `vouchers:create`.
Respons
/all-in-one/vouchers/validateApiKeyAuthValidasi voucher
Scope `vouchers:read`.
Respons
/all-in-one/vouchers/{id}ApiKeyAuthDetail voucher
Scope `vouchers:read`.
Parameter
Respons
/all-in-one/vouchers/{id}ApiKeyAuthUbah voucher
Scope `vouchers:update`.
Parameter
Respons
/all-in-one/vouchers/{id}ApiKeyAuthHapus voucher
Scope `vouchers:delete`.
Parameter
Respons
/all-in-one/servicesApiKeyAuthDaftar layanan (service catalog)
Scope `services:read`.
Respons
/all-in-one/servicesApiKeyAuthBuat layanan
Scope `services:create`.
Respons
/all-in-one/services/{id}ApiKeyAuthUbah layanan
Scope `services:update`.
Parameter
Respons
/all-in-one/services/{id}ApiKeyAuthHapus layanan
Scope `services:delete`.
Parameter
Respons
/all-in-one/bookingsApiKeyAuthDaftar booking
Scope `bookings:read`.
Respons
/all-in-one/bookings/{id}ApiKeyAuthDetail booking
Scope `bookings:read`.
Parameter
Respons
/all-in-one/bookings/{id}/statusApiKeyAuthUbah status booking
Scope `bookings:update`.
Parameter
Respons
/all-in-one/bookings/{id}/cancelApiKeyAuthBatalkan booking
Scope `bookings:update`.
Parameter
Respons
/all-in-one/conversationsApiKeyAuthDaftar percakapan (inbox)
Scope `conversations:read`.
Respons
/all-in-one/conversations/{id}ApiKeyAuthDetail percakapan
Scope `conversations:read`.
Parameter
Respons
/all-in-one/conversations/{id}/messagesApiKeyAuthPesan dalam percakapan
Scope `conversations:read`.
Parameter
Respons
/all-in-one/conversations/{id}/replyApiKeyAuthBalas percakapan
Scope `conversations:create` atau `conversations:update`.
Parameter
Body (wajib)
Respons
/all-in-one/article-gen/generateApiKeyAuthBuat antrian generate artikel AI
Scope `article_gen`. Menerima project_id atau daftar keywords langsung untuk generate artikel SEO otomatis.
Body (wajib)
Respons
/all-in-one/article-gen/batches/{id}ApiKeyAuthStatus dan progres antrian batch artikel
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/batches/{id}/articlesApiKeyAuthDaftar artikel dalam batch
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/articles/{id}ApiKeyAuthDetail artikel hasil generate
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/estimateApiKeyAuthEstimasi biaya dan kuota artikel
Scope `article_gen`.
Body (wajib)
Respons
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):
{
"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.
/all-in-one/accountApiKeyAuthBaca detail akun merchant
Identitas, langganan, saldo token, statistik. Scope `account:read`.
Respons
/all-in-one/mediaApiKeyAuthDaftar 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
Respons
/all-in-one/otp/sendApiKeyAuthKirim OTP
Scope `otp:send`.
Body (wajib)
Respons
/all-in-one/otp/verifyApiKeyAuthVerifikasi OTP
Scope `otp:send`.
Body (wajib)
Respons
/all-in-one/rag/queryApiKeyAuthQuery 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)
Respons
/all-in-one/notify/sendApiKeyAuthKirim notifikasi multi-kanal
Scope `notify:send`.
Body (wajib)
Respons
/all-in-one/messages/sendApiKeyAuthKirim pesan WhatsApp ke satu nomor
Scope `messages:send`.
Body (wajib)
Respons
/all-in-one/webhookApiKeyAuthTerima event webhook masuk (dua arah)
Menyimpan event ke inbox tenant. Scope `webhook:receive`.
Body (opsional)
Respons
/all-in-one/wa/instancesApiKeyAuthDaftar 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`.
Respons
/all-in-one/wa/instancesApiKeyAuthTambah 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)
Respons
/all-in-one/wa/instances/{id}/qrApiKeyAuthAmbil 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
Respons
/all-in-one/wa/instances/{id}/restartApiKeyAuthRestart koneksi sesi WhatsApp
Scope `wa:manage`. Rate-limited (SensitiveLimit).
Parameter
Respons
/all-in-one/wa/instances/{id}ApiKeyAuthHapus instance WhatsApp
Memutus dan menghapus instance. Scope `wa:manage`. Rate-limited (SensitiveLimit).
Parameter
Respons
/all-in-one/billing/balanceApiKeyAuthLihat saldo token
Scope `billing:read`.
Respons
/all-in-one/billing/transactionsApiKeyAuthRiwayat transaksi token
Scope `billing:read`.
Respons
/all-in-one/billing/invoicesApiKeyAuthDaftar invoice
Scope `billing:read`.
Respons
/all-in-one/billing/topupApiKeyAuthTopup 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
Body (wajib)
Respons
/all-in-one/productsApiKeyAuthDaftar produk
Scope `products:read`.
Respons
/all-in-one/productsApiKeyAuthBuat produk
Scope `products:create`.
Respons
/all-in-one/products/{id}ApiKeyAuthUbah produk
Scope `products:update`.
Parameter
Respons
/all-in-one/products/{id}ApiKeyAuthHapus produk
Scope `products:delete`.
Parameter
Respons
/all-in-one/ordersApiKeyAuthDaftar pesanan
Scope `orders:read`.
Respons
/all-in-one/ordersApiKeyAuthBuat pesanan
Scope `orders:create`.
Respons
/all-in-one/orders/{id}ApiKeyAuthDetail pesanan
Scope `orders:read`.
Parameter
Respons
/all-in-one/orders/{id}/statusApiKeyAuthUbah status pesanan
Scope `orders:update`.
Parameter
Respons
/all-in-one/customersApiKeyAuthDaftar pelanggan
Scope `customers:read`.
Respons
/all-in-one/customers/{id}ApiKeyAuthDetail pelanggan
Scope `customers:read`.
Parameter
Respons
/all-in-one/customers/{id}ApiKeyAuthUbah pelanggan
Scope `customers:update`.
Parameter
Respons
/all-in-one/vouchersApiKeyAuthDaftar voucher
Scope `vouchers:read`.
Respons
/all-in-one/vouchersApiKeyAuthBuat voucher
Scope `vouchers:create`.
Respons
/all-in-one/vouchers/validateApiKeyAuthValidasi voucher
Scope `vouchers:read`.
Respons
/all-in-one/vouchers/{id}ApiKeyAuthDetail voucher
Scope `vouchers:read`.
Parameter
Respons
/all-in-one/vouchers/{id}ApiKeyAuthUbah voucher
Scope `vouchers:update`.
Parameter
Respons
/all-in-one/vouchers/{id}ApiKeyAuthHapus voucher
Scope `vouchers:delete`.
Parameter
Respons
/all-in-one/servicesApiKeyAuthDaftar layanan (service catalog)
Scope `services:read`.
Respons
/all-in-one/servicesApiKeyAuthBuat layanan
Scope `services:create`.
Respons
/all-in-one/services/{id}ApiKeyAuthUbah layanan
Scope `services:update`.
Parameter
Respons
/all-in-one/services/{id}ApiKeyAuthHapus layanan
Scope `services:delete`.
Parameter
Respons
/all-in-one/bookingsApiKeyAuthDaftar booking
Scope `bookings:read`.
Respons
/all-in-one/bookings/{id}ApiKeyAuthDetail booking
Scope `bookings:read`.
Parameter
Respons
/all-in-one/bookings/{id}/statusApiKeyAuthUbah status booking
Scope `bookings:update`.
Parameter
Respons
/all-in-one/bookings/{id}/cancelApiKeyAuthBatalkan booking
Scope `bookings:update`.
Parameter
Respons
/all-in-one/conversationsApiKeyAuthDaftar percakapan (inbox)
Scope `conversations:read`.
Respons
/all-in-one/conversations/{id}ApiKeyAuthDetail percakapan
Scope `conversations:read`.
Parameter
Respons
/all-in-one/conversations/{id}/messagesApiKeyAuthPesan dalam percakapan
Scope `conversations:read`.
Parameter
Respons
/all-in-one/conversations/{id}/replyApiKeyAuthBalas percakapan
Scope `conversations:create` atau `conversations:update`.
Parameter
Body (wajib)
Respons
/all-in-one/article-gen/generateApiKeyAuthBuat antrian generate artikel AI
Scope `article_gen`. Menerima project_id atau daftar keywords langsung untuk generate artikel SEO otomatis.
Body (wajib)
Respons
/all-in-one/article-gen/batches/{id}ApiKeyAuthStatus dan progres antrian batch artikel
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/batches/{id}/articlesApiKeyAuthDaftar artikel dalam batch
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/articles/{id}ApiKeyAuthDetail artikel hasil generate
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/estimateApiKeyAuthEstimasi biaya dan kuota artikel
Scope `article_gen`.
Body (wajib)
Respons
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.
/all-in-one/accountApiKeyAuthBaca detail akun merchant
Identitas, langganan, saldo token, statistik. Scope `account:read`.
Respons
/all-in-one/mediaApiKeyAuthDaftar 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
Respons
/all-in-one/otp/sendApiKeyAuthKirim OTP
Scope `otp:send`.
Body (wajib)
Respons
/all-in-one/otp/verifyApiKeyAuthVerifikasi OTP
Scope `otp:send`.
Body (wajib)
Respons
/all-in-one/rag/queryApiKeyAuthQuery 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)
Respons
/all-in-one/notify/sendApiKeyAuthKirim notifikasi multi-kanal
Scope `notify:send`.
Body (wajib)
Respons
/all-in-one/messages/sendApiKeyAuthKirim pesan WhatsApp ke satu nomor
Scope `messages:send`.
Body (wajib)
Respons
/all-in-one/webhookApiKeyAuthTerima event webhook masuk (dua arah)
Menyimpan event ke inbox tenant. Scope `webhook:receive`.
Body (opsional)
Respons
/all-in-one/wa/instancesApiKeyAuthDaftar 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`.
Respons
/all-in-one/wa/instancesApiKeyAuthTambah 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)
Respons
/all-in-one/wa/instances/{id}/qrApiKeyAuthAmbil 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
Respons
/all-in-one/wa/instances/{id}/restartApiKeyAuthRestart koneksi sesi WhatsApp
Scope `wa:manage`. Rate-limited (SensitiveLimit).
Parameter
Respons
/all-in-one/wa/instances/{id}ApiKeyAuthHapus instance WhatsApp
Memutus dan menghapus instance. Scope `wa:manage`. Rate-limited (SensitiveLimit).
Parameter
Respons
/all-in-one/billing/balanceApiKeyAuthLihat saldo token
Scope `billing:read`.
Respons
/all-in-one/billing/transactionsApiKeyAuthRiwayat transaksi token
Scope `billing:read`.
Respons
/all-in-one/billing/invoicesApiKeyAuthDaftar invoice
Scope `billing:read`.
Respons
/all-in-one/billing/topupApiKeyAuthTopup 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
Body (wajib)
Respons
/all-in-one/productsApiKeyAuthDaftar produk
Scope `products:read`.
Respons
/all-in-one/productsApiKeyAuthBuat produk
Scope `products:create`.
Respons
/all-in-one/products/{id}ApiKeyAuthUbah produk
Scope `products:update`.
Parameter
Respons
/all-in-one/products/{id}ApiKeyAuthHapus produk
Scope `products:delete`.
Parameter
Respons
/all-in-one/ordersApiKeyAuthDaftar pesanan
Scope `orders:read`.
Respons
/all-in-one/ordersApiKeyAuthBuat pesanan
Scope `orders:create`.
Respons
/all-in-one/orders/{id}ApiKeyAuthDetail pesanan
Scope `orders:read`.
Parameter
Respons
/all-in-one/orders/{id}/statusApiKeyAuthUbah status pesanan
Scope `orders:update`.
Parameter
Respons
/all-in-one/customersApiKeyAuthDaftar pelanggan
Scope `customers:read`.
Respons
/all-in-one/customers/{id}ApiKeyAuthDetail pelanggan
Scope `customers:read`.
Parameter
Respons
/all-in-one/customers/{id}ApiKeyAuthUbah pelanggan
Scope `customers:update`.
Parameter
Respons
/all-in-one/vouchersApiKeyAuthDaftar voucher
Scope `vouchers:read`.
Respons
/all-in-one/vouchersApiKeyAuthBuat voucher
Scope `vouchers:create`.
Respons
/all-in-one/vouchers/validateApiKeyAuthValidasi voucher
Scope `vouchers:read`.
Respons
/all-in-one/vouchers/{id}ApiKeyAuthDetail voucher
Scope `vouchers:read`.
Parameter
Respons
/all-in-one/vouchers/{id}ApiKeyAuthUbah voucher
Scope `vouchers:update`.
Parameter
Respons
/all-in-one/vouchers/{id}ApiKeyAuthHapus voucher
Scope `vouchers:delete`.
Parameter
Respons
/all-in-one/servicesApiKeyAuthDaftar layanan (service catalog)
Scope `services:read`.
Respons
/all-in-one/servicesApiKeyAuthBuat layanan
Scope `services:create`.
Respons
/all-in-one/services/{id}ApiKeyAuthUbah layanan
Scope `services:update`.
Parameter
Respons
/all-in-one/services/{id}ApiKeyAuthHapus layanan
Scope `services:delete`.
Parameter
Respons
/all-in-one/bookingsApiKeyAuthDaftar booking
Scope `bookings:read`.
Respons
/all-in-one/bookings/{id}ApiKeyAuthDetail booking
Scope `bookings:read`.
Parameter
Respons
/all-in-one/bookings/{id}/statusApiKeyAuthUbah status booking
Scope `bookings:update`.
Parameter
Respons
/all-in-one/bookings/{id}/cancelApiKeyAuthBatalkan booking
Scope `bookings:update`.
Parameter
Respons
/all-in-one/conversationsApiKeyAuthDaftar percakapan (inbox)
Scope `conversations:read`.
Respons
/all-in-one/conversations/{id}ApiKeyAuthDetail percakapan
Scope `conversations:read`.
Parameter
Respons
/all-in-one/conversations/{id}/messagesApiKeyAuthPesan dalam percakapan
Scope `conversations:read`.
Parameter
Respons
/all-in-one/conversations/{id}/replyApiKeyAuthBalas percakapan
Scope `conversations:create` atau `conversations:update`.
Parameter
Body (wajib)
Respons
/all-in-one/article-gen/generateApiKeyAuthBuat antrian generate artikel AI
Scope `article_gen`. Menerima project_id atau daftar keywords langsung untuk generate artikel SEO otomatis.
Body (wajib)
Respons
/all-in-one/article-gen/batches/{id}ApiKeyAuthStatus dan progres antrian batch artikel
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/batches/{id}/articlesApiKeyAuthDaftar artikel dalam batch
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/articles/{id}ApiKeyAuthDetail artikel hasil generate
Scope `article_gen`.
Parameter
Respons
/all-in-one/article-gen/estimateApiKeyAuthEstimasi biaya dan kuota artikel
Scope `article_gen`.
Body (wajib)
Respons
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):
{
"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:
- Panggil
GET /all-in-one/article-gen/batches/{id}untuk memantau status antrean (queued->processing->completed). - Panggil
GET /all-in-one/article-gen/batches/{id}/articlesuntuk mengambil daftar seluruh artikel yang dihasilkan dalam batch tersebut. - Panggil
GET /all-in-one/article-gen/articles/{id}untuk membaca konten Markdown, metadata SERP, dan evaluasi 18 parameter SEO artikel secara terperinci. - Apabila parameter
webhook_urldisertakan, server akan mengirimkan eventbatch.completeddengan tanda tangan kriptografisX-DagangBot-Signaturebegitu 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:
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).
- Aturan Pembacaan (General Read Limits): Untuk permintaan berorientasi GET yang tidak merekayasa kondisi data (contohnya pembacaan data klien di rute
/customersatau profil/account), batas atas diletakkan pada rasio 300 kueri per menit per kunci (queries-per-minute / QPM). - Aturan Manipulasi Bebas Biaya (Standard Write Limits): Operasi penulisan wujud logikal seperti perbaruan rincian pesanan
/orders/{id}/statusdibatasi pada 150 request per menit. Hal ini dirancang untuk mencegah potensi kehabisan sumber daya konjungsi penulisan pangkalan data (Database Connection Pool Exhaustion). - 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/senddan 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:
{
"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.
- Klien mengirim pesanan beserta header
Idempotency-Key: uuid-v4-abc. - Middleware backend akan menyandikan kunci tersebut dan menyimpan rekam respon berhasil secara tersembunyi di memori Redis.
- 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.
- 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 Conflictdengan pemberitahuanIdempotency Key Mismatchuntuk 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.
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:
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:
Autentikasi & Otorisasi Kunci
Pahami lebih mendalam cara otorisasi bekerja serta perbedaan arsitektural antara JWT sesi manusia dan All-in-One API Key.
Referensi REST API Publik
Spesifikasi global seluruh rute di luar rute agregat, lengkap dengan definisi beban kerja JSON rinci.
Konfigurasi Webhook Masuk
Pelajari bagaimana sistem eksternal dapat didengarkan (listen) melalui titik akhir AIO spesifik secara terbalik.
Konsep Multi-Tenant Dasar
Dasar keamanan Row Level Security yang melindungi isolasi pembacaan data rute AIO.
