狀態與錯誤碼
可否註冊
查詢與建議的每個網域都有 available。
| 欄位 | 值 |
|---|---|
tier(可註冊時) | standard:該結尾的一般價格。premium:註冊局定的較高價格,請告訴使用者。 |
reason(無法註冊時) | 見下表 |
reason | 意思 | 怎麼做 |
|---|---|---|
domain_ | 已被註冊,或被註冊局保留 | 建議其他名稱 |
extension_ | Nymwell 不賣這個結尾 | 換一個結尾 |
extension_ | 註冊局暫停受理這個結尾的新註冊 | 換一個結尾 |
可否註冊只以註冊商的回覆為準;DNS、WHOIS、RDAP 與 screen_domains 只是初篩。
工作流程(workflow)
需要等人、等付款或等註冊商的操作,都會回傳 workflow:
{
"state": "action_required",
"completed": false,
"action": {"type": "pay_checkout", "url": "https://checkout.stripe.com/…", "message": "Give url to the person; paying is their approval."},
"links": {"self": "https://nymwell.com/api/v1/orders?id=ord_…"}
}
state | 意思 | 怎麼做 |
|---|---|---|
in_ | Nymwell 或註冊商處理中 | 幾秒後再查 links.self |
blocked | 在等第三方,例如原註冊商放行轉出 | 稍後再查,告訴使用者可能要幾天 |
action_ | 在等使用者(action.type:pay_ 付款或 approve_ 核准) | 把 action.url 交給使用者,等他完成前不要一直查 |
succeeded | 完成(completed: true) | 停止 |
failed | 沒有完成就結束(completed: true),原因在 error.code 與 error.message | 告訴使用者,沒有他同意不要重試 |
訂單狀態
訂單的 status 與對應的 workflow 狀態:
status | workflow.state |
|---|---|
awaiting_ | action_(pay_checkout) |
registering、renewing、transferring | in_ |
needs_ | in_:註冊商回覆不明確,Nymwell 會先確認再重試,不會重複購買 |
transfer_ | blocked:原註冊商通常 5 天內放行 |
registered、renewed、transferred | succeeded |
checkout_ | failed:使用者沒有付款,請重新報價 |
failed_ | failed:註冊商拒絕,款項已退回 |
payment_ | failed:自動續約無法向保存的卡片扣款 |
failed | failed |
核准(list_approvals、GET /api/v1/approvals):pending 為 action_required(approve_in_console);已核准且套用完成為 succeeded;rejected、expired、cancelled 為 failed。
錯誤碼
error | HTTP | 怎麼做 |
|---|---|---|
authentication_ | 401 | 需要使用者帳戶:給他 buy_,或改連 https://nymwell.com/mcp/account |
invalid_、invalid_ | 401 | 重新登入,或請使用者建立新的 key |
insufficient_ | 403 | key 缺少這個權限 |
domain_ | 403 | key 的網域允許清單不含這個網域 |
invalid_ | 400 | 請送 example.com 這樣的名稱,不含路徑或 Email |
rate_ | 429 | 等 retry_ 秒 |
domain_ | 409 | 已被註冊,請換名稱 |
term_ | 422 | 不提供這個年數,get_ 會列出可選年限 |
quote_、quote_ | 409 | 重新報價 |
registrant_ | 409 | 已登入的擁有者到 https://nymwell.com/app/billing/#registrant 填寫網域登記人 |
registrar_ | 503 | 暫停購買,沒有任何收費 |
integration_ | 503 | 該功能尚未接上,GET /api/v1/status 會顯示目前狀態 |
registrar_ | 422 或 502 | 註冊商拒絕(422)或沒有回應(502),沒有任何收費 |