activities

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 /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
By PetHub, 1 January, 2023

PetHub APIs support a number of endpoints that, with your feedback, we will continue to add to our library. The APIs below are what are currently in our catalog.

We've broken these up into 3 sections:

  • Sniffing Around - both the most commonly used API calls for starting an interaction with a user's account and also the calls you'll need when initially registering your application with PetHub and getting a user's permission to utilize their data
  • Digging Deeper - endpoints that help you dig deeper into a user's or pet's information
  • Webhooks - proactively pull information as well as register to have PetHub notify you when specific events have taken place (such as tags being scanned or lost pet alerts being sent, for example)

The fun stuff:

  • Sniffing Around:
    • Authorizations - before a 3rd party application may interact with a PetHub user's account and data, it may first receive authorization from the PetHub user
    • Persons - the end-user with the account on PetHub who has control of their own and their pet's content
    • Pets - the profiles of the animals managed by the PetHub platform
  • Digging Deeper:
    • Activities - walking, agility, eating, playing, training, sleeping, pooping, and more. This is how you list it and add to it for a particular pet
    • Foods - manufacturer, formula, type (wet? kibble? raw?), amount, timing, and special preparation instructions can be found or added to for a pet with this endpoint
    • LostPets - pull a list of lost pet posters for a user, specific pet, by geo location, and more. Or, add to our list of Lost Pet posters
    • Perks - view which discounts a PetHub subscriber has claimed or the entire list of Perks that could be claimed
    • Species - pull the list of species supported by the PetHub platform or look-up the species for a specific pet
    • Tags - ability to look-up tag information including a pet's profile information if publicly published by the pet owner
  • Webhooks:
    • Alerts - announcements about missing or found animals
    • Notifications - tag scanning events (webhook) for a particular pet or particular tag ID

Each of these can be accessed with permission from the user whose data is being requested. In addition, the user can see which applications have been given permission to use their data which can be revoked at any time. Lastly, the user can control which of these types of resources each application is allowed to access on a read / write / update / delete basis.