Add or Update a Worksheet Answer Image
Sets the answer to a worksheet question. Can be called before a job is sent to the device to pre-populate the worksheet. The question must require a photo as the answer. Will replace any existing image set as the answer.
Query String Parameters
Name | Type | Description | Required |
---|---|---|---|
Action | String | JobSaveWorksheetAnswerImage | Required |
JobId | Int | Required | |
JobRef | String | Job reference. | Required |
QuestionId | Int | Required | |
AnswerNote | String | Answer note value. | Optional |
AddWorksheetIfNotPresent | Bool | If true, will add the worksheet to the job if not already present. 1 (true) or 0. | Optional |
POST Body Parameters
Name | Type | Description | Note |
---|---|---|---|
Files | multipart MIME format | ||
Attachments | Json object | A serialised string containing details of the file to be uploaded. |
note
Example JSON object for attachment:
[
{
"Filename": "20190424_155521.jpg",
"Type": "image/jpg",
"Compressed": false
}
]
Response Codes
Code | Message | Information |
---|---|---|
0 | null | |
2 | questionId parameter required | |
2 | Only one image can be added as a worksheet answer. | |
2 | jobResult | |
2 | questionResult | |
2 | Attachment info not provided | |
2 | $No information provided for file {file.FileName} | |
2 | $Multiple information objects provided for {file.FileName} | |
2 | ex.Message | |
2 | new { Blocked = blockedFiles } |
Example
- Request
- Response
Request URL
https://webservice.bigchange.com/v01/services.ashx?action=jobsaveworksheetanswerimage
Response Data
{ "Code": 0, "Result": [ { "ContactNoteId": "12345" } ] }