Skip to main content
Home
PetHub Dev Net (Alpha)

Main navigation

  • Home
  • APIs
  • Widget
  • Apply
User account menu
  • Log in

Breadcrumb

  1. Home

API Responses

By PetHub, 1 January, 2023

In the case of our favorite original tester, Grizzly, requesting his information would take the following form:

curl -H "Authorization: Bearer abc123" GET https://pethub.io/v1/pets/223

The above authorized call to PetHub.io's "/v1/pets/{id}" endpoint with Grizzly's unique identifier (where "223" replaces the "{id}") would receive the following response:

{
    "pid": "223",
    "uid": "66",
    "name": "Grizzly",
    "species": {
      "tid": "3031"
    },
    "breed_primary": {
      "target_id": "2855"
    },
    "breed_mix": "Chihuahua",
    "gender": "Male",
    "picture": {
      "fid": "189",
      "uid": "66",
      "filename": "grizzly.jpg",
      "filemime": "image/jpeg",
      "filesize": "7735",
      "status": "1",
      "timestamp": "1414801248",
      "type": "image",
      "metadata": {
        "height": 280,
        "width": 186
      },
      "height": "280",
      "width": "186",
      "url": "https://images.pethub.com/dev/pub/grizzly.jpg?milgJeq.a.UHYX6vfvnF7f2alm0p1Y5H"
    },
    "birthday": "2013-11-16 00:00:00",
    "size": {
      "tid": "3236"
    },
    "weight_value": "4",
    "weight_unit": "lb",
    "coat": "Short Hair",
    "tail": {
      "tid": "3428"
    },
    "altered": {
      "value": "Yes"
    },
    "description": "Our precious fuzzi-wuzzums.",
    "microchip": ""
  }

The format of the data above is JSON which is the default format typically specified in the Header as part of the request. However, if necessary, the format can be explicitly requested by appending ".json" or ".xml" to the noun to receive JSON or XML formatted data, respectively. For example:

curl -H "Authorization: Bearer abc123" GET https://pethub.io/v1/pets.json/223
Category
API V1
introduction
authentication
oauth
requests
responses
response codes

API Docs Index

  • Getting Started
  • API Calls
    • Introduction
    • Authentication
    • Requests
    • Responses
  • Endpoints
    • /Activities
    • /Foods
    • /LostPets
    • /Perks
    • /Persons
    • /Pets
    • /Species
    • /Tags
  • Webhooks
    • /Alerts
    • /Notifications
  • Response Codes
  • Dev Resources
  • Support

Footer

  • Contact
  • Terms of Use
  • API Documentation
  • Widget Documentation
  • Frequently Asked Questions
  • Support

Copyright 2025, PetHub, Inc. All rights reserved.