Rate this page:
Everything about your Pets
write:pets
read:pets
Pet object that needs to be added to the store
integer
Category
string
Requiredarray<string>
Requiredarray<Tag>
string
Invalid ID supplied
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
curl --request PUT \
--url 'https://petstore.swagger.io/v2/pet' \
--header 'Content-Type: application/json' \
--data '{
"id": 2154,
"category": {
"id": 2154,
"name": "<string>"
},
"name": "doggie",
"photoUrls": [
"<string>"
],
"tags": [
{
"id": 2154,
"name": "<string>"
}
],
"status": "available"
}'
write:pets
read:pets
Pet object that needs to be added to the store
integer
Category
string
Requiredarray<string>
Requiredarray<Tag>
string
Invalid input
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
curl --request POST \
--url 'https://petstore.swagger.io/v2/pet' \
--header 'Content-Type: application/json' \
--data '{
"id": 2154,
"category": {
"id": 2154,
"name": "<string>"
},
"name": "doggie",
"photoUrls": [
"<string>"
],
"tags": [
{
"id": 2154,
"name": "<string>"
}
],
"status": "available"
}'
Multiple status values can be provided with comma separated strings
write:pets
read:pets
array<string>
Requiredsuccessful operation
array<Pet>
1
2
3
curl --request GET \
--url 'https://petstore.swagger.io/v2/pet/findByStatus?status={status}' \
--header 'Accept: application/xml'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[
{
"id": 2154,
"category": {
"id": 2154,
"name": "<string>"
},
"name": "doggie",
"photoUrls": [
"<string>"
],
"tags": [
{
"id": 2154,
"name": "<string>"
}
],
"status": "available"
}
]
Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
write:pets
read:pets
array<string>
Requiredsuccessful operation
array<Pet>
1
2
3
curl --request GET \
--url 'https://petstore.swagger.io/v2/pet/findByTags?tags={tags}' \
--header 'Accept: application/xml'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[
{
"id": 2154,
"category": {
"id": 2154,
"name": "<string>"
},
"name": "doggie",
"photoUrls": [
"<string>"
],
"tags": [
{
"id": 2154,
"name": "<string>"
}
],
"status": "available"
}
]
Returns a single pet
integer
Requiredsuccessful operation
1
2
3
curl --request GET \
--url 'https://petstore.swagger.io/v2/pet/{petId}' \
--header 'Accept: application/xml'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"id": 2154,
"category": {
"id": 2154,
"name": "<string>"
},
"name": "doggie",
"photoUrls": [
"<string>"
],
"tags": [
{
"id": 2154,
"name": "<string>"
}
],
"status": "available"
}
write:pets
read:pets
integer
Requiredstring
string
Invalid input
1
2
curl --request POST \
--url 'https://petstore.swagger.io/v2/pet/{petId}'
write:pets
read:pets
integer
Requiredstring
Invalid ID supplied
1
2
curl --request DELETE \
--url 'https://petstore.swagger.io/v2/pet/{petId}'
write:pets
read:pets
integer
Requiredstring
string
successful operation
1
2
3
curl --request POST \
--url 'https://petstore.swagger.io/v2/pet/{petId}/uploadImage' \
--header 'Accept: application/json'
1
2
3
4
5
{
"code": 2154,
"type": "<string>",
"message": "<string>"
}