Our advanced integration method allows you to call the petkey API directly from your own code so you can customize the behavior, look and feel of your website accordingly. If you are comfortable with standard website technologies such as CSS, Javascript, JQuery and HTML, our advanced integration might be good fit.
The petkey API service URL is located at https://api.petkey.org. All of the available functions, methods and object models for version 4.0 are documented in the API Reference. The API is built on a framework that provides HTTP services that reach a broad range of clients, including browsers and mobile devices. If your platform supports sending and receiving HTTP requests and responses, you can implment all of the functionality in the petkey™ API. The examples here will focus on using JQuery and javascript. This is the most popular method used by our partners. However, we have seen a number of implementations on other platforms such as .NET and PHP.
All API functions require an API key. This is a unique 36-character key provided to you when you sign up for API access. Please contact us at 734-600-3463 or info@petkey.org to obtain your key.
To access API functions and methods, your API Key must be provided in the standard HTTP authentication header. The value for the authorization header should be the following:
On line #6 above, the authorization header is added to the .ajax request from JQuery. If the authorization header is not provided (or invalid), you will recieve an HTTP 401 status code (Unauthorized) as the response.