### Python Example: Process File Event and Notify Service
Source: https://developers.hrflow.ai/docs/workflows
Illustrates a complete Python workflow implementation. This example sets up an `Hrflow` client using credentials from `settings`, retrieves a file from a URL provided in `_request`, adds it to the HrFlow profile database, notifies another internal service, and constructs a custom HTTP 201 JSON response.
```Python
import json
import requests
from hrflow import Hrflow
def workflow(_request, settings):
client = Hrflow(api_secret=settings["API_KEY"], api_user=settings["USER_EMAIL"])
file_url = _request["file_url"]
file_content = requests.get(file_url, allow_redirects=True).content
client.profile.parsing.add_file(
source_key=settings["SOURCE_KEY"],
profile_file=file_content,
profile_content_type="application/pdf",
reference="profile_reference"
)
id = requests.post(settings["OTHER_SERVICE_URL"], data={"key": "value"}).json()["id"]
return dict(
status_code=201,
headers={"Content-Type": "application/json"},
body=json.dumps({"id": id})
)
```
--------------------------------
### HRFlow.ai Job Asking API: Parameter and Usage Guide
Source: https://developers.hrflow.ai/docs/jobs-asking
This snippet provides a detailed guide for using the HRFlow.ai Job Asking API, focusing on the 'questions' parameter, its expected format, and examples. It also outlines the response structure and offers best practices for question formulation, including tips for clarity, handling closed-ended questions, setting default values, and requesting specific output formats.
```APIDOC
Endpoint: Ask a question to Job in a Board
Parameters:
questions:
Type: List[str]
Description: MANDATORY. A list of questions you wish to pose to the job.
Examples:
- Single question: ["What is the start date for this job? (DD-MM-YYYY)"]
- Multi questions: ["Summarize the job", "Is there a start date for this position?"]
Response Structure:
data:
Type: List[str]
Description: A list of answers, corresponding to the order of questions asked.
Best Practices & Capabilities:
- Formulate clear and precise inquiries.
- Model has the capability to comprehensively analyze all fields within a Job.
- Model is trained to respond in the active voice; however, responses may be inconsistent or incorrect, so validation is advisable.
- For closed-ended questions expecting a binary response (yes/no), specify choices within the question (e.g., "Is there a start date for this position? (yes/no)").
- For some specific closed-ended questions, consider using the Tagging API (e.g., "What is the typical work space in the company (fast, moderate, flexible)?").
- Set default values if the answer may not be found within the job (e.g., "Exact address of the job (default: n/a)"). If unsure and no default is specified, the model may respond with "N/A" or "null."
- To receive responses in a specific format (e.g., JSON list), structure your question accordingly (e.g., "Among the following options, which best matches the job (returns a JSON list): Full-time, Permanent, Temporary, Part-time, Fixed-term contract, Internship, Apprenticeship, Freelance, Civic service"). A valid response can be expressed as a string like `["Full-time", "Permanent"]`.
- Model is multilingual and will respond in the same language in which the question was posed.
```
--------------------------------
### Python Example for Profile Asking API
Source: https://developers.hrflow.ai/docs/profiles-asking
This Python example demonstrates how to use the HRFlow.ai Profile Asking API to submit questions about a candidate's profile. It uses the `requests` module to send a GET request with specified source, profile keys, and a list of questions. Remember to replace placeholder values for `source_key`, `key`, `X-USER-EMAIL`, and `X-API-KEY`.
```Python
import requests
import json
url = "https://api.hrflow.ai/v1/profile/asking"
questions = [
"What is the position of the candidate who is not in an internship and for whom this is their first job?",
"Are the skills listed in this profile consistent?"
]
payload = {
"source_key": "FILL_WITH_SOURCE_KEY",
"key": "FILL_WITH_PROFILE_KEY",
"questions": json.dumps(questions)
}
headers = {
'X-USER-EMAIL': 'FILL THIS',
'X-API-KEY': 'FILL THIS',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.json())
```
--------------------------------
### Python Example: Asking Job Data via HRFlow.ai API
Source: https://developers.hrflow.ai/docs/jobs-asking
This Python snippet demonstrates how to query the HRFlow.ai Job Asking API. It uses the 'requests' library to send a GET request with a 'board_key', 'job_key', and a JSON-encoded list of questions to retrieve specific job details.
```Python
import requests
import json
url = "https://api.hrflow.ai/v1/job/asking"
questions = [
"What is the start date for this job? (DD-MM-YYYY)",
"Is language training offered to employees?"
]
payload = {
"board_key": "FILL_WITH_BOARD_KEY",
"key": "FILL_WITH_JOB_KEY",
"questions": json.dumps(questions)
}
headers = {
'X-USER-EMAIL': 'FILL THIS',
'X-API-KEY': 'FILL THIS',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.json())
```
--------------------------------
### Curl Example: Test Catch Workflow with POST Request
Source: https://developers.hrflow.ai/docs/workflows
Demonstrates how to test a deployed Catch workflow URL using a `curl` command. It sends a POST request with `application/json` content type and a sample JSON body containing a `file_url` to trigger the workflow execution.
```Curl
curl -X POST https://api-workflows.hrflow.ai/teams/XXX/YYY/python3.6/ZZZ \
-H Content-Type:application/json \
-d '{"file_url": "https://company.storage.fr/file/profile_1.doc"}'
```
--------------------------------
### Display HrFlow.ai Profile Search Results on a Web Page
Source: https://developers.hrflow.ai/docs/searching-api
This comprehensive example demonstrates how to fetch and display HrFlow.ai profile search results on a web page. It includes the foundational HTML structure, detailed CSS for styling the profile cards and layout, and JavaScript logic to interact with the HrFlow.ai API, build search queries, and dynamically render the fetched profiles. It uses Axios for API calls and assumes a basic understanding of web development.
```HTML
```
```CSS
#app {
font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';
letter-spacing: .01em;
-webkit-font-smoothing: antialiased;
font-feature-settings: 'calt' 0;
overflow-x: hidden;
background: #eee
}
.profiles {
width: 50%;
margin: auto;
padding: 1rem;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.card {
width: 100%;
padding: 1.5rem;
border-radius: 5px;
transition: all 0.2s cubic-bezier(0.41, 0.094, 0.54, 0.07) 0s;
border-width: 1px;
border-style: solid;
border-color: rgb(238, 238, 238);
box-shadow: rgba(0, 0, 0, 0.05) 1px 2px 4px;
backface-visibility: hidden;
background-color: rgb(255, 255, 255);
border-image: initial;
margin-bottom: 1.5rem;
}
.content {
width: 100%;
display: flex;
justify-content: flex-start;
text-decoration: none;
color: #000;
position: relative;
}
.info {
flex: 1 1 auto;
}
.icon {
width: 17px;
height: auto;
margin-right: 0.5rem;
}
.urls {
display: flex;
flex-direction: column;
}
.url {
display: flex;
align-items: center;
text-decoration: none;
color: inherit;
margin-bottom: 0.5rem;
margin-top: 0.5rem;
}
.error {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.text-light {
color: #333333;
font-size: 0.9rem;
line-height: 1.5;
opacity: 0.5;
font-weight: normal;
}
.icon {
margin-right: 0.5rem;
}
```
```JavaScript
const axiosHrflow = axios.create({
baseURL: 'https://api.hrflow.ai/v1',
headers: {
'X-API-KEY': 'YOUR_SECRET_API_KEY'
}
});
const buildQueryString = (url, queryObject) => {
let queryString = `${url}?`;
Object.keys(queryObject).forEach(item => {
if (typeof queryObject[item] === 'string'
|| queryObject[item] instanceof String) {
queryString += `${item}=${queryObject[item]}&`;
} else {
queryString += `${item}=${JSON.stringify(queryObject[item])}&`;
}
});
return queryString;
}
const displayProfiles = profiles => {
const profilesListHtml = profiles.map(profile => {
const name = profile.info.full_name
const location = profile.info.location.text
const summary = profile.info.summary
const type = profile.tags.filter(tag => tag.name === 'type')[0].value
const category = profile.tags.filter(tag => tag.name === 'category')[0].value
const workingFrom = profile.tags.filter(tag => tag.name === 'working-type')[0].value
const linkedin = profile.info.urls.linkedin
const instagram = profile.info.urls.instagram
const twitter = profile.info.urls.twitter
const position = profile.experiences[0].title
return (
`
${name}
worked as ${type}
${position}
(${category})
${location}
(open to ${workingFrom})
${summary}
`
)
}).join(' ');
const appElmt = document.getElementById('profiles');
appElmt.innerHTML = profilesListHtml
}
const query = {
job_key: "",
source_keys: ["YOUR_SOURCE_KEY"],
stage: 'new',
sort_by: 'created_at',
order_by: 'desc',
limit: 10,
page: 1,
location_distance: 30,
location_geopoint: {},
use_agent: 0,
text_keywords: [],
tags_included: [[]]
}
const url = buildQueryString('profiles/searching', query);
axiosHrflow.get(url)
.then( res => {
const fetchedProfiles = {
profiles: res.data.data.profiles,
meta: res.data.meta
}
displayProfiles(fetchedProfiles.profiles);
}).catch( err => {
console.log('error', err)
});
```
--------------------------------
### HrFlow.ai Resume Parsing API Prerequisites and Endpoint
Source: https://developers.hrflow.ai/docs/parsing-api
This section outlines the necessary steps and provides a reference to the API endpoint required to utilize the HrFlow.ai Resume Parsing service. It covers account setup, API key acquisition, API activation, source creation, real-time parsing activation, and Postman setup.
```APIDOC
Prerequisites:
1. Create a Workspace: https://hrflow.ai/signup
2. Get your API Key
3. Activate Profile Parsing API
4. Create a Source
5. Activating Real-time Parsing for a Source
6. Download HrFlow.ai's Postman
API Endpoint:
Get more information about the endpoint π§ Parse a Resume in a Source.
```
--------------------------------
### Profile Asking API: Examples for 'questions' parameter
Source: https://developers.hrflow.ai/docs/scoring-api-copy
Demonstrates various question formats for the Profile Asking API, including single, multiple, closed-ended, and structured output requests, along with an example of a valid JSON response.
```JSON
["What is the position of the candidate who is not in an internship and for whom this is their first job?"]
```
```JSON
["Summarize the candidate's strengths", "Are the skills listed in this profile consistent?"]
```
```string
Considering any inconsistencies in experiences, education, or skills, do you suspect any falsehoods in this profile? (yes/no)
```
```string
What type of contract is the candidate seeking? (permanent, temporary, internship)
```
```string
Does the candidate have experience in collaborative work with multicultural teams? (default: n/a)
```
```string
What best describes the candidate among the following soft skills (returns a JSON list): passionate, teamwork, lack of experience, autonomous, foresight.
```
```JSON
["teamwork", "autonomous"]
```
--------------------------------
### Python Pull Workflow for Periodic Data Fetching and Storage
Source: https://developers.hrflow.ai/docs/workflows
This Python workflow function demonstrates how to implement a Pull setup to periodically fetch data from an internal endpoint and store it in HrFlow. It utilizes the `settings` dictionary to manage state, specifically `LAST_UID`, ensuring continuous data synchronization. The workflow connects to the HrFlow API using an API key and user email from settings, fetches file URLs, retrieves file content, and then adds profiles to a specified source key.
```python
import requests
from hrflow import Hrflow
INTERNAL_ENDPOINT = "https://storage.company.com/records"
def workflow(settings):
client = Hrflow(api_secret=settings["API_KEY"], api_user=settings["USER_EMAIL"])
last_uid = settings["LAST_UID"]
data = requests.get("{}?last_uid={}".format(INTERNAL_ENDPOINT, last_uid)).json()
for file_url in data["files"]:
file_content = requests.get(file_url, allow_redirects=True).content
client.profile.parsing.add_file(
source_key=settings["SOURCE_KEY"],
profile_file=file_content,
profile_content_type="application/pdf",
reference="profile_reference"
)
# Update LAST_UID
settings["LAST_UID"] = data["last_uid"]
```
--------------------------------
### Advanced Question Techniques for Profile Asking
Source: https://developers.hrflow.ai/docs/profiles-asking
Examples illustrating various techniques for crafting questions, including closed-ended questions with specified choices, questions with default values, and questions requesting specific JSON output formats. These techniques help guide the model's response.
```JSON
"Considering any inconsistencies in experiences, education, or skills, do you suspect any falsehoods in this profile? (yes/no)"
```
```JSON
"What type of contract is the candidate seeking? (permanent, temporary, internship)"
```
```JSON
"Does the candidate have experience in collaborative work with multicultural teams? (default: n/a)"
```
```JSON
"What best describes the candidate among the following soft skills (returns a JSON list): passionate, teamwork, lack of experience, autonomous, foresight."
```
--------------------------------
### Example XML Stream for HrFlow.ai Job Offers
Source: https://developers.hrflow.ai/docs/send-data-from-a-tool-into-hrflowai
This XML snippet provides an example structure for a stream of job offers, typically returned by an ATS endpoint. Each '' element contains detailed information such as name, reference, URL, summary, address, geographical coordinates, start/end dates, and salary ranges, demonstrating the expected format for job data synchronization.
```XML
Data scientist
af42dd
https://hrflow.ai/careers/
Data scientist at hrflow. What else ?!
Le Belvédère, 1-7 Cr Valmy, 92800 Puteaux
48.8922598
2.232953
2021-11-12T14:46:56.816369
2021-12-24T14:46:56.816369
4000
5000
...
...
```
--------------------------------
### Example Payload for Job Searching Success Event
Source: https://developers.hrflow.ai/docs/connectors-webhook
Demonstrates the `application/x-www-form-urlencoded` payload structure for a `job.searching.success` event. This example includes the HTTP headers, form values, and the raw URL-encoded content of the payload.
```HTTP
# Headers
content-type=application/x-www-form-urlencoded
# Form values
type:job.searching.success
origin=api
message=job searching succeed
job={"key": "d821393853fc32b08c93b8d38590817c72048ec4", "board": {"key": "d900ec70c67d43c71027f9bc63ec3b5b3e16c1d8"}}
# Raw content
type=job.searching.success&origin=api&message=job+searching+succeed&job=%7B%22key%22%3A+%22d821393853fc32b08c93b8d38590817c72048ec4%22%2C+%22source%22%3A+%7B%22key%22%3A+%22d900ec70c67d43c71027f9bc63ec3b5b3e16c1d8%22%7D%7D
```
--------------------------------
### Example API Response for JSON List Question
Source: https://developers.hrflow.ai/docs/profiles-asking
An example of a valid response string when a question is formulated to return a JSON list of entities. The response is a JSON array of strings.
```JSON
["teamwork", "autonomous"]
```
--------------------------------
### Example Job Object and Prepared Text for HRFlow.ai Text Parsing API
Source: https://developers.hrflow.ai/docs/job-parsing
This example illustrates the transformation of a structured Job Object into a plain text format, which is then used as input for the HRFlow.ai Text Parsing API. The process involves merging description and title with single line jumps and joining sections with double line jumps to create a comprehensive text representation of the job.
```json
{
"name": "Data Scientist",
"url": "",
"summary": "Under general direction or assignment, develops high quality prediction systems integrated into existing systems and applications. Works collaboratively with a team utilizing industry knowledge, technology, data and statistical modeling to support fast-paced business decisions leading to improved outcomes. Responsible for applying data mining techniques, statistical analysis of performance metrics, applying various machine-learning tools, predictive modeling, and experimental design. Must be able to work independently on development and selection of machine learning techniques and algorithms.",
"location": {"text": null},
"archive": null,
"archived_at": null,
"updated_at": "2021-12-27T15:16:05+0000",
"created_at": "2020-12-24T09:32:11+0000",
"culture": "At our company, we foster a collaborative and innovative culture where employees are encouraged to explore new ideas and technologies.",
"benefits": "We offer competitive salaries, comprehensive health insurance, flexible work schedules, and opportunities for professional development.",
"responsibilities": "As a Data Scientist, you will be responsible for developing predictive systems, conducting statistical analysis, and applying machine learning techniques to drive business decisions and improve outcomes.",
"requirements": "Master's Degree in Computer Science, Computer Engineering, Industrial and Systems Engineering, Mathematics, or related field and\nExcellent understanding of machine learning techniques and algorithms, such as k-NN, Naive Bayes, SVM, Random Forests, etc.\nProficiency in common data science toolkits, such as R, Python, and Julia\nProficiency in data visualization tools\nProficiency in simulation software such as Simio or Arena\nProficiency in using query languages such as SQL\nGood applied statistics skills, such as distributions, statistical testing, regression, etc.\nGood scripting and programming skills",
"interviews": "During the interview process, we will assess your knowledge of machine learning techniques, your experience with data science toolkits, and your ability to apply statistical analysis in real-world scenarios.",
"skills": [],
"languages": [],
"certifications": [],
"courses": [],
"tasks": [],
"tags": [],
"metadatas": [],
"ranges_float": [],
"ranges_date": []
}
```
```plaintext
Data Scientist
Under general direction or assignment, develops high quality prediction systems integrated into existing systems and applications. Works collaboratively with a team utilizing industry knowledge, technology, data and statistical modeling to support fast-paced business decisions leading to improved outcomes. Responsible for applying data mining techniques, statistical analysis of performance metrics, applying various machine-learning tools, predictive modeling, and experimental design. Must be able to work independently on development and selection of machine learning techniques and algorithms.
PhD in Computer Science, Computer Engineering, Industrial and Systems Engineering, Mathematics, or related field\nClinical Training or Experience\nLean & Six Sigma Training or Experience\nProject Management Training or Experience\nExperience in a Start-Up or Small Business Environment
At our company, we foster a collaborative and innovative culture where employees are encouraged to explore new ideas and technologies.
We offer competitive salaries, comprehensive health insurance, flexible work schedules, and opportunities for professional development.
As a Data Scientist, you will be responsible for developing predictive systems, conducting statistical analysis, and applying machine learning techniques to drive business decisions and improve outcomes.
Master's Degree in Computer Science, Computer Engineering, Industrial and Systems Engineering, Mathematics, or related field and\nExcellent understanding of machine learning techniques and algorithms, such as k-NN, Naive Bayes, SVM, Random Forests, etc.\nProficiency in common data science toolkits, such as R, Python, and Julia\nProficiency in data visualization tools\nProficiency in simulation software such as Simio or Arena\nProficiency in using query languages such as SQL\nGood applied statistics skills, such as distributions, statistical testing, regression, etc.\nGood scripting and programming skills
```
--------------------------------
### Formulating Basic Questions for Profile Asking API
Source: https://developers.hrflow.ai/docs/profiles-asking
Examples demonstrating how to structure single and multiple questions as string arrays for the Profile Asking API. The 'questions' parameter expects a list of strings.
```JSON
["What is the position of the candidate who is not in an internship and for whom this is their first job?"]
```
```JSON
["Summarize the candidate's strengths", "Are the skills listed in this profile consistent?"]
```
--------------------------------
### Asking Request with Python Requests
Source: https://developers.hrflow.ai/docs/scoring-api-copy
This Python example demonstrates how to make a GET request to the hrflow.ai profile asking API using the requests module. It shows how to include a list of questions, a source key, a profile key, and necessary authentication headers (X-USER-EMAIL, X-API-KEY, Content-Type) to query a candidate's profile.
```python
import requests
import json
url = "https://api.hrflow.ai/v1/profile/asking"
questions = [
"What is the position of the candidate who is not in an internship and for whom this is their first job?",
"Are the skills listed in this profile consistent?"
]
payload = {
"source_key": "FILL_WITH_SOURCE_KEY",
"key": "FILL_WITH_PROFILE_KEY",
"questions": json.dumps(questions)
}
headers = {
'X-USER-EMAIL': 'FILL THIS',
'X-API-KEY': 'FILL THIS',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.json())
```
--------------------------------
### Sample Code for Catch Workflows
Source: https://developers.hrflow.ai/docs/workflow
Provides a basic Python code example for a 'Catch' workflow. It demonstrates how to accept the request and settings, include custom logic, and return a structured dictionary with a status code, headers, and a JSON body.
```Python
import json
def workflow(_request: dict, settings: dict):
# < custom logic goes here >
return dict(
status_code=201,
headers={"Content-Type": "application/json"},
body=json.dumps({
"message": "Hello World"
}))
```
--------------------------------
### Example Payload for Job Storing Success Event
Source: https://developers.hrflow.ai/docs/connectors-webhook
Demonstrates the `application/x-www-form-urlencoded` payload structure for a `job.storing.success` event. This example includes the HTTP headers, form values, and the raw URL-encoded content of the payload.
```HTTP
# Headers
content-type=application/x-www-form-urlencoded
# Form values
type:job.storing.success
origin=api
message=job storing succeed
job={"key": "d821393853fc32b08c93b8d38590817c72048ec4", "board": {"key": "d900ec70c67d43c71027f9bc63ec3b5b3e16c1d8"}}
# Raw content
type=job.storing.success&origin=api&message=job+storing+succeed&job=%7B%22key%22%3A+%22d821393853fc32b08c93b8d38590817c72048ec4%22%2C+%22source%22%3A+%7B%22key%22%3A+%22d900ec70c67d43c71027f9bc63ec3b5b3e16c1d8%22%7D%7D
```
--------------------------------
### Example HrFlow.ai Job Object JSON Structure
Source: https://developers.hrflow.ai/docs/large-scale-scoring-data
This JSON example illustrates the structure of an HrFlow.ai Job Object, which should be used for HDF5 storage. It includes core job details like `name`, `key`, `reference`, `summary`, `created_at`, `location`, and `tags`. It also highlights fields like `culture`, `responsibilities`, `requirements`, and `benefits` as highly recommended, with `sections` available for other information.
```json
{
"name": "Regulatory Quality Assurance Manager M/F",
"key": "12343bc6c1b9f47e54567898765432aabcde3293",
"reference": "2983AAU930",
"url": null,
"summary": "Experienced Regulatory Quality Assurance Manager M/F with a demonstrated history of ...",
"created_at": "2021-09-07T14:22:27.000+0000",
"sections": [
{
"name": "job-description",
"title": "Job description",
"description": "..."
},
{
...
}
],
"culture": "XX Company is a global leader in the field of ...",
"responsibilities": "You will be responsible for ...",
"requirements": "You have a degree in ...",
"benefits": "We offer a competitive salary ...",
"location": {
"text": "Paris, France",
"lat": 48.8566,
"lng": 2.3522
},
"skills": [],
"languages": [],
"tasks": [],
"certifications": [],
"courses": [],
"tags": [
{
"name": "experience",
"value": "5-10 years"
},
{
"name": "trial-period",
"value": "3 months"
},
{
"name": "country",
"value": "France"
}
]
}
```
--------------------------------
### HrFlow.ai Dataset Folder Architecture Example
Source: https://developers.hrflow.ai/docs/large-scale-scoring-data
Illustrates the typical folder structure for an HrFlow.ai dataset, showing the placement of Parquet and HDF5 files for profiles, jobs, trackings, and agents.
```plaintext
.
βββ agents.parquet
βββ jobs_objects.h5
βββ jobs.parquet
βββ jobs_tags.parquet
βββ profiles_objects
β βββ 0000000-0099999.h5
β βββ 0100000-0199999.h5
β βββ 0200000-0299999.h5
β βββ 0300000-0399999.h5
β βββ 0400000-0499999.h5
βββ profiles.parquet
βββ profiles_tags.parquet
βββ trackings.parquet
```
--------------------------------
### HrFlow.ai SDK `client.profile.parsing.add_folder` Function API Reference
Source: https://developers.hrflow.ai/docs/parse-a-folder-of-resumes
Detailed API documentation for the `add_folder` function, outlining each parameter's type, example value, and a comprehensive description of its purpose and usage in configuring resume parsing.
```APIDOC
Function: client.profile.parsing.add_folder
Parameters:
source_key (str): The key identifying the source where your profiles (CVs) will be stored. This key is unique to the source and is required to specify the destination for the parsed profiles. Example: "YOUR_SOURCE_KEY"
dir_path (str): The directory path where the resumes to be parsed are stored. This is the path to the folder containing the profile resumes. Example: "./resumes"
is_recursive (bool): Indicates whether to parse files in subfolders as well. If set to True, the function will parse files in the specified directory and all its subdirectories. Example: True
created_at (str, optional): The original date of the application of the profile in ISO format. This field is optional and can be used to set a specific application date for the profiles. Example: "2021-05-01T00:00:00Z"
sync_parsing (bool): Indicates whether to perform synchronous parsing. If set to 1, parsing is performed synchronously. If set to 0, parsing is performed asynchronously. Example: 0
move_failure_to (str or None): The directory path to move the failed files. If set to None, the failed files will not be moved. Example: "./failures"
show_progress (bool): A flag to indicate whether a progress bar should be displayed during the parsing process. This can be useful for monitoring the progress, especially when processing a large number of resumes. Example: True
max_requests_per_minute (int): The maximum number of requests that can be made per minute. This is used to rate limit the parsing requests to avoid overloading the server. Example: 30
min_sleep_per_request (float): The minimum time to wait between requests, in seconds. This helps to space out the requests and comply with rate limiting. Example: 1
```
--------------------------------
### Example: Comprehensive Job Offer JSON Structure
Source: https://developers.hrflow.ai/docs/recruiter-training-data
This JSON structure provides a detailed example for a job offer, encompassing fields such as title, location, culture, responsibilities, requirements, and benefits. It also includes an 'other' field for additional metadata like contract type or salary, which can serve as valuable search filters.
```JSON
{
"title": "...",
"location": "...",
"culture": "...",
"responsibilities": "...",
"requirements": "...",
"benefits": "...",
"other" : {
"contract": "...",
"salary": "...",
...
}
}
```
--------------------------------
### APIDOC: Hrflow.ai Profile Parsing add_folder Parameters
Source: https://developers.hrflow.ai/docs/evaluate-a-source-of-profiles
This section details the parameters for the `client.profile.parsing.add_folder` function, providing their types, example values, and comprehensive descriptions. It covers all inputs required for parsing resumes from a folder.
```APIDOC
add_folder(
source_key: str,
dir_path: str,
is_recursive: bool,
move_failure_to: str or None,
show_progress: bool,
max_requests_per_minute: int,
min_sleep_per_request: float
)
source_key: "YOUR_SOURCE_KEY" - The key identifying the source where your profiles (CVs) will be stored. This key is unique to the source and is required to specify the destination for the parsed profiles.
dir_path: "./resumes" - The directory path where the resumes to be parsed are stored. This is the path to the folder containing the profile resumes.
is_recursive: True - Indicates whether to parse files in subfolders as well. If set to True, the function will parse files in the specified directory and all its subdirectories.
move_failure_to: "./failures" - The directory path to move the failed files. If set to None, the failed files will not be moved.
show_progress: True - Indicate whether a progress bar should be displayed during the parsing process. This can be useful for monitoring the progress, especially when processing a large number of resumes.
max_requests_per_minute: 30 - The maximum number of requests that can be made per minute. This is used to rate limit the parsing requests to avoid overloading the server.
min_sleep_per_request: 1 - The minimum time to wait between requests, in seconds. This helps to space out the requests and comply with rate limiting.
```
--------------------------------
### Example Payload for Job Scoring Success Event
Source: https://developers.hrflow.ai/docs/connectors-webhook
Demonstrates the `application/x-www-form-urlencoded` payload structure for a `job.scoring.success` event. This example includes the HTTP headers, form values, and the raw URL-encoded content of the payload.
```HTTP
# Headers
content-type=application/x-www-form-urlencoded
# Form values
type:job.scoring.success
origin=api
message=job scoring succeed
job={"key": "d821393853fc32b08c93b8d38590817c72048ec4", "board": {"key": "d900ec70c67d43c71027f9bc63ec3b5b3e16c1d8"}}
# Raw content
type=job.scoring.success&origin=api&message=job+scoring+succeed&job=%7B%22key%22%3A+%22d821393853fc32b08c93b8d38590817c72048ec4%22%2C+%22source%22%3A+%7B%22key%22%3A+%22d900ec70c67d43c71027f9bc63ec3b5b3e16c1d8%22%7D%7D
```
--------------------------------
### Example `raw_filters` JSON for Postman API Request
Source: https://developers.hrflow.ai/docs/profiles-searching
This JSON snippet provides an example of a `raw_filters` configuration used to search for profiles containing either 'Python' or 'Java' in their text fields. It's intended to be pasted into the `raw_filters` parameter when making a Profile Searching API request via Postman.
```JSON
{"query":{"bool":{"should":[{"match_phrase":{"text":"Python"}},{"match_phrase":{"text":"Java"}}]}}}
```
--------------------------------
### Submit Corrected Profile API
Source: https://developers.hrflow.ai/docs/errors-parsing-profile
This section provides details for the 'Index a Profile in a Source API' endpoint, including example API key and source_key, which are essential for pushing a corrected profile back to HrFlow.ai.
```APIDOC
API Endpoint: https://developers.hrflow.ai/reference/index-a-profile
Required Parameters:
API key: askw_edb315ca7f85597911300d6eb472fc23 (example)
source_key: c375f758de425a6d0af05fee3186f073665dca86 (example)
```
--------------------------------
### Example Raw Input Text for Parsing
Source: https://developers.hrflow.ai/docs/text-parsing
Provides the full raw text string that is used as an example input for the Text Parsing API. This text is analyzed to extract various entities like job titles, companies, locations, and contact information.
```text
Assistant Professor
Computer Science Department Department of Electrical Engineering (by courtesy)
Stanford University.
Room 156, Gates Building 1A Stanford, CA 94305-9010
Tel: (650)725-2593
FAX: (650)725-1449
email: [emailΒ protected]
Research interests: Machine learning, broad competence artificial intelligence, reinforcement learning and robotic control, algorithms for text and web data processing.
```
--------------------------------
### Example Payload for Job Parsing Success Event
Source: https://developers.hrflow.ai/docs/connectors-webhook
Demonstrates the `application/x-www-form-urlencoded` payload structure for a `job.parsing.success` event. This example includes the HTTP headers, form values, and the raw URL-encoded content of the payload.
```HTTP
# Headers
content-type=application/x-www-form-urlencoded
# Form values
type:job.parsing.success
origin=api
message=job parsing succeed
job={"key": "d821393853fc32b08c93b8d38590817c72048ec4", "board": {"key": "d900ec70c67d43c71027f9bc63ec3b5b3e16c1d8"}}
# Raw content
type=job.parsing.success&origin=api&message=job+parsing+succeed&job=%7B%22key%22%3A+%22d821393853fc32b08c93b8d38590817c72048ec4%22%2C+%22source%22%3A+%7B%22key%22%3A+%22d900ec70c67d43c71027f9bc63ec3b5b3e16c1d8%22%7D%7D
```
--------------------------------
### HrFlow.ai Get a Profile API Endpoint Details
Source: https://developers.hrflow.ai/docs/bugs-defects
This section details the necessary information to use the HrFlow.ai 'Get a Profile' API. It specifies the endpoint, required API key, source key, and profile identifier (profile_key or reference) needed to retrieve a parsed profile for review.
```APIDOC
API Endpoint: Get a Profile API
Required Parameters:
API key: Your workspace's API key for authentication.
source_key: The unique identifier of the source where the profile is stored.
profile_key or reference: The unique identifier for the specific profile to retrieve.
```
--------------------------------
### Parse and Index Resume Files via HrFlow.ai Parsing API
Source: https://developers.hrflow.ai/docs/searching-api
Explains how to index unstructured resume documents. These documents are processed by the HrFlow.ai Parsing API, which extracts structured information and automatically indexes it into the specified Source.
```APIDOC
Endpoint: /profiles/parse
Method: POST
Body: Raw resume file
Purpose: Parse unstructured resume documents and automatically index them into a Source.
Reference: π§ Parse a Resume in a Source
```
--------------------------------
### Configure Postman Environment Variables for HrFlow.ai API
Source: https://developers.hrflow.ai/docs/searching-api
Details the essential environment variables required in Postman for authenticating and specifying the target source for HrFlow.ai Profile Searching API requests.
```APIDOC
Environment Variables:
x-api-key: Your API key for authentication.
x-user-email: Your user email for authentication.
source_key: The key of the Source where your Profiles are located.
```
--------------------------------
### Initialize the HrFlow.ai Client with API Credentials
Source: https://developers.hrflow.ai/docs/validate-profile-data-with-hrflowai-sdk
Initialize the HrFlow client with your API credentials. Ensure you have created a workspace, obtained your API Key, and installed HrFlow.ai Python SDK version 4.0.0 or above.
```Python
from hrflow import Hrflow
from hrflow.schemas import HrFlowProfile, Location
client = Hrflow(api_secret="your_api_secret", api_user="your_api_user")
```
--------------------------------
### Search Profiles in HrFlow.ai Sources using Searching API
Source: https://developers.hrflow.ai/docs/searching-api
Describes how to use the HrFlow.ai Searching API to perform multi-criteria queries over one or multiple Sources of Profiles. This allows for flexible and targeted retrieval of indexed profiles.
```APIDOC
Endpoint: /profiles/search
Method: GET/POST (typically GET for queries, POST for complex queries)
Parameters: Multi-criteria query parameters (e.g., skills, experience, location)
Purpose: Perform multi-criteria searches over indexed profiles in Sources.
Tooling: HrFlow.ai Postman Collection (π§ Search Profiles indexed in Sources)
```
--------------------------------
### Example of Simple Job Offer JSON Structure
Source: https://developers.hrflow.ai/docs/candidate-scoring-data
This JSON snippet shows a basic structure for a job offer, containing only the essential 'title' and 'description' fields. This format is suitable when only minimal job details are available.
```JSON
{
"title": "...",
"description": "..."
}
```
--------------------------------
### Example JSON for Tracking Statuses
Source: https://developers.hrflow.ai/docs/recruiter-training-data
This JSON array demonstrates the format for the `statuses.json` file when representing tracking information. Each object links a `job_id` and `resume_id` to a specific `step` in the hiring process, such as 'screening', 'interview', or 'hired', reflecting the candidate's progression.
```JSON
[
{"job_id": "00", "resume_id": "00", "step": "screening"},
{"job_id": "00", "resume_id": "01", "step": "screening"},
{"job_id": "01", "resume_id": "02", "step": "screening"},
{"job_id": "01", "resume_id": "03", "step": "interview"},
{"job_id": "03", "resume_id": "04", "step": "hired"},
{"job_id": "03", "resume_id": "05", "step": "rejected_after_screening"},
{"job_id": "03", "resume_id": "06", "step": "rejected_after_interview"}
]
```
--------------------------------
### Retrieve a Profile for Review API
Source: https://developers.hrflow.ai/docs/errors-parsing-profile
This section details the 'Get a Profile API' endpoint, outlining the necessary parameters (API key, source_key, profile_key/reference) required to access and review a parsed profile within your HrFlow.ai workspace.
```APIDOC
API Endpoint: https://developers.hrflow.ai/reference/get-a-profile
Required Parameters:
API key: Your workspace's API key for authentication.
source_key: The unique identifier of the source where the profile is stored.
profile_key or reference: The unique identifier for the specific profile you wish to retrieve.
```
--------------------------------
### HrFlow.ai Profile Search API - Pagination Parameters
Source: https://developers.hrflow.ai/docs/searching-api
Explains the API parameters for controlling the retrieval of query results, enabling users to fetch specific pages and define the number of profiles returned per page.
```APIDOC
Pagination Parameters:
page: Page offset for retrieving results.
limit: Maximum number of profiles to retrieve per page.
```
--------------------------------
### APIDOC: Hrflow.ai generate_parsing_evaluation_report Parameters
Source: https://developers.hrflow.ai/docs/evaluate-a-source-of-profiles
This section outlines the parameters for the `generate_parsing_evaluation_report` function, including their types, example values, and detailed descriptions. It covers all inputs required to generate the parsing evaluation report.
```APIDOC
generate_parsing_evaluation_report(
client: Hrflow,
source_key: str,
report_path: str,
show_progress: bool
)
client: client = Hrflow(api_secret="your_api_secret", api_user="your_api_user") - The HrFlow client object initialized with your API credentials. This client is used to interact with the HrFlow.ai API and is necessary for authenticating and authorizing the API requests.
source_key: "YOUR_SOURCE_KEY" - The key identifying the source where your profiles (CVs) are stored. This key is unique to the source and is required to specify which set of profiles you want to evaluate.
report_path: "parsing-evaluation.xlsx" or "/path/to/directory/parsing-evaluation" - The file path where the evaluation report will be saved. This can either be an existing directory, in which case the report will be saved as parsing_evaluation.xlsx within that directory, or a complete file path. If the provided path does not end in .xlsx, the function will automatically append the .xlsx extension to the path.
show_progress: True to show the progress bar, False to disable it. - A flag to indicate whether a progress bar should be displayed during the generation of the report. This can be useful for monitoring the progress, especially when processing a large number of profiles.
```
--------------------------------
### HrFlow.ai Profile Search API - Single Source Multi-Criteria Search
Source: https://developers.hrflow.ai/docs/searching-api
Illustrates the API parameters used to perform a multi-criteria search for profiles within a single specified source, including filters for experience duration and specific skills.
```APIDOC
Search Profiles in a Source Parameters:
source_key: The key of the Source to search within.
experiences_duration_min: Minimum duration of experiences in years (e.g., 4 for Seniority).
skills: A list of objects representing skills to search for (e.g., Python).
```
--------------------------------
### Python Workflow Function Signature Definition
Source: https://developers.hrflow.ai/docs/workflows
Defines the mandatory signature for the `workflow` function in Catch, which serves as the entry point for custom code execution. It accepts `_request` (parsed body and headers) and `settings` (environment properties) as dictionaries, and is expected to return `None` or a dictionary to control the HTTP response.
```Python
def workflow(_request: Dict, settings: Dict) -> Union[None, Dict]
```
--------------------------------
### Example: Simple Job Offer JSON Structure
Source: https://developers.hrflow.ai/docs/recruiter-training-data
This JSON structure illustrates a basic representation of a job offer, containing only the essential fields: title and description. It's suitable for scenarios where minimal job details are available or required.
```JSON
{
"title": "...",
"description": "..."
}
```
--------------------------------
### Example JSON for Tracking Statuses
Source: https://developers.hrflow.ai/docs/recruiter-scoring-data
This JSON array demonstrates the format for `statuses.json` when tracking the progress of resumes through hiring steps. Each object links a `job_id` and `resume_id` to a specific `step` in the process, such as 'screening' or 'hired'.
```JSON
[
{"job_id": "00", "resume_id": "00", "step": "screening"},
{"job_id": "00", "resume_id": "01", "step": "screening"},
{"job_id": "01", "resume_id": "02", "step": "screening"},
{"job_id": "01", "resume_id": "03", "step": "interview"},
{"job_id": "03", "resume_id": "04", "step": "hired"},
{"job_id": "03", "resume_id": "05", "step": "rejected_after_screening"},
{"job_id": "03", "resume_id": "06", "step": "rejected_after_interview"}
]
```
--------------------------------
### Python Example for Securely Prompting API Keys Using getpass
Source: https://developers.hrflow.ai/docs/send-data-from-hrflowai-into-a-tool
Demonstrates how to use Python's getpass module to securely prompt for sensitive API keys at runtime. This prevents hardcoding credentials directly in the script, improving security practices.
```Python
import getpass
settings = {
"API_KEY":getpass.getpass("Your API KEY:"),
"USER_EMAIL":"YOUR_USER_EMAIL",
"MESSAGE_API_KEY":getpass.getpass("Your Message Service API KEY:"),
"MESSAGE_URL":"https://api.company.com/sms"
}
```
--------------------------------
### Configure and Test HrFlow.ai Postman Environment
Source: https://developers.hrflow.ai/docs/get-started-with-hrflow-postman
Details the process of setting up the forked Postman environment. This includes renaming the environment, updating critical variables like `x-api-key` and `x-user-email`, saving changes, selecting the active environment, and finally, testing the API keys by sending a request to ensure a successful `code: 200` response.
```APIDOC
Environment Setup Steps:
1. Go to your workspace (Workspaces > My Workspace).
2. Click "Environments" on the left panel and select "Empty - Environment".
3. (Optional) Rename the environment.
4. Update the "Current Value" for `x-api-key` and `x-user-email`.
5. Save your environment (Ctrl + S or "Save" button).
6. Go back to Collection > HrFlow.ai API (left panel).
7. Change the active environment by clicking on "*No environment*" on the top-right-hand corner and selecting your environment.
API Key Test:
1. Unfold "HrFlow.ai API" collection.
2. Click on "Try your API keys" request.
3. Send the request.
Expected Response: JSON with `"code": 200` indicating success.
```
--------------------------------
### Example Full HrFlow.ai Profile Object Structure (JSON)
Source: https://developers.hrflow.ai/docs/profiles-scoring
This comprehensive JSON object provides a detailed example of a complete HrFlow.ai Profile, showcasing its various fields such as personal information, algorithmic consent settings, timestamps, experiences, educations, and custom tags. It demonstrates the full data structure of a profile as stored and managed within the HrFlow.ai system.
```json
{
"key": "8af2b7a0b48fbc936ace283ec020b0d6d4c4b018",
"reference": null,
"consent_algorithmic": {
"owner": {
"parsing": true,
"revealing": false,
"embedding": true,
"searching": true,
"scoring": true,
"reasoning": false
},
"controller": {
"parsing": true,
"revealing": false,
"embedding": true,
"searching": true,
"scoring": true,
"reasoning": false
}
},
"archived_at": null,
"updated_at": "2021-12-10T15:18:46+0000",
"created_at": "2021-12-10T15:18:46+0000",
"info": {
"full_name": "Harry James Potter",
"first_name": "Harry James",
"last_name": "Potter",
"email": "",
"phone": "",
"date_birth": "",
"location": {
"text": "",
"lat": null,
"lng": null,
"gmaps": null,
"fields": []
},
"urls": {
"from_resume": [],
"linkedin": "",
"twitter": "",
"facebook": "",
"github": ""
},
"picture": "",
"gender": "",
"summary": ""
},
"text_language": "en",
"text": "Harry James Potter",
"experiences_duration": 0,
"educations_duration": 0,
"experiences": [],
"educations": [],
"attachments": [],
"skills": [],
"languages": [],
"certifications": [],
"courses": [],
"tasks": [],
"interests": [],
"labels": [],
"tags": [
{
"name": "archive",
"value": false
},
{
"name": "contract_type",
"value": "Full Time"
},
{
"name": "entity",
"value": "R&D"
}
],
"metadatas": []
}
```