API stands for Application Programming Interface. But what does that mean?
Basically, APIs are a way for applications to communicate with each other across the web through specific inputs and outputs. In an abstract way, APIs and webpages have similar functionality. They both take input(s) that get processed on a server, which may or may not involve other APIs or databases, and return data back to the requesting browser.
The difference is that APIs will return data in the form of, typically, XML or JSON with the purpose of being processed behind the scenes, whereas webpages will return data back to the browser and display it in the form of text and images and other familiar webpage components.
With an API, you can build the power of web-based resources – such as expert and proprietary logic coupled with datasets – right into your applications. A programmer can quickly write integration code for a webpage, a desktop application, a script or a phone (or many other devices) that can request information based on a specific set of inputs. Once the application gets the response back it can be processed in several ways, such as formatting and displaying the response back to the screen, or processed with additional logic.
To paint a better picture of how APIs work, let’s use our DOTS Address Validation – US service as an example of a common use case.
Using a data validation API
Consider an organization that is collecting address information on their website in a process where a user signs up for an account. Down the road, this address is going to be used to ship a product or perhaps marketing material to the user. For many reasons, particularly when shipping is involved, it is incredibly important to have the address correct.
In this case, using our address validation API, they will be able to automate the real-time validation of addresses entered in their web form. To start, a developer will add logic to their code that will take the address inputs entered by the user, and package them in a way so they can send that information over to our Address Validation – US API. Then, in a fraction of a second, we will return the results of their address validation along with other important address data points that the service returns.
Depending on the business need, the developer can take our results, add additional logic and/or formatting, and even display the results back to the user in real-time for correction. Or, if the address does not need any additional intervention, allow the user to continue with the process they were following on the webpage, with the confidence that the address provided is correct.
Benefits of APIs
API’s can be used in countless situations to solve small and large problems, some more technical than others. The concept of APIs espouses one of the core tenets of programming which is code reuse.
For example, if an organization wanted to build their own address validation, it would need to become experts in all things address related. Which we can tell you, is a complicated, unregulated, and deeply detailed subject that requires in-depth knowledge of each country’s postal system, nuances and idiosyncrasies. You would likely end up focusing far too much time and resources making it work, while being distracted from your core business.
This is a case where build versus buy is not realistic and, as I discuss in another blog, why recreate the wheel? Our APIs allow organizations to focus on what they are experts in while leveraging our decades of expertise in data validation in simple sub-second calls.
In addition, it is our business to stay on top of the ever-changing validation landscape, constantly performing updates and rolling out improvements. These are automatically delivered simply by being connected to our services.
Good documentation = Easy Integration
Although APIs are generally simple to integrate, they should be accompanied by detailed documentation on the available operations, inputs, outputs and responses that can be expected. For our services, that information can be found in our comprehensive developer guides.
Taking an API for a test drive is one of the first steps to determining if the service will work for your needs. We make this simple by offering a Free API test key for each of our services and are happy to help with integration and answer any questions.