# Create an order (long content type and example names)

`POST /orders`

Operation ID: `createOrderManyCodes`

Tags: `many-response-codes`

Many status codes, a long vendor content type and named examples.
The content type and example selects shorten with an ellipsis; the
status codes stay visible and scroll.

## Servers

- `https://api.example.com`

## Request body (required)

### Content type: `application/json`

Schema: `object`

Order

- `id` (string, example: `ord_123`)
- `status` (string, possible values: `pending`, `paid`, `shipped`)
- `note` (string)

## Responses

### 201

The order was created.

#### Content type: `application/vnd.example.order.v2+json; charset=utf-8`

Schema: `object`

Order

- `id` (string, example: `ord_123`)
- `status` (string, possible values: `pending`, `paid`, `shipped`)
- `note` (string)

Example `pendingOrderWithAllOptionalFieldsPopulated (A pending order with every optional field populated)`:

```json
{
  "id": "ord_123",
  "status": "pending",
  "note": "Leave at the front desk"
}
```

Example `minimal (Minimal order)`:

```json
{
  "id": "ord_124",
  "status": "pending"
}
```

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

Schema: `object`

Order

- `id` (string, example: `ord_123`)
- `status` (string, possible values: `pending`, `paid`, `shipped`)
- `note` (string)

### 202

The order was accepted for processing.

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

Schema: `object`

Order

- `id` (string, example: `ord_123`)
- `status` (string, possible values: `pending`, `paid`, `shipped`)
- `note` (string)

### 400

Bad Request - The request is not valid.

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

Schema: `object`

Error

- `error` (object)
  - `error.message` (string, example: `The request could not be processed`)

### 401

Unauthorized - Authentication is required.

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

Schema: `object`

Error

- `error` (object)
  - `error.message` (string, example: `The request could not be processed`)

### 403

Forbidden - The caller cannot access this order.

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

Schema: `object`

Error

- `error` (object)
  - `error.message` (string, example: `The request could not be processed`)

### 409

Conflict - The order changed since it was read.

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

Schema: `object`

Error

- `error` (object)
  - `error.message` (string, example: `The request could not be processed`)

### 413

Payload Too Large.

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

Schema: `object`

Error

- `error` (object)
  - `error.message` (string, example: `The request could not be processed`)

### 415

Unsupported Media Type - The media type is not supported.

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

Schema: `object`

Error

- `error` (object)
  - `error.message` (string, example: `The request could not be processed`)

### 422

The order failed validation.

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

Schema: `object`

Error

- `error` (object)
  - `error.message` (string, example: `The request could not be processed`)

### 429

Too Many Requests - Retry after the time in Retry-After.

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

Schema: `object`

Error

- `error` (object)
  - `error.message` (string, example: `The request could not be processed`)

### 503

The service is temporarily unavailable.

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

Schema: `object`

Error

- `error` (object)
  - `error.message` (string, example: `The request could not be processed`)
