Sample objects showing what the API documentation looks like.

The pet object

A domestic animal kept as a pet, such as a cat or dog.

ATTRIBUTES

  • idCHAR(10)
    Unique identifier.
  • age categoryTINYINT(3), age category object. NULLABLE.
    Age category of the pet.
  • breedVARCHAR(255). NULLABLE.
    If the pet is a dog, the name of the breed.
  • createdTIMESTAMP
    When the pet was added to the database.
  • other typeVARCHAR(255). NULLABLE.
    If the pet is not one of the available types, a user-inputted description of the type.
  • ownerCHAR(10), person object
    Person who owns the pet.
  • sizeTINYINT(3), pet size category object. NULLABLE.
    If the pet is a dog, the size category of the dog. 1=Small (e.g., Shih Tzu), 2=Medium (e.g., Beagle), 3=Large (e.g., Afghan).
  • typeTINYINT(3), pet type object. NULLABLE.
    Type of pet. 1=Dog, 2=Cat, 3=Fish, 4=Bird, 5=Horse, 6=Rabbit, 7=Turtle, 8=Poultry, 9=Rodent, 10=Ferret, 11=Reptile/Lizard, 12=Insect, 13=Spider, 14=Other

Example response

{ data : { "id": "Ui5Y7CxBnY", "ageCategory": 1, "breed": "Shih Tzu", "created": 1422523991, "otherType": null, "owner": "aYuBvCkLmT", "size": 1, "type": 1 } }

Create a pet

ARGUMENTS

  • owner
    REQUIRED

RETURNS

Returns the requested object.

Example Request

$.ajax({ url: "https://api.honestrenter.com/pets", method: "POST", data: "owner=aYuBvCkLmT" });

Retrieve a pet

RETURNS

Returns the requested object.

Example Request

$.ajax({ url: "https://api.honestrenter.com/pets/Ui5Y7CxBnY", method: "GET" });

List pets matching the supplied filters

Available filters:

  • id
    REQUIRED when owner filter is left blank
  • ageCategory
  • owner
    REQUIRED when id filter is left is blank
  • size
  • size
  • type

RETURNS

Returns the list of objects matching the supplied filters.

Example Request

$.ajax({ url: "https://api.honestrenter.com/pets", method: "GET", data: "owner=aYuBvCkLmT" });

Example Response

{ "data": [ { "id": "Ui5Y7CxBnY", "ageCategory": 1, "breed": "Shih Tzu", "created": 1422523991, "otherType": null, "owner": "aYuBvCkLmT", "size": 1, "type": 1 } ], "limit": 100, "offset": 0 }

Modify a pet

Attributes that can be modified:

  • age category
  • breed
  • created
  • other type
  • owner
  • size
  • type

RETURNS

Returns the modified object.

Example Request

$.ajax({ url: "https://api.honestrenter.com/pets/Ui5Y7CxBnY", method: "PATCH", data: "breed=2&size=3" });

Delete a pet

RETURNS

Returns the deleted object.

Example Request

$.ajax({ url: "https://api.honestrenter.com/pets/Ui5Y7CxBnY", method: "DELETE" });

The pet age category object

The approximate age of a pet. Currently only used to describe dogs. 1=Under 1 year old, 2=1 to 2 years old, 3=3 to 5 years old, 4=6 to 13 years old, 5=14+ years old, 6=Unknown age.

ATTRIBUTES

  • idTINYINT(3)
    Unique identifier.
  • labelVARCHAR(255)
    Label describing the age category.

Possible values

  1. Under 1 year old
  2. 1 to 2 years old
  3. 3 to 5 years old
  4. 6 to 13 years old
  5. 14+ years old
  6. Unknown age

Example response

{ data : { "id": 2, "label": "1 to 2 years old" } }

Retrieve a pet age category

RETURNS

Returns the requested object.

Example Request

$.ajax({ url: "https://api.honestrenter.com/pet-age-categories/2", method: "GET" });

List pet age categories matching the supplied filters

Available filters:

  • id
  • label

RETURNS

Returns the list of objects matching the supplied filters.

Example Request

$.ajax({ url: "https://api.honestrenter.com/pet-age-categories", method: "GET" });

Example Response

{ "data": [ { "id": 1, "label": "Under 1 year old" }, { "id": 2, "label": "1 - 2 years old" }, { "id": 3, "label": "3 - 5 years old" }, { "id": 4, "label": "6 - 13 years old" }, { "id": 5, "label": "14+ years old" }, { "id": 6, "label": "Unknown age" } ], "limit": 100, "offset": 0 }

The pet size category object

The approximate size of a pet (small, medium, or large). Curently only used to describe dogs.

ATTRIBUTES

  • idTINYINT(3)
    Unique identifier.
  • labelVARCHAR(255)
    Label describing the pet size category.

