Skip to content

API Reference

The Moria API is a versioned HTTP/JSON API serving the mobile and web frontends. Every endpoint is prefixed with /v1. Authenticated endpoints accept a bearer JWT in the Authorization header or a access_token cookie.

  • Base URL{HOST}/v1 (global prefix in main.ts).
  • Auth — Bearer JWT (Authorization: Bearer <jwt>) or cookie access_token (httpOnly).
  • Content-Typeapplication/json for everything except file uploads (multipart/form-data on /v1/file-manager/*).
  • Success envelope — global ResponseInterceptor wraps the controller return as { status, statusCode, message, data, lang }. status is always "success" for 2xx; lang echoes the resolved response locale (en/id/ar).
  • Error envelope{ message: string | string[], statusCode: number, error: string }.
  • Validation — global ValidationPipe with whitelist: true, forbidNonWhitelisted: true, transform: true. Unknown fields are rejected with 400.
  • Client type — a handful of read endpoints return a different data shape per x-client-type header (web vs mobile). See Client types below.

A subset of read endpoints branch their response data on an optional x-client-type request header:

  • When the header is absent it defaults to mobile; any value other than web/mobile returns 400.
  • x-client-type: mobile (default) → the raw entity shape: flat audit columns (created_at, created_by, updated_at, updated_by, deleted_by), foreign-key ids (*_id), and the stored field values as-is.
  • x-client-type: web → a formatted shape produced by ResponseFormatter: audit fields are nested as created/updated/deleted objects { at, by: { id, first_name, last_name } }, and relations are replaced by hand-picked nested objects (e.g. account, organization, manager, customization, attached documents). Web clients must send x-client-type: web to receive this shape.

The envelope (status/statusCode/message/lang) and the pagination wrapper ({ limit, count, currentPage, totalPages, <collection> }) are identical across both clients — only the per-record shape inside data differs.

Endpoints affected (list + detail reads): Users, Saving Goals, Saving Circles, Charitable Cause, Commodity Financing. Each page shows the concrete web and mobile payloads.

#ModuleEndpointsScope
01Authentication2Basic login / logout
02Onboarding7Organization registration + OTP invite flow
03Organizations5Organization CRUD
04Users8User profile + demographic queries
05Accounts6E-wallet accounts + transfers
06ACL10Role & permission management (admin web)
07Activity Log2User activity audit trail
08File Manager8Presigned read/delete + storage utilities
09Document13User documents + organization official documents
10Saving Goals8Scheduled savings with targets
11Saving Circles8Arisan / rotating savings
12Charitable Cause10Campaign donations (wakaf, sedekah)
13Commodity Financing9Murabahah commodity financing
14Investments14Investment products (sukuk, mutual funds)
15Takaful9Sharia insurance
16Withdrawal1Withdraw to bank account
17Payments2Pay bills from balance
18Payment Gateway3Top-up via Bisabiller/Amdigipay
19Transactions5Cross-product transaction history
20Cards10Issued cards + linked cards
21Category5Master category data
22Location4Address CRUD
23Settings5Global app settings
24Customization4Per-organization theme/branding
25Search3Cross-product search
26Security6Change password, 2FA
27Pools6Internal liquidity pools
28Partner API4API keys for B2B integrators
29Health7Uptime probe + maintenance
30Open-Loop Wallet12Per-user wallet — top-up VA, disbursement, QRIS, e-wallet cash-out (Singapay)

Total: 30 modules · 196 endpoints.