STAYLOOP API · 安省租房核验 API

三个端点,每个都有真实后端。

申请人主动出示、只返回结论不返回文件、每次调用留痕、法规边界写在响应里。Base URL 与本站同源;没有 SDK,用任何 HTTP 客户端即可。

Base https://www.stayloop.ai/api/v1密钥:X-API-Key(compliance 端点不需要)数据库驻加拿大

边界(先读这段)

POST /listings/compliance · 房源合规检查(免费,无需密钥)

确定性规则:押金 ≤ 一个月(RTA s.106)、钥匙押金(O. Reg. 516/06 s.17)、禁宠条款无效(s.14)、申请费 / 宠物押金 / 清洁押金禁止(s.134)。不接受、不存储任何个人信息。规则见 /rules.

curl -X POST https://www.stayloop.ai/api/v1/listings/compliance \
  -H "Content-Type: application/json" \
  -d '{"monthly_rent": 2450, "deposit": 4900, "pets_allowed": "no",
       "description": "Bright 1+1, no pets, $50 application fee"}'

{ "passed": false,
  "findings": [
    { "rule": "RTA-106-deposit-cap", "statute": "RTA s.106(2)", "severity": "block",
      "message": { "zh": "押金 $4,900 超过一个月租金 $2,450。", "en": "Deposit $4,900 exceeds one month's rent $2,450." },
      "url": "https://www.stayloop.ai/rules#RTA-106-deposit-cap" },
    { "rule": "RTA-14-no-pet-clause", ... }, { "rule": "RTA-134-no-fees", ... } ],
  "checked": ["RTA-106-deposit-cap", "OREG516-17-key-deposit", "RTA-14-no-pet-clause", "RTA-134-no-fees"] }

POST /passport/verify · 申请人出示的核验结论

申请人在 Stayloop 的租客护照页生成分享链接,并勾选允许 API 读取的范围(身份 / 银行 / 征信 / 租史)。链接末尾的 token 就是你要传的值。响应只有结论;每次调用写审计并推送通知申请人。

curl -X POST https://www.stayloop.ai/api/v1/passport/verify \
  -H "X-API-Key: sk_trust_..." -H "Content-Type: application/json" \
  -d '{"token": "<from the applicant's share link>", "scopes": ["identity","bank","tenancy"]}'

{ "verified": true, "scopes": ["identity","bank","tenancy"],
  "identity": { "verified": true, "provider": "veriff", "verified_at": "2026-09-20T14:02:11Z" },
  "bank":     { "verified": true, "provider": "flinks", "payroll_monthly_estimate": 5480, "nsf_count_90d": 0 },
  "tenancy":  { "confirmed_tenancies": 1, "rent_records": { "paid": 11, "late": 0 } },
  "issued_by": "applicant", "boundary": { "zh": "...", "en": "..." }, "audited": true }

// 403 when the applicant has not enabled API reads, or none of the requested scopes are shared
// 404 when the token is unknown, expired or revoked

POST /screen · 发起一次筛查(同一条管线)

密钥须绑定一个 Stayloop 房东账号(筛查记在该账号名下、计入其配额)。必须附申请人对 Stayloop 筛查同意文本的接受记录;文件从你的 https 地址抓取(每个 ≤25 MB,最多 14 个)。立即返回 202 与 screening_id,完成后 POST 到你的 webhook。

curl -X POST https://www.stayloop.ai/api/v1/screen \
  -H "X-API-Key: sk_trust_..." -H "Content-Type: application/json" \
  -d '{
    "applicant_name": "Jane Doe", "monthly_rent": 2450, "external_ref": "APP-1042",
    "consent": { "version": "v1-2026-09", "accepted_at": "2026-09-23T10:00:00Z", "typed_name": "Jane Doe" },
    "files": [ { "url": "https://files.example.com/paystub-1.pdf", "kind": "pay_stub" },
               { "url": "https://files.example.com/id.jpg", "kind": "government_id" } ],
    "webhook_url": "https://api.example.com/stayloop/webhook"
  }'

202 { "ok": true, "screening_id": "…", "status": "queued", "files": 2, "webhook": true,
      "report_url": "https://www.stayloop.ai/screening/<id>/report" }

// webhook (X-Stayloop-Event: screening.completed)
{ "screening_id": "…", "external_ref": "APP-1042", "status": "scored", "overall": 74, "tier": "review",
  "hard_gates": [], "report_url": "…/report", "notice_letter_url": "…/notice",
  "boundary": "Score and tier are information for the landlord's own decision — never grounds to decline (OHRC). Not a consumer report." }

错误

401缺少 X-API-Key
403密钥无效 / 停用;或申请人未开放该范围
404token 不存在、过期或已撤销
422缺少同意记录或文件不可抓取
429超过限流(看 Retry-After)

申请密钥或试点:[email protected]。数据来源目录见 /partners.