Get a pet
On this page
GET /pets/{petId}
Production: https://petstore.example.com/v1Sandbox: https://sandbox.petstore.example.com/v1Live demo on docvia.dev; accepts any token: /api/petstore/v1
Public: anyone can look up a pet, no token needed.
curl https://petstore.example.com/v1/pets/1042 GET /api/petstore/v1/pets/1042
/api/petstore/v1
Path
Path parameters
petId integer<int64> required
The pet's id.
>= 1
Responses
The pet.
Response application/json
id integer<int64> required read-only
status string required
One of available pending adopted archived
createdAt string<date-time> required read-only
name string required
Display name.
min length 1max length 64
species string required
One of dog cat bird rabbit
birthDate string<date>
tags array<string>
microchip Microchip | null
Identification, when the pet has one.
Exactly one of
id string required
The 15-digit ISO 11784 number.
pattern ^[0-9]{15}$
vendor string
null
Example
{
"id": 1042,
"status": "available",
"createdAt": "2024-01-01T12:00:00Z",
"name": "Rex",
"species": "dog",
"birthDate": "2024-01-01",
"tags": [
"string"
],
"microchip": {
"id": "string",
"vendor": "string"
}
}No resource with that id.
Response application/json
code string required
message string required
Example
{
"code": "not_found",
"message": "No pet with id 1042."
}