Add a new pet to the store.
POST
/petRequest body
requiredapplication/jsonCreate a new 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 input
422Validation exception
defaultUnexpected error
Request
curl -X POST "/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: "POST",
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.post(
"/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 input
Validation exception
Unexpected error