POST
/pet/{petId}/uploadImageUpload an image for a pet
Uploads an image file for a pet. Send the image as binary data in the request body. Optionally include additionalMetadata as a query parameter to attach extra information. Returns a response object with upload status and details.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
petIdintegerrequired
The unique identifier of the pet to upload an image for.
additionalMetadatastringoptional
Optional metadata to attach to the uploaded image, such as a description or tags.
200Returns an upload response object containing a code, type, and message confirming successful upload.
codeintegeroptional
typestringoptional
messagestringoptional
400Returned when no file is uploaded or the request body is empty.
404Returned when no pet exists with the given `petId`.
defaultUnexpected error
Error handling
A 404 is returned if no pet exists with the given petId. A 400 is returned when no file is uploaded or the file is missing from the request body. petId must be a valid integer.