-
Notifications
You must be signed in to change notification settings - Fork 0
CV Processing Upload Return
I think you know but this is a HTTP API so you will need to have a JSON parser and a HTTP Client in your SDK, you could use embedded libraries but me in Java i use OkHttpClient 2.7.5 and Gson to performs these functions.
The end point for uploading is : "/upload" or "/upload_raw", the upload_raw must be use ONLY for raw HTML form response, the "/upload" method with JSON payload is highly prefered
To upload a CV to process you must respect the JSON syntax, however if your langage is object oriented i suggest you to use an help like GSON in Java to parse a object CV into JSON.
If you cant this is the construction :
{
"imageid":1 or 2,( more in the future )
"name":"Some Name",
"scc":"Some SCC",
"currentAssignment":"USS SV",
"currentRank":"ADM",
"currentPosition":"CSO",
"currentSection":"Science",
"text":"text\nseparated\nby\n";
}
My API return JSON. If the CV is successfully process, you will receive a JSON with this form : {"pdfDownload":"http://cv.nwa2coco.fr/file/:uuid/downloadPdf","pngDownload":"","message":"Your CV is successfully uploaded","id":300}.
If the processing had encounter an error, the JSON is a generic error : {"message":"Error occured with downloading","id":500}
The first link is the download link of the final pdf, first i had implement a png download but i replace that with a pdf -> png convertissor, the message is always the same if the pdf is process, the id is useless.