POST/pet/{petId}/uploadImage

Upload a pet image

Uploads an image for a pet in the store. Supply the pet's petId and send the image as binary data; use additionalMetadata to include optional metadata.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 parameters
petIdintegerrequired
The int64 identifier of the pet to attach the image to.
additionalMetadatastringoptional
Optional metadata to include with the uploaded image.

4 status codes
200Returns an upload result object with a code, type, and message.
codeintegeroptional
typestringoptional
messagestringoptional
400Returned when the request does not include a file.
404Returned when the specified pet is not found.
defaultUnexpected error

Error handling

A 400 is returned when no file is uploaded, and a 404 when the pet is not found. The petId path parameter must identify the pet that will receive the image.