2

I am trying to check the availibility of multiple domain at once according to the documentation here : 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"
      }
   ]
}

Would anyone know what's wrong with my request ?

Thank you


It happens that the expected body was a string array, no json body: '["a.com","b.com"]'

In ruby: ['a.com', 'b.com'].to_json

Jamesst20
  • 404
  • 6
  • 21

1 Answers1

0

The endpoint :

POST v1/domains/available

Takes a flat array:

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

Not an associative array:

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

I hope this solves your issue!

Lewis
  • 624
  • 9
  • 16
  • p.s. the checkType variable is a route parameter on this endpoint, not part of the body: `POST v1/domains/available?checkType=FAST` – Lewis May 07 '19 at 10:01