POST
/pet/{petId}/uploadImageUpload a pet image
Uploads an image for a pet. Send the image as binary data and use petId to identify the pet; you can include optional additionalMetadata with the request. The response contains information about the upload.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
petIdintegerrequired
The int64 identifier of the pet to which you are uploading an image.
additionalMetadatastringoptional
Optional metadata to include with the image upload.
200Returns an upload result object containing a code, type, and message.
codeintegeroptional
typestringoptional
messagestringoptional
400Returned when no file is uploaded.
404Returned when the 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 to receive the image.