**Version: 202201**

# Update Order Risk

**PUT** `/openapi/2022-01/orders/:order_id/risks/:id`

Modifies the risk level, detail reasons, or custom properties of an existing risk record on the order. The record is located by its id; the order itself is unchanged.

## Request

**Path Parameters**

- `order_id` string (required)

  Order's ID
- `id` string (required)

  Risk's ID

**application/json**

**Body | Example**

**Body**

- `risk` object

  - `level` string (required)

    Risk level, such as: `low`, `medium`, `high`
  - `details` string[] (required)

    Risk details list
  - `properties` object

    Custom properties

    - `key` string

      value

```json
{
  "risk": {
    "level": "string",
    "details": [
      "string"
    ],
    "properties": {
      "key": "string"
    }
  }
}
```

## Responses

**200 | 422**

200

**application/json**

**Schema | Example | Result**

**Schema**

- `risk` object

  - `id` string

    **Example:** `372997190408224746`
  - `order_id` string

    **Example:** `633130-00000015`
  - `level` string

    **Example:** `medium`
  - `value` string[]
  - `properties` object

    - `key` string

      **Example:** `value`
  - `created_at` string

    **Example:** `2024-04-25T06:37:40Z`
  - `updated_at` string

    **Example:** `2024-04-25T07:38:11Z`

```json
{
  "risk": {
    "id": "372997190408224746",
    "order_id": "633130-00000015",
    "level": "medium",
    "value": [
      "qqqqq"
    ],
    "properties": {
      "key": "value"
    },
    "created_at": "2024-04-25T06:37:40Z",
    "updated_at": "2024-04-25T07:38:11Z"
  }
}
```

```json
{
  "risk": {
    "id": "372997190408224746",
    "order_id": "633130-00000015",
    "level": "medium",
    "value": [
      "qqqqq"
    ],
    "properties": {
      "key": "value"
    },
    "created_at": "2024-04-25T06:37:40Z",
    "updated_at": "2024-04-25T07:38:11Z"
  }
}
```

422

**application/json**

**Schema | Example | Result**

**Schema**

- `errors` string[]

```json
{
  "errors": [
    "Details is required"
  ]
}
```

```json
{
  "errors": [
    "Details is required",
    "Level is required"
  ]
}
```
