POST/pet/{petId}/uploadImage

Upload a pet image

Uploads an image for a pet. Use the petId path parameter to identify the pet and send the image as an application/octet-stream request body. You can include additionalMetadata to provide extra information about the upload.

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

2 parameters
petIdintegerrequired
The integer identifier of the pet whose image you are uploading.
additionalMetadatastringoptional
Optional metadata to include with 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 pet is not found.
defaultUnexpected error

Error handling

A 400 is returned when no file is uploaded. A 404 is returned when the petId path parameter does not identify a pet.