Upload a CV
To add a CV to the application you’ll need the ID of the application (applicationId) and a file to upload. Learn here how to remove the CV again. There can be only one CV in an application. If you want to replace the CV by another you have to remove the old one first and then upload the new one. To get the CV file follow these steps.
HTTP-Method
POST
Path
/api/rest/v3/frontend/attachments/cv
Authentification
Path Parameter
-none-
Query Parameter
applicationId
Responses
Action | Response | Description |
---|---|---|
success | see example call | |
authorization error | 401 / 403 | See here and here for details. |
already present | 428 – { “code”: “precondition_failed_error”, “message”: “there is already a CV for this application. you have to remove the old one first before uploading a new one.” } | The application already contains a CV. That one has to be removed first. |
error | 404 – { “code”: “get_application_error” } | No application was found for the provided ID. |
error | 400 – { “code”: “get_application_error”, “message”: “Cannot retrieve applications of others” } | The application does not belong to the user issued in the token |
error | 400 – { “code”: “application_deleted_error”, “message”: “Cannot retrieve deleted application” } | The application has been deleted |
error | 400 – { “code”: “application_access_error”, “message”: “Application is not editable anymore” } | The application is not editable anymore. |
Example call with curl and user access token
1 |
curl -i -H "Authorization: Bearer a88a95e3-c7ed-4619-abfe-de84165a6ba6" -X POST -F "file=@cv.pdf" "https://api.softgarden.io/api/rest/v3/frontend/attachments/cv?applicationId=1b639d3b-57b3-4b31-9fac-83a8c5d9443a" |
Response:
1 2 3 4 5 6 7 |
{ "id" : "c157b89c-321d-409e-8be7-4d6e794cb9e1", "name" : "cv.pdf", "type" : "application/pdf", "fileSize" : 307010, "content" : null } |