POST/pet/{petId}/uploadImage

Upload a pet image

Uploads an image for a pet in the store. Use petId to identify the pet and send the image as a binary request body; additionalMetadata can include optional details about the upload. The response provides the upload result and its message.

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

2 parameters
petIdintegerrequired
The int64 integer identifier of the pet to upload an image for.
additionalMetadatastringoptional
Optional metadata describing the image upload.

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

Error handling

A 400 is returned when no file is uploaded, and a 404 is returned when the pet is not found. The petId path parameter must be an int64 integer; send the image in the binary request body.