API v1

මූලික URL: https://lon.emmaster.io/api/v1. පිවිසුමෙන් ලැබෙන Bearer token එකකින් සත්‍යාපනය කරන්න.

Auth

POST /api/v1/login

curl -X POST https://lon.emmaster.io/api/v1/login \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{\"email\":\"you@example.com\",\"password\":\"secret\",\"device_name\":\"mobile\"}"

POST /api/v1/logout · GET /api/v1/me

curl https://lon.emmaster.io/api/v1/me \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"

Customers

Loans

Collections

Payments

POST /api/v1/payments

curl -X POST https://lon.emmaster.io/api/v1/payments \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"loan_id\":1,\"amount\":1000,\"payment_date\":\"2026-07-31\"}"