GoDaddy API - 批量检查域可用性问题

时间:2018-02-03 03:54:49

标签: godaddy-api

我正在尝试根据此处的文档一次检查多个域的可用性:https://developer.godaddy.com/doc#!/_v1_domains/available

POST: https://api.ote-godaddy.com/v1/domains/available
Body
{
  "domains": [
    "domain1.com",
    "domain2.com"
  ],
  "checkType": "fast"
}
Output
{
   "code":"INVALID_BODY",
   "message":"Request body doesn't fulfill schema, see details in `fields`",
   "fields":[
      {
         "message":"does not conform to the 'domain' format, based on pattern: /^[^.]{1,63}(\\.[^.]{1,63})+$/",
         "path":"domain[0]",
         "code":"MISMATCH_FORMAT"
      }
   ]
}

有人知道我的请求有什么问题吗?

谢谢

恰好是预期的身体是一个字符串数组,没有json 身体:'[“a.com”,“b.com”]'

在红宝石中:['a.com', 'b.com'].to_json

1 个答案:

答案 0 :(得分:0)

终结点:

POST v1/domains/available

采用平面数组:

["1","2"...]

不是关联数组:

["domains": ["1","2"...] ]

我希望这可以解决您的问题!