Shelterluv API Overview

Below you'll find an overview of Shelterluv's API and how to get started with it. The technical specifications for the API endpoints described below can be found here.

This is most useful for your developers. To share this with them:

  1. Send them this link and ask them to click the Request Access button (they will need to use Google Chrome and be logged into a Google account first).
  2. Send an email to us at help@shelterluv.com with your developer's Google account email address so we know which organization they are associated with and can approve the request (they can also email us directly and cc you).

Shelterluv's API Endpoints


All Animals - This endpoint gives a list of all animals that were ever “intaked” by the shelter and allows the result set to be filtered based on two types of animal statuses - "in custody" statuses and "published" statuses. 

The URL is - https://www.shelterluv.com/api/v1/animal

Animal Details - This endpoint fetches the animal record based on the ID passed in the request URL, and gives all details of the animal.

The URL is - https://www.shelterluv.com/api/v1/animals/:id

Generating an API Key


In order to use the API, you need to generate an API key. You can find details on how to do that here - How to Generate an API Key.

alert-outline.svg
Note
Before your developers start integrating with the API, we suggest that you test the key and URL. This can be done via a Chrome browser app called Postman (please use the updated Postman Native app).

Postman is a tool for testing HTTP API credentials and testing how the API responds to different kinds of requests before you integrate the API into your own website. This helps your developers get an idea of how to write code that will process the responses given by the API. 

For instructions on how to get started with Postman, you can reference Postman's documentation here.

Once you have an account set up and the Postman Native app installed on your Chrome browser, you can test the API this way:

  1. Use whichever API URL you are interested in testing in the GET request box.
  2. In the Headers section, enter "X-Api-Key" in the first column for KEY. Then, enter your API key (that you received from Shelterluv) in the second column for VALUE.
  3. Click the blue Send button.

Screen_Shot_2019-01-30_at_2.25.28_PM.png

Frequently Asked Questions


Are there parameters that can be used with the URLs, and can results be filtered via the URL?

Most endpoints of the API support pagination settings as parameters. The API's default is to limit returned results to 100 results. To customize that default pagination, add parameters "&limit=xx&offset=xx". The limit parameter indicates the number of results that will return on one page. The offset parameter is the index of the first record to display on a page. For example, if limit=10 and offset=10, this means your first page will show records 1-10 and your second page will show records 11-20.

The animal endpoint can be filtered by status type (with values "in custody" or "publishable").

I'm seeing a default photo returned for the photo field and blank results for location. Why is that?

For fields like photos and videos, if the field is returning a generic photo, that means that that animal does not have any photos or videos.

When a location is returned with no result, that means that animal is in a foster location. The location field only returns onsite locations.