Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 45 Next »

This set of resources is used to expose the animals.
 

Data guidance
 

  • Animal Id is the public site database animal Id, to reference the ShelterBuddy animal ID use the ShelterBuddyId field.
  • Sex is "null" when it's unknown. Desexed is "null" when it's unknown. An animal by have a single Breeds when IsCrossBreed is "true".
  • IsVaccinated is "null" when it is unknown
  • HadHealthChecked is "null" when it is unknown
  • IsWormed is "null" when it is unknown
  • HadBehaviourEvaluated is "null" when it is unknown
  • DOB will have a date of 1/1/1900 if the DOB is unknown (this is the database default date)
  • Shelter is the physical location / region that the animal is located at, while ShelterLocation is the area in the shelter that the pet is located.  For example Shelter is "Beverley Hills Shelter", and ShelterLocation is "Dog Adoptions 1"
  • AvailableForAdoptionFrom: is the date the animal was made available for adoption. This is from the shelterbuddy field “Date Available From”.
  • Source > Date is the date the animal came into the shelter.

  • EditedOn is the date the animal was last updated.

  • ShelterBuddyStatusDate is the current status date from ShelterBuddy.
  • YouTubeVideos is an array of YouTube video identifiers which can be appended to a url (eg. www.youtube.com/watch?v={YouTubeVideoId} OR youtu.be/{YouTubeVideoId}
  • AdoptionSummary.Generic is a custom value which can be set per public site.
    • An example generic description:
      Introducing {name}! {NominativeSex} is a {colour} {breed} {animalType} located at our RSPCA {location}. {Name} is very happy to meet you and have you watching over {posessiveSex} this festive season. <a href="{viewPublicSiteUrl}">Please click here</a> to view {name}’s adoptapet profile. (RSPCA Reference Number: AID {shelterbuddyId})
       
       
    • The following fields are able to be used in a generic adoption summary. 

      FieldExample
      {Name} / {name}Max / max
      {NominativeSex} / {nominativeSex}She, He, It / she, he, it
      {PosessiveSex} / {posessiveSex}Her, Him, It / her, him, it
      {Color} / {Colour} / {Color} / {colour}Blue / blue
      {Breed} / {breed}Poodle / poodle
      {AnimalType} / {animalType}Dog / dog
      {Location} / {location}Noosa / noosa
      {shelterBuddyId}999999
      {viewPublicSiteUrl}http://adoptapet.com.au/animal/animalDetails.asp?statusId=3animalid=159432

       

       

Table 5. Animal resources

Get resources are ordered by animal ID unless specified otherwise.

URI Description

Method

Relative URI

Notes

Get by ID

GET

/api/v{version}/animals/{id}

 

Get by Animal Status (Deprecated)

GET

/api/v{version}/animals?animalStatusId={id}

Use the resource Get by Animal Search Type
Get by Animal Status and Shelter (Deprecated)GET/api/v{version}/animals?animalStatusId={id}&shelterId={id}Use the resource Get by Animal Search Type
Get by Animal Status and State ID (Deprecated)GET/api/v{version}/animals?animalStatusId={id}&stateId={id}Use the resource Get by Animal Search Type and State ID
Get by Animal Type  and State ID (Deprecated)GET/api/v{version}/animals?animalTypeId={id}&stateId={id} 
Get by Animal Search TypeGET/api/v{version}/animals?animalSearchTypeId={id} 
Get by Animal Search Type and Animal Updated AfterGET/api/v{version}/animals?animalSearchTypeId={id}&animalUpdatedAfter={date-UTC}Encode date using ISO 8601 format.
Get by Animal Search Type and State IDGET/api/v{version}/animals?animalSearchTypeId={id}&stateId={id} 
Get by Animal Search Type, State ID, and Animal Updated AfterGET/api/v{version}/animals?animalSearchTypeId={id}&stateId={id}&animalUpdatedAfter={date-UTC}Encode date using ISO 8601 format.

Get by

  •  Animal Search Type
  • Shelter ID
  • State ID
  • Animal Updated After
  • Animal Type ID
  • Can Have No Photo (use this to only get animals that have a photo)
GET/api/v{version}/animals?animalSearchTypeId={id}&shelterId={id}&stateId={id}&animalTypeId={id}&canHaveNoPhoto=true&animalUpdatedAfter={date-UTC}Encode date using ISO 8601 format.
Get by ShelterBuddyIdGET/api/v{version}/animals?shelterBuddyId={id}Returns paged results as multiple shelter buddy sites can upload to one public site.

 


 

A sample JSON return of an animal
{
    "Id": 1,
    "Shelter": {
        "Depiction": "RSPCA QLD",
        "Uri": "/api/v1/shelters/1"
    },
	"ShelterBuddyId": 999999,
	"ShelterBuddyStatusDate": 2006-07-27T08:00:00Z
	"ShelterLocation": "Adoption Apartments",
    "Symbols": "/api/v1/animalSymbols/?animalId=1",
    "Tags": "/api/v1/animalTags/?animalId=1",
    "DefaultPhoto": "/api/v1/animalPhotos/?animalId=1&isDefault=true",
    "Photos": "/api/v1/animalPhotos/?animalId=1",
    "Status": {
        "Depiction": "Available for Adoption",
        "Uri": "/api/v1/animalStatuses/1"
    },
    "Name": "Max",
    "Kennel": "A1",
    "AdoptionCost": 99.99,
    "Sex": "Male",
    "Desexed": true,
	"Breed": {
		"IsCross": true,
		"Primary": {
	        "Depiction": "Poodle",
    	    "Uri": "/api/v1/animalBreeds/1"
	    },
		"Secondary": {
	        "Depiction": "Labrador Retriever",
    	    "Uri": "/api/v1/animalBreeds/2"
	    }
	},
    "AddedOn": "0001-01-01T00:00:00",
    "EditedOn": "0001-01-01T00:00:00",
    "AdoptionSummary": {
        "Entered": "Hello my name is Max,\r\nI am a domestic shorthair tabby male...",
        "Generic": "{Custom per site}"
    },
    "Age": {
        "DateOfBirth": "2000-01-01T00:00:00",
        "Week": 3,
        "Months": 2,
        "Years": 1,
        "IsApproximated": false,
        "Readable": "1 year and 2 months"
    },
    "Features": {
        "Colours": "/api/v1/animalColours/?animalId=1",
        "TailType": {
            "Depiction": "Bent",
            "Uri": "/api/v1/animalTailType/1"
        },
        "EarType": {
            "Depiction": "Drooping",
            "Uri": "/api/v1/animalEarType/1"
        },
        "EyeColour": {
            "Depiction": "Brown",
            "Uri": "/api/v1/animalEyeColour/1"
        },
        "CoatType": {
        "Depiction": "Smooth",
        "Uri": "/api/v1/animalCoatType/1"
        }
    },
    "Collar": {
        "Colour": {
            "Depiction": "Silver",
            "Uri": "/api/v1/animalCollarColour/1"
        },
        "Type": {
        "Depiction": "Wire",
        "Uri": "/api/v1/animalCollarType/1"
        }
    },
    "Weight": {
        "Kilograms": 1.5,
        "Pounds": 3.306
    },    
	"HadHealthChecked": true,
	"IsVaccinated": false,
	"IsWormed": null, 
	"HadBehaviourEvaluated": null,
	"Size": {
        "Depiction": "Small",
        "Uri": "/api/v1/animalSizes/1"
    },
	"ViewPublicSiteUrl" : "http://dev.adoptapet.com.au/animal/animalDetails.asp?statusId=1&animalId=1",
 	"SearchTypes": [ 
        {
            Depiction: "Adoption"
            Uri: "/api/v1/animalSearchTypes/4"
        }
    ],
    "Bonds": [
        {
            "Uri": "/api/v1/animals/186888",
            "Id": 186888
        }
    ],
    "Source": {
        "Date": "0001-01-01T00:00:00"
    },
    "AvailableForAdoptionFrom": "0001-01-01T00:00:00",
	"YouTubeVideos":["FLIc4KiE_4Y","87T2i2LDoLc"]
	}
} 


 

  • No labels