Pets
Update a pet with form data
Change a pet name or status with query parameters.
Updates a pet identified by the path and returns the resulting Pet object.
Update a pet resource from name and status query values.
POST
/pet/{petId}OAuth 2.0 bearer token with `write:pets` and `read:pets` scopes.
ID of the pet to update.
New pet name.
New pet status.
Response
{200}Successful operation
{400}Invalid input
cURL
curl --request POST \ --url https://petstore3.swagger.io/api/v3/pet/10?name=doggie&status=sold \ --header 'Authorization: Bearer example_access_token'
{
"id": 10,
"name": "doggie",
"photoUrls": ["https://example.com/images/doggie.jpg"],
"status": "sold"
}The contract does not constrain the status query parameter to the Pet enum on this operation. The response still uses the Pet schema. A default Unexpected error response is also defined without a fixed status or body schema.