/results /attachments – update

Description

Enables you to update ( replace ) files already submitted to assessment result.

Request

POST https://api.smartrecruiters.com/v1/assessments/{assessmentOrderId}/results/{resultId}/attachments/{attachmentId}

Path Parameters

name type description
assessmentOrderId string unique id of an assessment order
resultId string unique id of result id
attachmentId string unique id of an attachment

Query Parameters

n/a

Request Body

To update a file attached to assessment result, please ensure that the POST request has the following shape:

POST /assessments/511a3942300469a9c33819d1/results/511a3942300469a9c33819d1/attachments 511a3942300469a9c33819d8 HTTP/1.1
Content-Type: multipart/form-data; boundary=---------------------------7d44e178b0434
Host: api.smartrecruiters.com
Content-Length: 178532
Accept: application/json
X-SmartToken: abc123
-----------------------------7d44e178b0434 Content-Disposition: form-data; name="attachment"; filename="JavaTestScore.pdf" Content-Type: application/pdf

-----------------------------7d44e178b0434

Response Body

Instance of AssessmentResultAttachment with updated content

Example request

curl -i -H "X-SmartToken:abc123" -F "attachment=@JavaTestScore.pdf;type=application/pdf" -X POST https://api.smartrecruiters.com/v1/assessments/511a3942300469a9c33819d1/results/511a3942300469a9c33819d1/attachments/511a3942300469a9c33819d8

Example response

1
2
3
4
5
6
{
    "id": "511a3942300469a9c33819d8",
    "createDate": "2013-03-13T14:44:24.108+0000",
    "lastUpdateDate": "2013-03-15T10:20:12.108+0000",
    "fileName": "JavaTestScore.pdf"
}