POST/store/order

Place a pet order

Creates a new order in the store for a pet. The request body is optional; when you provide status, it must be placed, approved, or delivered, and shipDate must use the ISO 8601 date-time format.

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

6 body fields

Optional order details. All fields can be omitted.

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

4 status codes
200Returns the order object, including its identifier, pet ID, quantity, shipping date, status, and completion state.
idintegeroptional
petIdintegeroptional
quantityintegeroptional
shipDatestringoptional
statusstringoptional
Order Status
Allowed:placedapproveddelivered
completebooleanoptional
400Returned when the request contains invalid input.
422Returned when the request fails validation.
defaultUnexpected error

Error handling

A 400 is returned for invalid input, and a 422 for a validation exception. If provided, status must be one of placed, approved, or delivered, and shipDate must be an ISO 8601 date-time.