Skip to content
Get started

Find pet by ID.

get/pet/{petId}

Find pet by ID.

Path ParametersExpand Collapse
petId: number
formatint64
ReturnsExpand Collapse
Pet = object { name, photoUrls, id, 3 more }
name: string
photoUrls: array of string
id: optional number
formatint64
category: optional object { id, name }
id: optional number
formatint64
name: optional string
status: optional "available" or "pending" or "sold"

pet status in the store

Accepts one of the following:
"available"
"pending"
"sold"
tags: optional array of object { id, name }
id: optional number
formatint64
name: optional string
Find pet by ID.
curl /api/v3/pet/$PET_ID \
    -H "Authorization: Bearer $BARKEND_API_KEY"
{
  "error": {
    "id": "invalid_id",
    "message": "Invalid ID supplied"
  }
}
{
  "error": {
    "id": "not_found",
    "message": "Pet not found"
  }
}
Returns Examples
{
  "error": {
    "id": "invalid_id",
    "message": "Invalid ID supplied"
  }
}
{
  "error": {
    "id": "not_found",
    "message": "Pet not found"
  }
}