POST
/pet/{petId}/uploadImageUpload an image for a pet
Uploads an image for a pet. Use the petId path parameter to identify the pet, and optionally provide additionalMetadata with the upload. Send the image as an application/octet-stream request body.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
petIdintegerrequired
The 64-bit integer identifier of the pet whose image you are uploading.
additionalMetadatastringoptional
Optional additional metadata to associate 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 cannot be found.
defaultReturned when an unexpected error occurs.
Error handling
A 400 is returned when no file is uploaded; send the image in the request body as application/octet-stream. A 404 is returned when the petId path parameter does not identify a pet.