API issues

API issues are the main cases you can encounter when working with domain names. Each time the domain management is displayed or an action is requested on a particular domain name, an API call is done.

Each case is different and depends on a particular situation. For example:

  • A domain registration can fail because a data provided by the customer doesn’t fulfill the expected syntax
  • A nameserver change can fail because the nameservers provided by the customer are wrong
  • A bug in the module makes the API failing and a deeper debug is needed to understand what is requested by WISECP to the module and what the module requested through the API

Example

Let’s look at the following example:
A domain name is already registered and the client wants to update the whois information. For the administrative contact, he entered several non supported characters in the “Address 2” field:

Whois management with WESECP

Once submitted, an error message is displayed to the user:

Error message

OK but what’s next? How to figure out the problem on your side?

Open the module logs at Tools > Process Logs > Modules Activity Logs and search for “ModifyWhois” or the domain name and “Netim” as module name. We found the following lines:

Module activité log

The first entry from the bottom says that the module entered in the function ModifyWhois. In its detail, we see the parameters provided by the software to the module. There is a lot but the important ones is:

"administrative": {
"Name": "John Doe",
"FirstName": "John",
"LastName": "Doe",
"Company": "",
"Address": "wrong string syntax &e"'(-e_ca)=}$^u*$",
"AddressLine1": "wrong string syntax &e"'(-e_ca)=}$^u*$",
"AddressLine2": null,
"ZipCode": "59160",
"State": "Nord",
"City": "Lille",
"Country": "FR",
"Phone": "123456789",
"Fax": "",
"EMail": "dev-cms@netim.com",
"FaxCountryCode": "",
"PhoneCountryCode": "33"
},

We can see that “Address 2” was provided with “wrong string syntax &e”‘(-e_ca)=}$^u*$”

The response also shows the result of the function as follow:

Response and processed

Ok that’s the good function. Now let’s find the API call that failed. As the entry for the function is the first event, we look at the entries above. The next entry with action name “ModifyWhois **** (contactCreateObj administrative)” says that the module tried to create a new contact through the API with SOAP function contactcreateObj.

But the response was:

E13 : Address : Some characters are not accepted (accents, symbols, ...)

Perfect, we found and confirmed that the issue occurred because the client requested an update of the domain contact information with an address containing non supported characters.