# Place an order for a pet

`POST /store/order`

Operation ID: `placeOrder`

Tags: `store`

OpenAPI specification: https://raw.githubusercontent.com/PaloAltoNetworks/docusaurus-openapi-docs/main/demo/examples/petstore.yaml

## Servers

- `https://petstore.swagger.io/v2`: Default server
- `https://petstore.swagger.io/sandbox`: Sandbox server
- `http://127.0.0.1:4010`: Prism Mock API (local)

## Request body (required)

order placed for purchasing the pet

### Content type: `application/json`

Schema: `Order`

- `id` (integer<int64>, read-only)
  Order ID
- `petId` (integer<int64>, read-only)
  Pet ID
- `quantity` (integer<int32>, >= 1, default: `1`)
- `shipDate` (string<date-time>)
  Estimated ship date
- `status` (string, possible values: `placed`, `approved`, `delivered`)
  Order Status
- `complete` (boolean, read-only, default: `false`)
  Indicates whenever order was completed or not
- `requestId` (string, write-only)
  Unique Request Id

Example `OrderDelivered (Order delivered)`:

```json
{
  "quantity": 4,
  "shipDate": "2022-10-12",
  "status": "delivered",
  "requestId": "444-4444-444-4444"
}
```

Example `OrderPlaced (Order placed)`:

```json
{
  "quantity": 10,
  "shipDate": "2022-10-01",
  "status": "placed",
  "requestId": "111-222-333-444"
}
```

Example `OrderApproved (Order approved)`:

```json
{
  "quantity": 1000,
  "shipDate": "2022-09-01",
  "status": "approved",
  "requestId": "000-111-222-333"
}
```

## Responses

### 200

successful operation

#### Content type: `application/json`

Schema: `Order`

- `id` (integer<int64>, read-only)
  Order ID
- `petId` (integer<int64>, read-only)
  Pet ID
- `quantity` (integer<int32>, >= 1, default: `1`)
- `shipDate` (string<date-time>)
  Estimated ship date
- `status` (string, possible values: `placed`, `approved`, `delivered`)
  Order Status
- `complete` (boolean, read-only, default: `false`)
  Indicates whenever order was completed or not
- `requestId` (string, write-only)
  Unique Request Id

#### Content type: `application/xml`

Schema: `Order`

- `id` (integer<int64>, read-only)
  Order ID
- `petId` (integer<int64>, read-only)
  Pet ID
- `quantity` (integer<int32>, >= 1, default: `1`)
- `shipDate` (string<date-time>)
  Estimated ship date
- `status` (string, possible values: `placed`, `approved`, `delivered`)
  Order Status
- `complete` (boolean, read-only, default: `false`)
  Indicates whenever order was completed or not
- `requestId` (string, write-only)
  Unique Request Id

### 400

Invalid Order

#### Content type: `application/json`

Example:

```json
{
  "status": 400,
  "message": "Invalid Order"
}
```
