AI Assistant

How can I help you today?

PetsGet Pets
Pets

GET /pets

Retrieve a paginated list of all pets with optional filtering

curl -X GET "https://api.petstore.example.com/v1/pets?limit=42&offset=42&category=example_string&status=available" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "pets": [
    {
      "id": 123,
      "name": "Buddy",
      "category": {
        "id": 1,
        "name": "Dogs",
        "description": "All types of dogs"
      },
      "photoUrls": [
        "https://images.petstore.example.com/pets/123/main.jpg",
        "https://images.petstore.example.com/pets/123/side.jpg"
      ],
      "tags": [
        {
          "id": 1,
          "name": "friendly"
        }
      ],
      "status": "available",
      "age": 3,
      "breed": "Golden Retriever",
      "description": "Friendly and energetic dog, great with kids",
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-20T14:45:00Z"
    }
  ],
  "pagination": {
    "limit": 20,
    "offset": 0,
    "total": 150,
    "hasMore": true
  }
}
GET
/pets
GET
Security Scheme
Bearer Tokenstring
Required

JWT token obtained from the login endpoint

JWT token obtained from the login endpoint
query
limitinteger

Number of pets to return (max 100)

Min: 1 • Max: 100
query
offsetinteger

Number of pets to skip

Min: 0
query
categorystring

Filter by category name

query
statusstring

Filter by pet status

Options: available, pending, sold
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). JWT token obtained from the login endpoint

Query Parameters

limitinteger

Number of pets to return (max 100)

offsetinteger

Number of pets to skip

categorystring

Filter by category name

statusstring

Filter by pet status

Responses

petsarray
paginationobject