For the complete documentation index, see llms.txt. This page is also available as Markdown.

Animals

Browse and manage individual animals available for adoption.

List all animals

get
/pets

Returns a paginated list of all animals in the store. Use limit to control page size and status to filter by availability.

Authorizations
AuthorizationstringRequired

Pass your API key as a Bearer token in the Authorization header.

Query parameters
limitinteger · min: 1 · max: 100Optional

Maximum number of animals to return. Defaults to 20, max 100.

Default: 20
statusstring · enumOptional

Filter by availability status.

Possible values:
Responses
200

A paginated list of animals.

application/json
namestringRequired

The animal's name.

Example: Fluffy
categoryIdinteger · int64Required

The ID of the category this animal belongs to.

Example: 1
statusstring · enumOptionalPossible values:
idinteger · int64Required

Unique identifier assigned on creation.

Example: 1
get/pets
curl -L https://petstore.example.com/v1/pets \
  -H 'Authorization: Bearer YOUR_API_KEY'
[
  {
    "id": 1,
    "name": "Fluffy",
    "categoryId": 1,
    "status": "available"
  },
  {
    "id": 2,
    "name": "Whiskers",
    "categoryId": 2,
    "status": "pending"
  }
]

Add an animal

post
/pets

Adds a new animal to the store. The name and categoryId fields are required.

Authorizations
AuthorizationstringRequired

Pass your API key as a Bearer token in the Authorization header.

Body
namestringRequired

The animal's name.

Example: Fluffy
categoryIdinteger · int64Required

The ID of the category this animal belongs to.

Example: 1
statusstring · enumOptionalPossible values:
Responses
201

Animal added successfully.

application/json
namestringRequired

The animal's name.

Example: Fluffy
categoryIdinteger · int64Required

The ID of the category this animal belongs to.

Example: 1
statusstring · enumOptionalPossible values:
idinteger · int64Required

Unique identifier assigned on creation.

Example: 1
post/pets
curl -L -X POST https://petstore.example.com/v1/pets \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name": "Goldie", "categoryId": 3, "status": "available"}'
{
  "name": "Fluffy",
  "categoryId": 1,
  "status": "available",
  "id": 1
}
Deprecated

Get an animal

get
/pets/{petId}
This operation is deprecated and will be sunset on 2030-12-05.

Returns details for a single animal by ID.

Authorizations
AuthorizationstringRequired

Pass your API key as a Bearer token in the Authorization header.

Path parameters
petIdinteger · int64Required

The ID of the animal to retrieve.

Responses
200

The requested animal.

application/json
namestringRequired

The animal's name.

Example: Fluffy
categoryIdinteger · int64Required

The ID of the category this animal belongs to.

Example: 1
statusstring · enumOptionalPossible values:
idinteger · int64Required

Unique identifier assigned on creation.

Example: 1
get/pets/{petId}
curl -L https://petstore.example.com/v1/pets/1 \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "name": "Fluffy",
  "categoryId": 1,
  "status": "available",
  "id": 1
}

Last updated

Was this helpful?