POST/store/order

Place an order for a pet

Creates a new order for a pet in the store. You can supply order details such as petId, quantity, and status; status must be placed, approved, or delivered if provided. A 200 response returns the order record.

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

6 body fields

Optional order details for the pet store.

idintegeroptional
The order's unique identifier.
petIdintegeroptional
The identifier of the pet being ordered.
quantityintegeroptional
The number of pets in the order.
shipDatestringoptional
The order's 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 order record, including its identifier, pet, quantity, shipping date, status, and completion state.
idintegeroptional
petIdintegeroptional
quantityintegeroptional
shipDatestringoptional
statusstringoptional
Order Status
Allowed:placedapproveddelivered
completebooleanoptional
400Returned when the input is invalid.
422Returned when the request fails validation.
defaultUnexpected error

Error handling

Invalid input returns a 400, and a validation exception returns a 422. If supplied, shipDate must be an ISO 8601 date-time and status must be one of placed, approved, or delivered.