Skip to content

API: api.anhdac.com ​

Mọi request dùng cookie kmx_sid. Client gọi với credentials: "include".

Auth ​

MethodPathMô tả
POST/auth/googleBody { credential } (Google ID token). Tạo phiên, set cookie
GET/auth/me{ user } hoặc { user: null }
POST/auth/logoutGhi thời điểm logout, xóa cookie

Dữ liệu (cần đăng nhập) ​

MethodPathTrả về
GET/api/capabilities{ domains: [{ ..., processes: [] }] }
GET/api/journey{ stages: [] }
GET/api/services{ services: [] }
GET/api/scenarios{ scenarios: [] }
GET/api/params{ params: [] }
PUT/api/:entity/:id{ item }. Entity ∈ processes, journey, services, scenarios, params (id = key)

Các trường sửa được:

EntityTrường
processesname, description, owner, kpi, maturity (1–5), target_maturity (1–5), priority
journeygoal, customer_actions, pain_points, touchpoints[], kpis[], capability_codes[], emotion (1–5)
servicesname, price, duration_min, cogs_pct, mix_pct, description, active
scenariosname, description, technicians, sessions_per_tech_per_day, working_days_per_month, customers_per_month, visits_per_customer, ramp[12]
paramsvalue

Admin ​

MethodPathMô tả
GET/api/admin/logins500 lượt đăng nhập gần nhất
GET/api/admin/changes500 thay đổi gần nhất

Lỗi trả về { error: string } với HTTP 400/401/403/404/500.

KMX Spa · anhdac.com