Update an existing pet.
Update an existing pet by Id.
PUT
/petRequest body
requiredapplication/jsonUpdate an existent pet in the store
idinteger<int64>namestringrequiredcategoryCategoryShow propertiesHide properties
idinteger<int64>namestringphotoUrlsstring[]requiredtagsTag[]Show propertiesHide properties
Array of
Tagidinteger<int64>namestringstatusstringpet status in the store
Allowed:
availablependingsoldResponses
200Successful operation
idinteger<int64>namestringrequiredcategoryCategoryShow propertiesHide properties
idinteger<int64>namestringphotoUrlsstring[]requiredtagsTag[]Show propertiesHide properties
Array of
Tagidinteger<int64>namestringstatusstringpet status in the store
Allowed:
availablependingsold400Invalid ID supplied
404Pet not found
422Validation exception
defaultUnexpected error
Request
curl -X PUT "/api/v3/pet" \
-H "Content-Type: application/json" \
-d '{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}'const response = await fetch("/api/v3/pet", {
method: "PUT",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
})
});import requests
response = requests.put(
"/api/v3/pet",
headers={
"Content-Type": "application/json"
},
json={
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
},
)Response
{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}Invalid ID supplied
Pet not found
Validation exception
Unexpected error