My API
MMy API
API Reference
POSTCreate a pet in the store/petPUTReplace a pet in the store/petGETGet a pet by ID/pet/{petId}POSTUpdate a pet with form data/pet/{petId}DELETEDelete a pet/pet/{petId}GETFinds Pets by status./pet/findByStatusGETFinds Pets by tags./pet/findByTags
POSTUpload an image for a pet/pet/{petId}/uploadImage
GETGet inventory quantities by status/store/inventoryPOSTPlace an order for a pet/store/order
GETFind purchase order by ID./store/order/{orderId}DELETEDelete purchase order by identifier./store/order/{orderId}
POSTCreate a user account/userGETGet a user by username/user/{username}PUTReplace user details/user/{username}DELETEDelete a user account/user/{username}POSTCreate users from a list/user/createWithListGETLog in a user/user/loginGETLog out the authenticated user/user/logout
llms.txtPowered by Octri
DELETE/pet/{petId}

Delete a pet

Deletes a pet record from the store. Supply petId to identify the pet to delete, and include api_key if your request requires an API key. The operation confirms deletion when it succeeds.

2 parameters
petIdintegerrequired

The integer identifier of the pet to delete.

api_keystringoptional

An optional API key header.

3 status codes
200Confirms that the pet was deleted.
400Returned when the supplied pet value is invalid.
defaultReturned when an unexpected error occurs.

Error handling

A 400 is returned when the petId path parameter has an invalid value. The optional api_key header can be included with the request.

import os

from my_api_sdk import ClientConfig, ClientAuthConfig, SwaggerPetstoreOpenAPI30

config = ClientConfig(
    base_url="/api/v3",
    auth=ClientAuthConfig(bearer=os.environ["SWAGGER_PETSTORE_TOKEN"]),
)
client = SwaggerPetstoreOpenAPI30(config)

client.pet.delete(pet_id=7082)
PreviousUpdate a pet with form dataNextUpload an image for a pet