Shelterluv API Overview

  • Updated
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 developer; to share this with them:
  1. Send them this link and ask them to click the "Request access" button (they will need use the Google Chrome browser 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 currently has several URLs or endpoints:
  • All Animals
    • Gives a list of all animals that were ever “intaked” by the shelter.
    • Allows the result set to be filtered based on two types of animal statuses - ‘in custody’ statuses and ‘published’ statuses. 
    • URL: https://www.shelterluv.com/api/v1/animals
  • Animal Details
    • Fetches the animal record based on the id passed in request url, and gives all details of the animal. 
    • URL: https://www.shelterluv.com/api/v1/animals/:id

 

API Keys

In order to use the API, you need to generate an API key. Your API key can be generated via Configuration under Uploads and Integrations. You can include a quick description of what you're using the API key for, just for your reference later. Learn more about generating API keys here. 

API_keys_2.png

 

Before your developers start any type of integration with the API, we suggest that you test the key and URL. This can be done via an app that you can download for Chrome browsers 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 to 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 that you're interested in testing in the GET request box.
  2. In the Headers section:
    1. Enter "X-Api-Key" in the first column for "key".
    2. Enter your API key (that you copied from Configuration) in the second column for "value".
  3. Click "Send".

Screen_Shot_2019-01-30_at_2.25.28_PM.png

 

 

Commonly Asked Questions

Are there parameters that can be used with the URLs? 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.