Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Is The Valid Format For Phone Number Field On GoDaddy Domain Registration API

I have faced an issue on the domain registration API integration which is provided by GoDaddy. I have a reseller account on GoDaddy. When i execute the domain registration API with sample data, the api returns an invalid body message with the below mentioned error for the "phone number" field.

Can anyone help me to fix the issue so that i can move further with the API.

The API url to be used for the registration api is as follows:-

https://api.ote-godaddy.com/v1/domains/purchase

The inputted JSON format raw data content for the contact details part is as follows:

"contactAdmin": {
    "nameFirst": "Raidel",
    "nameMiddle": " ",
    "nameLast": "Arooja",
    "organization": "US IT Company",
    "jobTitle": "Developer",
    "email": "[email protected]",
    "phone": "+1-773-737-4427",
    "fax": "",
    "addressMailing": {
        "address1": "US IT Company",
        "address2": "IL,60015,US",
        "city": "Illinois",
        "state": "IL",
        "postalCode": "60015",
        "country": "US"
    }
}

We have used the valid phone number format for Illinois state in US (+1-773-737-4427). But whenever i execute the API, i got the following error. I have tried different other formats of the phone number which is valid in US. But all the time, the error repeats.

Error data:
{
    "code": "INVALID_BODY",
    "message": "Request body doesn't fulfill schema, see details in `fields`",
    "responseModel": "Error",
    "fields": [{
        "message": "does not conform to the 'phone' format, based on pattern: /^\\+([0-9]){1,3}\\.([0-9]\\ ?){6,14}$/",
        "path": "body.contactAdmin.phone",
        "code": "MISMATCH_FORMAT"
    }]
}

Issues:-

  1. Can anyone confirm the exact format for the phone number field which is valid for the domain registration API as soon as possible?
  2. Confirm one more point - Is the "X-shopper ID" needed for this API is same as customer ID displayed on the reseller account or not?

Ref: https://developer.godaddy.com/doc#!/_v1_domains/purchase/DomainPurchase

like image 942
Sarath Kumar Avatar asked Nov 17 '25 15:11

Sarath Kumar


1 Answers

This format is also being accepted

+1.4242258420
like image 73
muya_ Avatar answered Nov 19 '25 05:11

muya_



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!