Swagger Petstore - OpenAPI 3.0
POST/store/order

Place a pet order

Creates a new order for a pet in the store. Provide order details such as petId, quantity, shipDate, status, and complete when you need to control the order record. The response contains the created order and its current fulfillment state.

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

6 body fields

Optional order details for the pet purchase.

idintegeroptional
The order's numeric identifier.
petIdintegeroptional
The numeric identifier of the pet being ordered.
quantityintegeroptional
The number of pets included in the order.
shipDatestringoptional
The scheduled shipping date and time in ISO 8601 date-time format.
statusstringoptional
Order Status
Allowed:placedapproveddelivered
completebooleanoptional
Whether the order is complete.

4 status codes
200Returns the created order object, including its identifier, pet identifier, quantity, shipping date, status, and completion state.
idintegeroptional
petIdintegeroptional
quantityintegeroptional
shipDatestringoptional
statusstringoptional
Order Status
Allowed:placedapproveddelivered
completebooleanoptional
400Returned when the submitted order input is invalid.
422Returned when the order fails validation.
defaultReturned when an unexpected error occurs.

Error handling

Invalid order input returns a 400, and validation failures return a 422. shipDate must use ISO 8601 date-time format when supplied. status must be one of: placed, approved, or delivered.