Update Answer
/answers/{id}
Update Account [PATCH]
Update an existing answer.
Authorization: Admin, Web, Mobile
Request
Body
Resolve Payload Example
{
"resolveDueAt": "2012-08-24T11:47:21-04:00Z",
"resolveNote": "action taken",
"resolved": "true",
"resolvedAt": "2012-08-24T11:47:21-04:00Z",
"userId": "190"
}
Selection(s) Payload Example
{
"selectionIds": [
14822
]
}
Value Payload Example
{"value":"Text Answer"}
Table Payload Example:
{"table":[{"id":"9adc47bc-6f24-f111-846a-0e3ce2c1dbad","values":["1","2",""]}]}
Response 200
Body
{
"item": {
"id": 89122345,
"guid": "DA946600-EDBF-11E1-8000-74E1B6B5FF7A",
"formulaUsed": false,
"createdAt": "2012-08-24T11:47:21-04:00Z",
"modifiedAt": "2012-08-24T11:47:21-04:00Z",
"modifiedBy": {
"id": 190,
"firstName": "Homer",
"lastName": "Simpson"
},
"complete": true,
"resolved": true,
"resolvedAt": "2012-08-24T11:47:21-04:00Z",
"resolvedBy": {
"id": 190,
"firstName": "Homer",
"lastName": "Simpson"
},
"resolveNote": "action taken",
"priorityId": 2,
"photosCount": 2,
"question": {
"id": 89270,
"title": "What is the condition of the workspace?",
"definition": "Inspect the areas around work thoroughly",
"type": {
"name": "singleSelect",
"displayName": "Single Select",
"id": 1
}
},
"payload": {//see payloads above//},
"form": {
"id": 118011,
"name": "Daily Inspection Worksheet",
"rowStatus": 1
},
"assignedTo": {
"id": 190,
"firstName": "Homer",
"lastName": "Simpson"
},
"assetId": 22738,
"folderId": 9018,
"resolveDueAt": "2012-08-24T11:47:21-04:00Z",
"formId": 118011,
"accountId": 125190,
"folder": {
"id": 9018,
"num": "QC901",
"typeName": "Quality Checks",
"typeColor": "dddddd"
},
"asset": {
"id": 125190,
"id1": "1902-33331",
"id2": null
},
"account": {
"name": "Springfield Nuclear Plant",
"num": "SP109"
}
}
}
Updating an Answer
Only certain fields can be updated in the PATCH request. The fields that can be updated are below. Take note that this is a PATCH so only send the field that is changing in the request.
| Field | Description |
|---|---|
| assignedTo | Who this priority is assigned to. UserID |
| resolveNote | Any notes about the resolution of the priority. |
| comment | The value of the "Additional Comments" found on the answer. |
| priorityId | -1, 0, 1, 2, 3 |
| resolved | true/false |
| resolveDueAt | datetime |
| resolvedAt | datetime |
| value | The short text/number/date/time of the answer. See payloads to determine what types of answer this is. |
| selectionIds | A list of integers representing the selections that were made for the answer. See payloads for details. |
| uom | The Unit of Measure that can accompany a value entered |
| referenceId | Which "reference" or additional field was answered. This is paired with referenceValue below. |
| referenceValue | The value that accompanies the reference field that was answered. |