POST
/petAdd a new pet to the store
Creates a new pet in the store. Supply name and photoUrls; status, if provided, must be available, pending, or sold. The response contains the created pet object.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Pet details to add to the store. name and photoUrls are required.
categoryobjectoptional
The pet's category, with an identifier and name.
idintegeroptional
The pet's identifier.
namestringrequired
The pet's name.
photoUrlsarray<string>required
An array of URLs for photos of the pet.
statusstringoptional
pet status in the store
tagsarray<object>optional
An array of tags, each with an identifier and name.
200Returns the pet object, including its identifier, name, photo URLs, status, category, and tags.
categoryobjectoptional
idintegeroptional
namestringrequired
photoUrlsarray<string>required
statusstringoptional
pet status in the store
tagsarray<object>optional
400Returned when the input is invalid.
422Returned when validation fails.
defaultReturned when an unexpected error occurs.
Error handling
A 400 is returned for invalid input, and a 422 is returned when validation fails. name and photoUrls are required; status, if provided, must be one of: available, pending, or sold.