· 9 years ago · Jan 25, 2017, 02:10 PM
1Endpoint: https://api.talentinc.com/v1/resume
2
3Usage
4This is where you'll send your resume. Attach as much meta data as you can, and we'll instantly respond with the submission status.
5In version 1.0, we're just accepting a POST request submitted to our API endpoint.
6
7API URL: https://api.talentinc.com/v1/resume
8API Method: POST
9
10API Fields: Format Required?
11partner_key string Yes
12secret_key string Yes
13resume_file binary file Yes
14 (in PDF, DOC, RTF, etc.)
15first_name string Sometimes
16last_name string Sometimes
17email string Yes
18utm_source string Optional Lets you segment results by variable.
19site string Optional If you are you submitting from multiple sites, this is helpful to keep a consistent marketing message. Don't send anything you wouldn't want a lead to potentially see. Example: MyFavoriteJobBoard.com
20country two-letter char Optional Two letter code as defined by ISO 3166-1. Can help target pitch and products. (for example:US, UK, SG, PT)
21tags array or JSON array Optional For example tags[expected_salary]=35000 or
22tags={"expected_salary":"35000"} Lets you segment most results by second variable(s).
23
24Tags and utm_source enable you to track your uploads and conversions segmented by these tags. They can be any key and any value, as long as they are properly JSON encoded or sent as an array.
25
26Best Practices
27The best way to segment the reports on leads, conversions, and sales is to send utm tags, preferably utm_source (we're borrowing from Google Analytics/Urchin's syntax). You'll have quick, instant filters available for any value you send.
28
29Expected salary is a very popular tag, and often used to segment user experience. We prefer the name expected_salary and a raw unformatted value (and if it's a range, the high, low, or mean of the range – as long as it's consistent). But, this isn't required, and just a guideline.
30
31When you are testing uploads via your development keys, please do not send the same emails and resumes that you will be sending with your production keys.
32
33Responses
34If you receive a 200 code with Success message, the lead has been accepted. Everything else should be at or above a 400 and can be considered a rejection.
35
36Common responses:
37200 Success
38400 Resume type not supported: filetype
39400 File too small (< 500b) to be valid resume (yours is Xbytes).
40400 Email format or domain error.
41400 Unknown problem with resume upload.
42409 That resume already exists in our database. Not re-added.
43409 That email address already exists in our database. Not re-added.
44409 Recent resume for email address already exists in our marketing. Ignoring.
45
46There are rare responses not listed above. You should assume the HTTP response code is what signifies the success or not: 200 for success, 400 and above indicates a rejection.
47Example success:
48
49{
50 "status":
51 {
52 "code":"200",
53 "message":"Success"
54 },
55 "data":
56 {
57 "resume_id":"6272000",
58 "accepted_tags":
59 {
60 "expected_salary":"40000",
61 "career_interests":"Fashion"
62 }
63 }
64}
65
66Example error:
67{
68 "status":
69 {
70 "code":"400",
71 "message":"File too small (< 500b) to be valid resume."
72 },
73 "data":
74 {
75 "error":"File too small (< 500b) to be valid resume."
76 }
77}
78
79Anything that doesn't return a status code of 200 can be considered rejected.
80
81Example Client Calls
82Sample Command Line / curl:
83$ curl -F resume_file="@/path/to/file" \
84 -F email="lester@domain.com" \
85 -F first_name=Lester \
86 -F last_name=Diamond \
87 -F partner_key=Umauk2qlwf8K4 \
88 -F secret_key=OwYQ8IOGy6j95N2mbKgxULSWbdsqmcu9I \
89 -F tags[city]="Las Vegas" \
90 -F tags[state]="NV" \
91 -F tags[expected_salary]=40000 \
92 https://api.talentinc.com/v1/resume
93
94Sample PHP Code:
95$localfile = "/path/to/file";
96$data = array(
97 "first_name" => "Lester",
98 "last_name" => "Diamond",
99 "email" => "lester@domain.com",
100 "partner_key" => "Umauk2qlwf8K4",
101 "secret_key" => "OwYQ8IOGy6j95N2mbKgxULSWbdsqmcu9I",
102 "resume_file" => "@".$localfile.";type=".mime_content_type($localfile),
103 "tags" => json_encode(array(
104 "city" => "Las Vegas",
105 "state" => "NV",
106 "career_interests" => "casinos",
107 "expected_salary" => "40000"
108 ))
109);
110
111$url = "https://api.talentinc.com/v1/resume";
112$ch = curl_init();
113curl_setopt($ch, CURLOPT_URL, $url);
114curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
115curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
116curl_setopt($ch, CURLOPT_POST, true);
117curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
118$response = curl_exec($ch);
119
120Sample Ruby On Rails Code (RestClient example):
121require 'rest_client'
122RestClient.post('https://api.talentinc.com/v1/resume',
123 {
124 :resume_file => File.new('/path/to/file'),
125 :first_name => 'Lester',
126 :last_name => 'Diamond',
127 :email => 'lester@domain.com',
128 :partner_key => 'Umauk2qlwf8K4',
129 :secret_key => 'OwYQ8IOGy6j95N2mbKgxULSWbdsqmcu9I',
130 :tags => {
131 :city => 'Las Vegas',
132 :state => 'NV',
133 :expected_salary => 40000
134 }
135 })
136
137
138Sample Python Code
139import requests
140payload = {
141 'partner_key': 'Umauk2qlwf8K4',
142 'secret_key': 'OwYQ8IOGy6j95N2mbKgxULSWbdsqmcu9I',
143 'email': 'lester@domain.com'
144 'first_name' => 'Lester',
145 'last_name' => 'Diamond',
146 'tags' => {
147 'city' => 'Las Vegas',
148 'state' => 'NV',
149 'expected_salary' => 40000
150 }
151}
152files = {
153 'resume_file': open('/path/to/file', 'rb')
154}
155url = "https://api.talentinc.com/v1/resume"
156response = requests.post(url, params=payload, files=files)
157print response.status
158print response.message