/results /attachments – insert

Description

Enables you to attach files to and submit a new assessment result.

Request

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

Path Parameters

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

Query Parameters

n/a

Request Body

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

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

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

Response Body

Instance of AssessmentResultAttachment with generated unique ID and create date

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

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": "JetLi_JavaTest.pdf"
}