POST/store/order

Create a pet order

Creates an order for a pet in the store. Supply order details in the optional body; status accepts placed, approved, or delivered, and shipDate uses an ISO 8601 date-time.

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

6 body fields

Optional order details; all fields can be omitted.

completebooleanoptional

Whether the order is complete.

idintegeroptional

The order's identifier as a 64-bit integer.

petIdintegeroptional

The identifier of the pet being ordered as a 64-bit integer.

quantityintegeroptional

The quantity ordered as a 32-bit integer.

shipDatestringoptional

The shipping date and time in date-time format.

statusstringoptional

Order Status

Allowed:placedapproveddelivered

4 status codes
200Returns the order object, including its identifier, pet ID, quantity, shipping date, status, and completion state.
completebooleanoptional
idintegeroptional
petIdintegeroptional
quantityintegeroptional
shipDatestringoptional
statusstringoptional

Order Status

Allowed:placedapproveddelivered
400Returned when the input is invalid.
422Returned when the request fails validation.
defaultUnexpected error

Error handling

A 400 is returned for invalid input, and a 422 indicates a validation exception. If supplied, status must be one of placed, approved, or delivered, and shipDate must use the date-time format.