更新工单

PUT /apiv2/tickets/{id}.json
调用权限

agent

curl示例
curl https://{subdomain}.kf5.com/apiv2/tickets/{id}.json \
  -H "Content-Type: application/json" \
  -d '{"ticket":{"status":"solved",   \
       "comment":{"public":true, "content": "Thanks, this is now solved!"}}}' \
  -v -u {email_address}:{password} -X PUT
返回示例
Status: 200 OK{
  "ticket": {
     "id":      123,
     "title": "Let's create ticket",
     "status":  "solved",
     ...  }}
请求参数
NameTypeDescription
titlestring标题
commentobject工单回复,请参考 Ticket Comments API
assignee_idinteger受理客服id
group_idinteger受理客服组id
typestring可选值:"problem", "incident", "question", "task"
statusstring可选值:"new","open", "pending", "solved", "closed"
prioritystring可选值:"low", "medium", "high", "urgent"
problem_idinteger类型为incident时,关联的故障工单id
due_atdate类型为task时,截止日期
tagsarray要给工单添加的标签数组
collaborator_idsarray副本用户数组
custom_fieldsarray工单自定义字段 [{"name":"field_788","value":"自定义字段"}]
示例请求
{
  "ticket":{
	    "status": "solved",
	    "comment":{
	          "content": "the content",
	          "html_content": "the content",
	          "public": true,
	          "uploads": {"token":"0015ce392ec1919d564e63a46e54eb8"}
	     },
	     "custom_fields":[
	         {"name":"field_1014099","value":"技术支持申请/"},
	         {"name":"field_1014205","value":"[\"服务器品牌\",\"DELL\"]"}
	      ],
	      "tags":["t3","t4"],
	      "due_at":"2019-04-09 18:00:10",
	    "collaborator_ids":["60058513"]
	}
}