Upload File

Upload File

Upload image of the pet.

Request
URI
POST
https://petstore3.swagger.io/pet/{petId}/uploadImage
COPY
Path Parameters
integer
petId
Required

ID of pet to update

Query Parameters
string
additionalMetadata
Optional

Additional Metadata


Request Body
Authentication
This operation uses the following authentication methods.
Responses
200

successful operation

Returns ApiResponse of type(s) application/json
{
    "code": 0,
    "type": "string",
    "message": "string"
}
integer As int32 As int32
code
Optional

code

string
type
Optional

type

string
message
Optional

message


400

No file uploaded

Operation doesn't return any data structure

404

Pet not found

Operation doesn't return any data structure

default

Unexpected error

Returns Error of type(s) application/json
"Error Object"
string
code
Required

code

string
message
Required

message


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/octet-stream' https://{api_host}/pet/{petId}/uploadImage