Toko Digital memiliki dua kelompok route:
- route web yang merender halaman Inertia atau file download;
- route API yang mengembalikan JSON atau meneruskan request ke service lain.
Base URL
Gunakan host aplikasi sesuai environment. Contoh lokal:
http://localhost:8000Jangan menyalin host production private ke dokumentasi atau contoh publik.
Grup endpoint
| Grup | Halaman |
|---|---|
| Published storefront | Storefront Routes |
| Preview dan draft | Preview Routes |
| Authentication dan token | Authentication API |
| Shipping | Shipping API |
| Payment status | Payment API |
Middleware dan response
Route web published memakai session/CSRF sesuai konfigurasi Laravel dan sebagian group username memakai resolve.store.username. Route API tidak seluruhnya memakai auth:sanctum atau validate.token; lihat halaman authentication sebelum menganggap endpoint terlindungi.
Response Inertia bukan JSON API envelope. Route API mengembalikan response JSON dari controller atau response upstream yang diteruskan.