通过指定荣誉奖项ID,更改当前登录用户的荣誉奖项数据。
Request
HTTP request
PATCH https://www.featapi.com/api/user/honors-awards/{id}/
Parameters
Path parameters
Parameter name | Value | Description |
---|---|---|
id | string | 荣誉奖项 ID |
Authorization
该请求需要授权以下scopes访问权限:
Scopes |
---|
user_honors |
For more information, see the authentication and authorization page.
Request body
In the request body, supply a User.honors resource with the following properties:
Property name | Value | Description | Notes |
---|---|---|---|
必填 | |||
organization | string | 荣誉奖项的颁发机构 | 纯文本 |
title | string | 荣誉奖项的主题 | 纯文本 |
issued_at | string | 荣誉奖项的获奖时间 | 日期格式: YYYY-MM-DD |
pic | file | 荣誉奖项的相关图片 | 仅允许图片文件 |
publish | boolean | 确定是否发布 | 默认:true |
Response
如果请求成功,根据path参数指定的数据ID,该API返回对应ID的User.Honors荣誉奖项在响应体信息。
201 Update an Honors successfully
{
"data": {
"id": 14,
"user": 7710697714770,
"title": "广州市三好学生",
"organization": "广州市教育局",
"issued_at": "1998-12-01",
"pic": "/media/7710697714770/honor_awards/African_Daisy_OFZ1bSd.gif",
"status": 100
}
}
400 Validation Exception
示例返回数据可参考 API Common – Validation Exception
404 Not found
示例返回数据可参考 API Common – Resource Not Found