Nymwell
Markdown 原稿

狀態與錯誤碼

可否註冊

查詢與建議的每個網域都有 available。

欄位值
tier(可註冊時)standard:該結尾的一般價格。premium:註冊局定的較高價格,請告訴使用者。
reason(無法註冊時)見下表
reason意思怎麼做
domain_unavailable已被註冊,或被註冊局保留建議其他名稱
extension_not_supportedNymwell 不賣這個結尾換一個結尾
extension_disallows_registration註冊局暫停受理這個結尾的新註冊換一個結尾

可否註冊只以註冊商的回覆為準;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_progressNymwell 或註冊商處理中幾秒後再查 links.self
blocked在等第三方,例如原註冊商放行轉出稍後再查,告訴使用者可能要幾天
action_required在等使用者(action.type:pay_checkout 付款或 approve_in_console 核准)把 action.url 交給使用者,等他完成前不要一直查
succeeded完成(completed: true)停止
failed沒有完成就結束(completed: true),原因在 error.code 與 error.message告訴使用者,沒有他同意不要重試

訂單狀態

訂單的 status 與對應的 workflow 狀態:

statusworkflow.state
awaiting_paymentaction_required(pay_checkout)
registering、renewing、transferringin_progress
needs_attentionin_progress:註冊商回覆不明確,Nymwell 會先確認再重試,不會重複購買
transfer_pendingblocked:原註冊商通常 5 天內放行
registered、renewed、transferredsucceeded
checkout_expiredfailed:使用者沒有付款,請重新報價
failed_refundedfailed:註冊商拒絕,款項已退回
payment_failedfailed:自動續約無法向保存的卡片扣款
failedfailed

核准(list_approvals、GET /api/v1/approvals):pending 為 action_required(approve_in_console);已核准且套用完成為 succeeded;rejected、expired、cancelled 為 failed。

錯誤碼

errorHTTP怎麼做
authentication_required401需要使用者帳戶:給他 buy_url,或改連 https://nymwell.com/mcp/account
invalid_token、invalid_api_key401重新登入,或請使用者建立新的 key
insufficient_scope403key 缺少這個權限
domain_access_denied403key 的網域允許清單不含這個網域
invalid_domain400請送 example.com 這樣的名稱,不含路徑或 Email
rate_limited429等 retry_after_seconds 秒
domain_unavailable409已被註冊,請換名稱
term_not_available422不提供這個年數,get_tld_info 會列出可選年限
quote_expired、quote_not_active409重新報價
registrant_required409已登入的擁有者到 https://nymwell.com/app/billing/#registrant 填寫網域登記人
registrar_funds_low503暫停購買,沒有任何收費
integration_not_configured503該功能尚未接上,GET /api/v1/status 會顯示目前狀態
registrar_error422 或 502註冊商拒絕(422)或沒有回應(502),沒有任何收費