POST/pet/{petId}/uploadImage

Upload a pet image

Uploads an image for a specific pet. Supply petId and send the image as binary request content; use additionalMetadata to associate descriptive metadata with the upload. The response contains the processing result and any returned message.

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

2 parameters
petIdintegerrequired

The unique integer identifier of the pet whose image to upload.

additionalMetadatastringoptional

Optional metadata to associate with the uploaded pet image.

4 status codes
200Returns an upload result containing a code, result type, and message.
codeintegeroptional
typestringoptional
messagestringoptional
400Returned when no file is uploaded.
404Returned when no pet exists with the supplied petId.
defaultUnexpected error

Error handling

The petId value must identify an existing pet, and the request must include a file; omitting the file returns a 400. A 404 is returned when no pet exists for the supplied petId.