The AddFormAnswerDocument() command allows the user to add a document answer to a form.
|
| Parameter | Type | Max Length | Required | Description |
|---|---|---|---|---|
| apiToken | string | 50 | y | Your Field View API token. |
| formAnswerId | string | y | The form answer ID to which the document will be added. | |
| documentBytes | string | 15MB | y | The contents of the document. |
| fileName | string | 255 | y | The file name of the document you wish to attach to the form. |
| Field | Type | Description |
|---|---|---|
| formAnswerId | string | If successful, the form answer ID to which the document was added. |
| status | success or fail message | The status of the request. |
Sample request
<AddFormAnswerDocument>
<apiToken>F4CB1F55BB64625BD0F6A588DECB3D03F17B87F </apiToken>
<formAnswerId>2.1845</formAnswerID>
<documentBytes>dGVzdCBmaWxlIGNvbnRlbnRz</documentBytes>
<fileName>test-document.txt<fileName>
</AddFormAnswerDocument>
Sample response
<AddFormAnswerDocumentResponse>
<AddFormAnswerDocumentResult>{"ID":"F1.1901","Status":{"Code":2,"Message":"Success. [ActivityId]: ccbe011c-59c9-4c8d-ae31-791905398a93"}} </AddFormAnswerDocumentResponse>
</AddFormAnswerDocumentResponse>