Retrieve a List of Pets by Status
This wiki page covers the API interaction for the Swagger Petstore API when requesting a list of pets by status.
Model
Because this is a query string call, there is no model for the GET /pet/findByStatus used to retrieve a list of Pets by Status using the Petstore API.
Parameters
Header Parameters
There are no Header Parameters for the GET /pet/findByStatus call to the Petstore API.
Path Parameters
There are no Path Parameters for the GET /pet/findByStatus call to the Petstore API.
Query String Parameters
The Query String Parameter for the GET /pet/findByStatus call to the Petstore API are displayed in the below table.
Query | Description |
status | An array of string values which correspond to the status parameter in the store. Options are available, pending, or sold. |
Request Body Parameters
There are no Request Body Parameters for the GET /pet/findByStatus call to the Petstore API.
Sample Request
A sample Curl request is shown below, with most of the Parameters included.
curl -X GET "http://petstore.swagger.io/v2/pet/findByStatus?status=available" -H "accept: application/xml"
This request calls for a response that contains all pets with the status available.
Sample Response and Schema
The following figure displays a sample response to the curl request shown in the previous section.

Curl Request Sample Response
This figure displays two records with the status available. This response is broken down in the table that follows.
Response Item | Data Type | Description |
category/id | integer | Numerical ID for the pet category. |
category/name | string | Alphanumeric string for the pet category name. e.g., Dog |
id | integer | Numerical ID for the individual Pet. |
name | string | Alphanumeric string for the individual Pet name. e.g., Rex |
photoUrls/photoUrl | string | URL for each image associated with this record. |
status | string | Pet status in the store. Options are available, pending, or sold. |
tags/tag/id | integer | Numerical ID for the tag. |
tags/tag/name | string | Alphanumeric string for the tag. e.g., puppy |
You must be logged in to post a comment.