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
POST/store/order

Place an order for a pet

Creates a new order for a pet in the store. Provide any order details you want to set, including petId, quantity, and status as applicable; status must be placed, approved, or delivered. The request body is optional, so you can omit it when no order fields need to be supplied.

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

6 body fields

Optional order details to submit to the store.

idintegeroptional

The integer identifier of the order.

petIdintegeroptional

The integer identifier of the pet being ordered.

quantityintegeroptional

The number of pets in the order.

shipDatestringoptional

The order's shipping date and time in date-time format.

statusstringoptional

Order Status

Allowed:placedapproveddelivered
completebooleanoptional

Whether the order is complete.

4 status codes
200Returns the order object, including any supplied order identifier, pet identifier, quantity, shipping date, status, and completion value.
idintegeroptional
petIdintegeroptional
quantityintegeroptional
shipDatestringoptional
statusstringoptional

Order Status

Allowed:placedapproveddelivered
completebooleanoptional
400Returned when the order input is invalid.
422Returned when the order fails validation.
defaultReturned when an unexpected error occurs.

Error handling

A 400 is returned when the order input is invalid. A 422 is returned when the order fails validation; status, if supplied, must be placed, approved, or delivered, and shipDate must use a date-time format.

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)

result = client.store.place_order()
Response
{
  "id": 10,
  "petId": 198772,
  "quantity": 7,
  "shipDate": "2026-01-15T09:00:00Z",
  "status": "approved",
  "complete": true
}
PreviousGet inventory quantities by stat…NextFind purchase order by ID.