Understanding API calls and responses

An application program interface (API) is a set of routines, protocols, and tools for building software applications. An API specifies how software components should interact. By assembling a string of components, you can complete tasks without needing to log in to the accounts directly. 

API basics

API is a feature that is available for Enom reseller accounts only. It is a method that can be used to check on domains and services without having to log in to the reseller accounts directly. Currently, we do not have bulk options for API. The actions will impact single services or domains. Resellers must whitelist their IPs to use this feature.

API calls

Once your test API environment is set up, you can run test API commands in the test environment and live API commands in the live environment. Each API command will have parameters that must be met. When in the live environment, ensure that your call reflects a live call and not a test.

To return the desired results, you will need to include all parameters listed as required. The standard parts of the call you will always have to input are:

  • Command = Command name.
  • SLD = Replace the current with the domain you want.
  • TLD = com, net, info, biz, etc.
  • UID = Username/Login ID.
  • PW = Password or your token
  • Responsetype = You have the options of how you'd want to see the results (XML, HTML, or Text).

Note: All activity performed in your test account does not affect your live account. Similarly, any domains registered or services purchased in your test account will not be automatically provisioned.

This is what a call should look like:

https://resellertest.enom.com/interface.asp?command=check&sld=1plus1&tld=tv&uid=resellid&pw=resellpw&responsetype=xml

Reading the response

Once you have created the call, copy and paste it into the URL in a new tab and hit enter to get your response.

A successful call will provide you with the details for the call. An unsuccessful call will give errors specific to the issue.

If we run the check command, as shown above, we will get the following positive response.

Api_calls.png

Errors

When you run an unsuccessful call, the response will provide errors and the error count. In this GetBalance call, we encounter an error that provides the error. Many API error codes can be presented.

You can reach out to support if you need assistance with the error. Have the command and response ready for us to review.

Api_calls0.png

Back to top

Was this article helpful? If not please submit a request here

How helpful was this article?