My API
POST/pet/{petId}/uploadImage

Upload an image for a pet

Uploads an image file for a pet. Send the image as binary data in the request body. Optionally include additionalMetadata as a query parameter to attach extra information. Returns a response object with upload status and details.

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

2 parameters
petIdintegerrequired
The unique identifier of the pet to upload an image for.
additionalMetadatastringoptional
Optional metadata to attach to the uploaded image.

4 status codes
200Returns an upload response object containing a code, type, and message indicating successful upload.
codeintegeroptional
typestringoptional
messagestringoptional
400Returned when no file is uploaded or the request is malformed.
404Returned when no pet exists with the given `petId`.
defaultUnexpected error

Error handling

A 404 is returned if no pet exists with the given petId. A 400 is returned when no file is uploaded or the request is malformed. petId must be a valid integer.