Skip to main content

Find pets by status

GET /pet/findByStatus returns pets whose inventory status matches a query parameter. This is the Pets operation included in the API playground and in the downloadable description below.

OpenAPI description (playground scope)

The machine-readable contract for the demo GET operations (this endpoint plus user login and logout) is maintained in this repository:

Download petstore-playground.json (JSON, OpenAPI 3.0.3)

It documents only those three paths. Other operations on the public sample server aren't part of that file.

Resource

A pet is an item in the sample store with a name, photo URLs, optional category and tags, and a status of available, pending, or sold.

Operation

MethodGET
Path/pet/findByStatus
Base URLhttps://petstore3.swagger.io/api/v3

Parameters

NameInRequiredDescription
statusQueryYesOne of available, pending, or sold.

Request headers

HeaderRequiredDescription
AcceptNoUse application/json (default for examples).

Responses

CodeDescriptionBody
200SuccessJSON array of pet objects (may be empty).
400Bad requestOften JSON with code, type, and message (for example invalid status).
500Server errorRetry with backoff.

Example success body

[
{
"id": 1,
"name": "doggie",
"photoUrls": ["https://example.com/photo.jpg"],
"status": "available"
}
]

Example request

curl "https://petstore3.swagger.io/api/v3/pet/findByStatus?status=available"
  • Login and logoutGET /user/login and GET /user/logout in the same OpenAPI file.