The endpoint will allow you to upload CV. This endpoint parse the file and will return the name, address, email and phone number of thc candidate
url | files |
---|
filename | Name of the file |
---|
file | binary |
---|
id | String : Unique ID of the file |
---|---|
name | String : Name parsed from the cv, if possible. |
String : Email parsed from the cv, if possible. | |
phoneNumber | String : Phone number parsed from the cv, if possible |
address | String : Address parsed from the cv is possible. |
text | String : The content of the file |
1 2 3 4 5 6 7 8 9 10 11 12 |
curl -X POST \ 'https://api.nextal.com/files?napikey=demo&ntenant=demo' \ -H 'accept: application/json, text/plain, */*' \ -H 'cache-control: no-cache' \ -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundaryGZ8GcXuy3A33pJRC' \ -H 'filename: CV Mickael Dubois.pdf' \ -d '------WebKitFormBoundaryGZ8GcXuy3A33pJRC Content-Disposition: form-data; name="file"; filename="CV Mickael Dubois.pdf" Content-Type: application/pdf ------WebKitFormBoundaryGZ8GcXuy3A33pJRC--' |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
<?php $request = new HttpRequest(); $request->setUrl('https://api.nextal.com/files'); $request->setMethod(HTTP_METH_POST); $request->setQueryData(array( 'napikey' => 'demo', 'ntenant' => 'demo' )); $request->setHeaders(array( 'cache-control' => 'no-cache', 'accept' => 'application/json, text/plain, */*', 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryGZ8GcXuy3A33pJRC', 'filename' => 'CV Mickael Dubois.pdf' )); $request->setBody('------WebKitFormBoundaryGZ8GcXuy3A33pJRC Content-Disposition: form-data; name="file"; filename="CV Mickael Dubois.pdf" Content-Type: application/pdf ------WebKitFormBoundaryGZ8GcXuy3A33pJRC--'); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import http.client conn = http.client.HTTPConnection("api,nextal,com") payload = "------WebKitFormBoundaryGZ8GcXuy3A33pJRC\r\nContent-Disposition: form-data; name=\"file\"; filename=\"CV Mickael Dubois.pdf\"\r\nContent-Type: application/pdf\r\n\r\n\r\n------WebKitFormBoundaryGZ8GcXuy3A33pJRC--" headers = { 'filename': "CV Mickael Dubois.pdf", 'content-type': "multipart/form-data; boundary=----WebKitFormBoundaryGZ8GcXuy3A33pJRC", 'accept': "application/json, text/plain, */*", 'cache-control': "no-cache" } conn.request("POST", "files", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
require 'uri' require 'net/http' url = URI("https://api.nextal.com/files?napikey=demo&ntenant=demo") http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Post.new(url) request["filename"] = 'CV Mickael Dubois.pdf' request["content-type"] = 'multipart/form-data; boundary=----WebKitFormBoundaryGZ8GcXuy3A33pJRC' request["accept"] = 'application/json, text/plain, */*' request["cache-control"] = 'no-cache' request.body = "------WebKitFormBoundaryGZ8GcXuy3A33pJRC\r\nContent-Disposition: form-data; name=\"file\"; filename=\"CV Mickael Dubois.pdf\"\r\nContent-Type: application/pdf\r\n\r\n\r\n------WebKitFormBoundaryGZ8GcXuy3A33pJRC--" response = http.request(request) puts response.read_body |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.nextal.com/files?napikey=demo&ntenant=demo" payload := strings.NewReader("------WebKitFormBoundaryGZ8GcXuy3A33pJRC\r\nContent-Disposition: form-data; name=\"file\"; filename=\"CV Mickael Dubois.pdf\"\r\nContent-Type: application/pdf\r\n\r\n\r\n------WebKitFormBoundaryGZ8GcXuy3A33pJRC--") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("filename", "CV Mickael Dubois.pdf") req.Header.Add("content-type", "multipart/form-data; boundary=----WebKitFormBoundaryGZ8GcXuy3A33pJRC") req.Header.Add("accept", "application/json, text/plain, */*") req.Header.Add("cache-control", "no-cache") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
var request = require("request"); var options = { method: 'POST', url: 'https://api.nextal.com/files', qs: { napikey: 'demo', ntenant: 'demo' }, headers: { 'cache-control': 'no-cache', accept: 'application/json, text/plain, */*', 'content-type': 'multipart/form-data; boundary=----WebKitFormBoundaryGZ8GcXuy3A33pJRC', filename: 'CV Mickael Dubois.pdf' }, body: '------WebKitFormBoundaryGZ8GcXuy3A33pJRC\r\nContent-Disposition: form-data; name="file"; filename="CV Mickael Dubois.pdf"\r\nContent-Type: application/pdf\r\n\r\n\r\n------WebKitFormBoundaryGZ8GcXuy3A33pJRC--' }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); |
1 2 3 4 5 6 7 |
HttpResponse<String> response = Unirest.post("https://api.nextal.com/files?napikey=demo&ntenant=demo") .header("filename", "CV Mickael Dubois.pdf") .header("content-type", "multipart/form-data; boundary=----WebKitFormBoundaryGZ8GcXuy3A33pJRC") .header("accept", "application/json, text/plain, */*") .header("cache-control", "no-cache") .body("------WebKitFormBoundaryGZ8GcXuy3A33pJRC\r\nContent-Disposition: form-data; name=\"file\"; filename=\"CV Mickael Dubois.pdf\"\r\nContent-Type: application/pdf\r\n\r\n\r\n------WebKitFormBoundaryGZ8GcXuy3A33pJRC--") .asString(); |