POST/pet/{petId}/uploadImage

Upload an image for a pet

Uploads an image for a pet in the store. Supply petId to identify the pet, and optionally provide additionalMetadata to accompany the upload. Send the image as binary request content.

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

2 parameters
petIdintegerrequired
The integer identifier of the pet to associate with the uploaded image.
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 does not exist.
defaultReturned when an unexpected error occurs.

Error handling

A 400 is returned when no file is uploaded. A 404 is returned when no pet exists with the supplied identifier; the petId path parameter selects the pet for the upload.