**版本：202201**

# 更新订单风险记录

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

通过风险记录 id 修改其风险等级、详情原因或自定义属性，订单本身不变。

## 请求

**Path参数**

- `order_id` string (required)

  订单 ID。
- `id` string (required)

  订单风险记录 ID。

**application/json**

**请求体 | 示例**

**请求体**

- `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"
    }
  }
}
```

## 响应

**200 | 422**

200

**application/json**

**数据结构 | 示例 | Result**

**数据结构**

- `risk` object

  - `id` string

    **示例：** `372997190408224746`
  - `order_id` string

    **示例：** `633130-00000015`
  - `level` string

    **示例：** `medium`
  - `value` string[]
  - `properties` object

    - `key` string

      **示例：** `value`
  - `created_at` string

    **示例：** `2024-04-25T06:37:40Z`
  - `updated_at` string

    **示例：** `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**

**数据结构 | 示例 | Result**

**数据结构**

- `errors` string[]

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

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