Uploads an image.
Upload image of the pet.
POST
/pet/{petId}/uploadImagePath parameters
petIdinteger<int64>requiredID of pet to update
Query parameters
additionalMetadatastringAdditional Metadata
Request body
application/octet-streamanyResponses
200successful operation
codeinteger<int32>typestringmessagestring400No file uploaded
404Pet not found
defaultUnexpected error
Request
curl -X POST "/api/v3/pet/0/uploadImage" \
-H "Content-Type: application/octet-stream" \
-d 'null'const response = await fetch("/api/v3/pet/0/uploadImage", {
method: "POST",
headers: {
"Content-Type": "application/octet-stream"
},
body: JSON.stringify(null)
});import requests
response = requests.post(
"/api/v3/pet/0/uploadImage",
headers={
"Content-Type": "application/octet-stream"
},
json=None,
)Response
{
"code": 0,
"type": "string",
"message": "string"
}No file uploaded
Pet not found
Unexpected error