API Details:
Description: Demonstrates how to use the parseResume() method to parse a resume/cv file and extract data points.
Code Snippet:
<?php
require 'vendor/autoload.php';
use SharpAPI\SharpApiService;
// Load environment variables
$apiKey = getenv('SHARP_API_KEY');
if (!$apiKey) {
throw new Exception("API key not found. Please set SHARP_API_KEY in your environment variables.");
}
// Initialize the SharpApiService
$sharpApi = new SharpApiService($apiKey);
$resumeFilePath = 'sample_resume.pdf'; // Replace with your actual file path
if (!file_exists($resumeFilePath)) {
throw new Exception("Resume file '{$resumeFilePath}' not found.");
}
try {
$statusUrl = $sharpApi->parseResume($resumeFilePath, 'English');
$resultJob = $sharpApi->fetchResults($statusUrl);
echo "Parsed Resume Result:\n";
print_r(json_decode($resultJob->getResultJson(), true));
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}$resultJob->getResultJson() format example:
{
"data": {
"type": "api_job_result",
"id": "5a113c4d-38e9-43e5-80f4-ec3fdea3420e",
"attributes": {
"status": "success",
"type": "hr_parse_resume",
"result": {
"positions": [
{
"skills": [
"Acceptance testing",
"Technical investigation",
"Exploratory testing",
"Agile",
"Test environments",
"Test management tools",
"UAT knowledge",
"Writing test reports",
"Organising, conducting and supporting test activities",
"Performance testing",
"Integration testing",
"Rapid response to equipment failures",
"Implementing immediate repairs",
"Participating in audits and reviews",
"Monitoring and reporting repair trends",
"Drawings and documentation updates",
"Executing test cases",
"Documenting results and defects",
"Testing and fault finding finished systems",
"Reporting issues to Test Manager",
"Assisting in software installation",
"Experience of testing Web, PC and mobile based software",
"Understanding iterative software development lifecycle",
"Manual testing methods and processes",
"Technical knowledge of Test Systems hardware and software",
"Planning and task management skills",
"Microsoft operating systems",
"Testing GUI based software"
],
"country": "United Kingdom",
"end_date": null,
"start_date": "2008-06-01",
"job_details": "Responsible for the whole test process from planning, through test plan development, execution & result reporting. Also involved in the development and improvement of the test functions, putting forward suggestions and implementing plans accordingly. Duties included organising, conducting and supporting test activities, performance testing, integration testing, rapid response to equipment failures, implementing immediate repairs, participating in audits and reviews, monitoring and reporting repair trends, updating drawings and documentation, executing test cases, documenting results and defects, testing and fault finding finished systems, reporting issues to Test Manager, and assisting in software installation.",
"company_name": "IT & Telecoms Company",
"position_name": "Test Engineer"
}
],
"candidate_name": "Linda Harris",
"candidate_email": "linda.h@dayjob.co.uk",
"candidate_phone": "02476 000 0000, 0887 222 9999",
"candidate_address": "34 Made Up Road, Coventry, CV66 7RF",
"candidate_language": "English",
"education_qualifications": [
{
"country": "United Kingdom",
"end_date": "2008-06-01",
"start_date": "2005-09-01",
"degree_type": "Bachelor’s Degree or equivalent",
"school_name": "Nuneaton University",
"school_type": "University or equivalent",
"learning_mode": "In-person learning",
"education_details": "",
"faculty_department": "",
"specialization_subjects": "Software Engineering"
},
{
"country": "United Kingdom",
"end_date": "2005-06-01",
"start_date": "2000-09-01",
"degree_type": "High School/Secondary School Diploma or equivalent",
"school_name": "Coventry North School",
"school_type": "High School/Secondary School or equivalent",
"learning_mode": "In-person learning",
"education_details": "A levels: Maths (A), English (B), Technology (B), Science (C)",
"faculty_department": "",
"specialization_subjects": ""
}
],
"candidate_spoken_languages": [
"German"
],
"candidate_honors_and_awards": [],
"candidate_courses_and_certifications": [
"ISEB certification"
]
}
}
}
}