Update a Checklist Response
You may need to update a response to a checklist question you submitted earlier. After our technician Adam checked out of the work order, he noticed that another light in the back area of the location was blinking. Let’s put things where they should belong and modify the technician’s answer to the last checklist question (How many lights need repair or replacement?). We will also change the attached picture.
Before proceeding, retrieve checklist responses for a work order, and save the Id
of the response you want to update. If you also need to change the uploaded attachment, look for the file Id
within Pictures
.
PUT /checklists/{checkListResponseId}/CheckListResponse
Header | Value |
---|---|
Content-Type | multipart/form-data; boundary=—-WebKitFormBoundary7MA4YWxkTrZu0gW |
Parameter | Parameter type | Required | Description |
---|---|---|---|
checkListResponseId | Path | Required | ID of the checklist response you are updating. |
CheckListResponsePictureId | formData | Required for questions with the PictureFlag parameter set to 2 |
ID of the file attached to the checklist response you are updating. You can pass this parameter if adding an attachment to a checklist question is required or optional. |
CheckListResponseRequest | formData | Required | Request to update a response to a checklist question. See CheckListResponseRequest in the guide about submitting a checklist response for details. |
file | formData | Required for questions with the PictureFlag parameter set to 2 |
File to attach to the checklist response. You can submit a file if adding an attachment to a checklist question is required or optional. |
Example request for a Numeric Input question:
PUT https://sb2api.servicechannel.comv3/checklists/1932693/CheckListResponse HTTP/1.1
Authorization: Bearer {access_token}
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="CheckListResponseRequest"
{
"CheckListQuestionID": 3837,
"ProviderID": 2000090505,
"TechnicianID": 371122,
"Answer": 2,
"EntityID": 180088351,
"Attempt": 1
}
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="CheckListResponsePictureId"
114062
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="/C:/light-bulbs.jpg"
Content-Type: image/jpeg
(data)
----WebKitFormBoundary7MA4YWxkTrZu0gW
Example response
{
"CheckListResponse": {
"CheckListQuestionId": 3837,
"CheckListQuestionOptionId": null,
"ProviderId": 2000090505,
"TechnicianId": 371122,
"Id": 1932693,
"Answer": "2",
"FreeTextAnswer": null,
"EntityId": 180088351,
"EntityTypeId": 0,
"Attempt": 1,
"UpdatedDate": "2021-06-07T10:32:05.84",
"UpdatedDateDto": "2021-06-07T10:32:05.84-04:00"
},
"CheckListResponsePicture": {
"Id": 114062,
"CheckListResponseId": 1932693,
"DocumentName": "light-bulbs.jpg",
"DocumentPath": "#workorders/dee30b9f-1cec-45f3-a47c-ad6f9c75b1dd",
"ThumbnailPath": "#workorders/7f3cdd5c-b325-4927-a864-cb7f808f470d",
"HasThumbnail": true,
"UpdatedBy": null
}
}
Response code: HTTP/1.1 200 OK