POST
/petCreate a pet in the store
Creates a new pet record in the store. Provide name and photoUrls; status, when supplied, must be available, pending, or sold. The response includes the created pet details.
- 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.
idintegeroptional
The pet's integer identifier.
namestringrequired
The pet's name.
categoryobjectoptional
The pet's category, represented by an object with an identifier and name.
photoUrlsarray<string>required
The pet's photo URLs.
tagsarray<object>optional
Tags for the pet, represented as objects with identifiers and names.
statusstringoptional
pet status in the store
200Returns the pet object, including its name, photo URLs, and any supplied identifier, category, tags, and status.
idintegeroptional
namestringrequired
categoryobjectoptional
photoUrlsarray<string>required
tagsarray<object>optional
statusstringoptional
pet status in the store
400Returned when the input is invalid.
422Returned when pet data fails validation.
defaultReturned when an unexpected error occurs.
Error handling
A 400 is returned when input is invalid, including when name or photoUrls is missing. A 422 is returned when the pet data fails validation; status must be available, pending, or sold.