POST/store/order

Create a pet order

Creates a new order for a pet in the store. You can supply the pet identifier, quantity, shipping date, status, and completion flag; status, if provided, must be placed, approved, or delivered. The response contains the order details.

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

6 body fields

Order details. The request body and all of its fields are optional.

completebooleanoptional

Whether the order is complete.

idintegeroptional

The order's int64 identifier.

petIdintegeroptional

The int64 identifier of the pet in the order.

quantityintegeroptional

The order quantity as an int32 value.

shipDatestringoptional

The shipping date and time in date-time format.

statusstringoptional

Order Status

Allowed:placedapproveddelivered

4 status codes
200Returns the order object, including its identifiers, quantity, shipping date, status, and completion flag.
completebooleanoptional
idintegeroptional
petIdintegeroptional
quantityintegeroptional
shipDatestringoptional
statusstringoptional

Order Status

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

Error handling

A 400 is returned when the input is invalid, and a 422 when validation fails. status, when provided, must be one of placed, approved, or delivered; shipDate, when provided, must use date-time format.