Possible values

  1. Small (e.g., Shih Tzu)
  2. Medium (e.g., Beagle)
  3. Large (e.g., Afghan)

Example response

{ data : { "id": 1, "label": "Small (e.g., Shih Tzu)" } }

Retrieve a pet size category

RETURNS

Returns the requested object.

Example Request

$.ajax({ url: "https://api.honestrenter.com/pet-size-categories/1", method: "GET" });

List pet size categories matching the supplied filters

Available filters:

  • id
  • label

RETURNS

Returns the list of objects matching the supplied filters.

Example Request

$.ajax({ url: "https://api.honestrenter.com/pet-size-categories", method: "GET" });

Example Response

{ "data": [ { "id": 1, "label": "Small (e.g., Shih Tzu)" }, { "id": 2, "label": "Medium (e.g., Beagle)" }, { "id": 3, "label": "Large (e.g., Afghan)" } ], "limit": 100, "offset": 0 }

Pet type object

Whether the pet is a dog, cat, fish, bird, etc.

ATTRIBUTES

  • idTINYINT(3)
    Unique identifier.
  • labelVARCHAR(255)
    Label describing the pet type.

Possible values

  1. Dog
  2. Cat
  3. Fish
  4. Bird
  5. Horse
  6. Rabbit
  7. Turtle
  8. Poultry
  9. Rodent
  10. Ferret
  11. Reptile/Lizard
  12. Insect
  13. Spider
  14. Other

Example response

{ data : { "id": 1, "label": "Dog" } }

Retrieve a pet type

RETURNS

Returns the requested object.

Example Request

$.ajax({ url: "https://api.honestrenter.com/pet-types/1", method: "GET" });

List pet types that match the supplied filters

Available filters:

  • id
  • label

RETURNS

Returns the list of objects matching the supplied filters.

Example Request

$.ajax({ url: "https://api.honestrenter.com/pet-types", method: "GET", data: "id=1,2,3" });

Example Response

{ "data": [ { "id": 1, "label": "Dog" }, { "id": 2, "label": "Cat" }, { "id": 3, "label": "Fish" } ], "limit": 100, "offset": 0 }

The vehicle object

A vehicle is a car, truck, or motorcycle owned by a candidate.

ATTRIBUTES

  • idCHAR(10)
    Unique identifier.
  • createdTIMESTAMP
    When the vehicle was added to the database
  • license plateVARCHAR(30). NULLABLE.
    The license plate number of the vehicle.
  • makeVARCHAR(255). NULLABLE.
    The make of the vehicle - e.g., Ford, GM, Toyota.
  • modelVARCHAR(255). NULLABLE.
    The model name - e.g., Focus, Accura, Prius, Mustang.
  • ownerCHAR(10), candidate object
    The candidate who owns the vehicle.
  • yearSMALLINT(4). NULLABLE.
    The year of the vehicle.

Example response

{ data : { "id": "YtGb7V93Nb", "created": 1422523991, "license plate": "V9T 2E7", "make": "Toyota", "model": "Carolla", "owner": "aYuBvCkLmT", "year": 2014 } }

Create a vehicle

ARGUMENTS

  • owner
    REQUIRED

RETURNS

Returns the requested object.

Example Request

$.ajax({ url: "https://api.honestrenter.com/vehicles", method: "POST", data: "owner=aYuBvCkLmT" });

Retrieve a vehicle

RETURNS

Returns the requested object.

Example Request

$.ajax({ url: "https://api.honestrenter.com/vehicles/YtGb7V93Nb", method: "GET" });

List vehicles matching the supplied filters

Available filters:

  • id
    REQUIRED when owner filter is left blank
  • make
  • model
  • owner
    REQUIRED when id filter is left is blank
  • year

RETURNS

Returns the list of objects matching the supplied filters.

Example Request

$.ajax({ url: "https://api.honestrenter.com/vehicles", method: "GET", data: "owner=aYuBvCkLmT" });

Example Response

{ "data": [ { "id": "YtGb7V93Nb", "created": 1422523991, "license plate": "V9T 2E7", "make": "Toyota", "model": "Carolla", "owner": "aYuBvCkLmT", "year": 2014 } ], "limit": 100, "offset": 0 }

Modify a vehicle

Attributes that can be modified:

  • license plate
  • make
  • model
  • year

RETURNS

Returns the modified object.

Example Request

$.ajax({ url: "https://api.honestrenter.com/vehicles/YtGb7V93Nb", method: "PATCH", data: "make=Ford" });

Delete a vehicle

RETURNS

Returns the deleted object.

Example Request

$.ajax({ url: "https://api.honestrenter.com/vehicles/YtGb7V93Nb", method: "DELETE" });