Reference
CV Extract V2 (legacy)
LegacyReference for the legacy asynchronous V2 resume parser. Kept for existing integrations; use V3 for new ones.
/api/v2/parserLegacy asynchronous contract: the request is accepted with 202 and the result is posted to webhook_url.
- Authentication
X-API-Keyheader- Billing
- 1 credit when the request is accepted (HTTP 202)
- Client timeout
- Client timeout ≥ 50 s
Request body
Content type multipart/form-data
filefilerequiredThe resume: PDF, DOCX, ODT, PPTX, ODP, TXT, JPG or PNG.
webhook_urlstring (URL)requiredURL that receives the result when processing ends.
application_idstringYour own reference, echoed in the webhook payload.
Response
202Accepted. The result is sent to webhook_url later.
messagestring"CV processing initiated."bodynullerrorbooleanfalse
Errors
- 400An error occurred while processing the document or extracting its text. Please try again later.
Any error from the legacy parser is returned with its status code (
400for a missing file orwebhook_url, unsupported type…) and this generic message.Do not retry
- 401Missing API Key
The
X-API-Keyheader is absent.Authorization: Beareris not accepted.Do not retry
- 401Invalid API Key
The key is malformed, unknown or revoked. Rotating a key revokes the previous one immediately.
Do not retry
- 403Insufficient credits available
The account has no credit left.
Fix, then retry
- 415Content-Type must be multipart/form-data
The request is not
multipart/form-data.Do not retry
- 503Credit service temporarily unavailable
Credits could not be checked or deducted. No credit is consumed, including when the operation itself had completed. Header
Retry-After: 1.Retry with backoff
Behavior
- Asynchronous
- The gateway waits up to 45 seconds for the request to be accepted. The webhook then receives
{"status": "success", …}with the parsed resume, or{"status": "failure", "error_code": …, "error_message": …}. - Billing
- The credit is consumed when the request is accepted, even if processing fails later.
curl -X POST https://onlineresumeparser.com/api/v2/parser \
-H "X-API-Key: $HIRELAYER_API_KEY" \
-F "[email protected];type=application/pdf" \
-F "webhook_url=https://example.com/hirelayer/webhook" \
-F "application_id=app_123"import os
import requests
with open("resume.pdf", "rb") as file:
response = requests.post(
"https://onlineresumeparser.com/api/v2/parser",
headers={"X-API-Key": os.environ["HIRELAYER_API_KEY"]},
files={"file": ("resume.pdf", file, "application/pdf")},
data={
"webhook_url": "https://example.com/hirelayer/webhook",
"application_id": "app_123",
},
timeout=50,
)
response.raise_for_status()
data = response.json()
print(data["message"])import { readFile } from 'node:fs/promises'
const form = new FormData()
form.append(
'file',
new Blob([await readFile('resume.pdf')], { type: 'application/pdf' }),
'resume.pdf'
)
form.append('webhook_url', 'https://example.com/hirelayer/webhook')
form.append('application_id', 'app_123')
const response = await fetch('https://onlineresumeparser.com/api/v2/parser', {
method: 'POST',
headers: {
'X-API-Key': process.env.HIRELAYER_API_KEY!,
},
body: form,
signal: AbortSignal.timeout(50_000),
})
if (!response.ok) {
throw new Error(`HireLayer ${response.status}: ${await response.text()}`)
}
const data = await response.json()
console.log(data.message){
"message": "CV processing initiated.",
"body": null,
"error": false
}{
"error": "An error occurred while processing the document or extracting its text. Please try again later."
}