POST/store/order

Place an order for a pet

Creates an order for a pet in the store. You can provide the pet identifier, quantity, shipping date, completion state, and order status; status must be placed, approved, or delivered. The response contains the order object.

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

6 body fields

Order details to submit to the store; all fields are optional.

completebooleanoptional

Whether the order is complete.

idintegeroptional

The order's int64 identifier.

petIdintegeroptional

The int64 identifier of the pet being ordered.

quantityintegeroptional

The quantity of pets in the order.

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 identifier, quantity, shipping date, completion state, and status.
completebooleanoptional
idintegeroptional
petIdintegeroptional
quantityintegeroptional
shipDatestringoptional
statusstringoptional

Order Status

Allowed:placedapproveddelivered
400Returned when the input is invalid.
422Returned when validation fails.
defaultReturned when an unexpected error occurs.

Error handling

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