POST/pet/{petId}/uploadImage

Upload an image for a pet

Uploads an image for a pet in the store. Identify the pet with petId and send the image as a binary request body; you can include additionalMetadata as a query parameter. The response includes a code, message, and type describing the upload result.

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

2 parameters
petIdintegerrequired

The int64 identifier of the pet to attach the image to.

additionalMetadatastringoptional

Additional metadata to include with the image upload.

4 status codes
200Returns an object containing a code, message, and type for the upload result.
codeintegeroptional
messagestringoptional
typestringoptional
400Returned when no file is uploaded.
404Returned when the pet is not found.
defaultReturned when an unexpected error occurs.

Error handling

A 400 is returned when no file is uploaded, and a 404 is returned when the pet is not found. The petId path parameter must identify the pet to update; send the image in the binary request body.