授權預覽
在啟用同意動作之前,先解析可信任的 Application 與 Merchant context。
POST /api/partner-auth/preview
此 endpoint 需要已完成 Email 驗證的 Sanctum 登入使用者。eKYC App 會在啟用授權動作之前呼叫它。
JSON body
| 欄位 | 必填 | 說明 |
|---|---|---|
client_id | 是 | 已註冊的 Partner Client ID。 |
redirect_uri | 是 | 與 allowlist 完全相符的 callback URI。 |
scope | 是 | 以空白分隔、非空、且在該 Client 允許範圍內的 scope 清單。 |
200 回應
{
"application": {
"client_id": "sample-app",
"name": "Sample Application",
"environment": "sandbox"
},
"merchant": {
"id": 1,
"slug": "sample-merchant",
"name": "Sample Merchant"
},
"organization": {
"id": 1,
"slug": "sample-organization",
"name": "Sample Organization"
},
"membership_status": "active",
"eligibility": {
"outcome": "manual_review",
"reason_codes": ["active_high_risk_signal"],
"policy_version": "early-access-core-v1",
"decided_at": "2026-07-20T08:30:00+00:00"
}
}
尚未有 membership 時,membership_status 為 not_joined;在該 Merchant 有正式決策之前,eligibility 為 null。Preview 回傳最新的後端 Eligibility;它不會建立 membership、不記錄 consent、不核發 code,也不授予存取。
當 redirect URI 或 scopes 不在 allowlist 中、Organization/Merchant/Client 未啟用或未對應,或既有 membership 非 active 時,請求會失敗。