types

By PetHub, 23 January, 2023

The /foods endpoint focuses on the types of pet food that is recognized by and can be recorded on PetHub.com for a pet's nutritional needs. Use this to pull the types of foods available and details about a specific food ID (fid).

Digging into /Foods

The /foods endpoint offers the following:

/foods Description
/
  • POST - add a food to PetHub's list of foods, types, etc.
  • GET - list of foods available on PetHub
    Example:
    https://pethub.io/v1/foods?manufacturer=mars&type=kibble
/{fid}
  • GET - retrieve manufacturer, brand, type, name, and so on
  • PUT - update information about a food entry
  • DELETE - remove a food entry from the database
/{fid}/use GET - get the list of pets using food {fid}
Example:
https://pethub.io/v1/foods/{fid}/use?state=wa&city=seattle
  (Actively seeking feedback re: additional endpoints & use cases)
   

The Swagger 2.0 / OAS YAML rendering is below including the data structures necessary for POST or returned by GET.

By PetHub, 23 January, 2023

The /activities endpoint provides a current list of supported activity types.

Digging into /Activities

The /activities endpoint offers the following:

/activities Description
/ GET - returns a list of supported activity types
/{aid}
  • GET - returns detailed information about the activity identified by the activity ID
  • PUT - updates an activity entry
  • DELETE - deletes an activity entry

The Swagger 2.0 / OAS YAML rendering is below including the data structures necessary for POST or returned by GET.

By PetHub, 1 January, 2023

The /types endpoint focuses on the types of data that can be associated with a pet's profile on PetHub.com. Use this to retrieve the list of type names and unique IDs to associate with a pet's profile information.

This endpoint:

By PetHub, 1 January, 2023

The /pets endpoint focuses on the pet profile on PetHub.com. Use this to create a pet profile, retrieve a pet's information, and update its details as documented here.

The main parameter of this endpoint is the pet ID {pid} which is a UUID for a pet.

Digging into /Pets

The /pets endpoint offers the following:

/pets Description
/

POST - creates a new pet profile

/{pid}
  • GET - returns basic profile information such as name, photo, breed, species, age, description, and so on
  • PUT - updates a pet's basic profile information
  • DELETE - deletes a pet's basic profile and causes all associated data to be deleted as well (e.g. activities, allergies, documents, conditions, foods, medications, etc.)
/{pid}/activities
  • POST - add an activity for a pet
  • GET - return list of activities for a specific pet
  • DELETE - remove an activity for the pet
/{pid}/allergies
  • POST - add an allergy entry for a pet
  • GET - returns a list of allergies associated with a pet
  • PUT - updates a pet's existing allergy information
  • DELETE - deletes the pet's specified allergy entry
/{pid}/conditions
  • POST - add a condition entry for a pet
  • GET - returns a list of conditions for the specified pet
  • PUT - updates a pet's existing condition information
  • DELETE - deletes the pet's specified condition entry
/{pid}/documents
  • POST - add a file to a pet's profile
  • GET - list of documents associated with the pet
  • DELETE - remove a document from the website and pet's profile
/{pid}/foods
  • POST - add a food entry for a pet's diet
  • GET - retrieve a list of foods on a pet's diet
  • PUT - update a pet's food regimen
  • DELETE - remove the food entry from the pet's profile
/{pid}/medications
  • POST - Add a medication entry for a pet
  • GET - retrieve a list of medications and their details for a pet
  • PUT - update a medication entry for a pet
  • DELETE - remove a medication from the pet's profile
/{pid}/procedures
  • POST - add a medical procedure entry for a pet
  • GET - returns a list of medical procedures associated with this pet
  • PUT - update the medical procedure entry
  • DELETE - remove a procedure from the pet's profile
/{pid}/tags
  • POST - links a tag to the pet
  • GET - returns a list of IDs linked to the pet's profile
  • DELETE - unlink the tag from the pet's profile

The Swagger 2.0 / OAS YAML rendering is below including the data structures necessary for POST or returned by GET.

Swagger 2.0 File