POST/store/order

Place a pet order

Creates a new order for a pet in the store. The request body is optional, so provide order details such as petId, quantity, and status when needed. If supplied, status must be placed, approved, or delivered.

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

6 body fields

Optional order details in JSON, XML, or URL-encoded form.

idintegeroptional
The order's 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 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 order input is invalid.
422Returned when order data fails validation.
defaultReturned when an unexpected error occurs.

Error handling

When provided, status must be one of: placed, approved, or delivered, and shipDate must use ISO 8601 date-time format. Invalid input returns a 400, and a validation exception returns a 422.