Skip to content

Inhaler


Description

The inhaler endpoint is used to easily parse a candidate record into the database using a resume or object created from a form. This is mostly used with a job board integration where the candidate object can be filled out via an apply form or automatically parsed from the resume or file sent in the API call. Using the candidate object gives you greater control over the data as you are manually setting the values for each field parameter. If a form was not filled out to supply this data, you can use the parsing ability to extract candidate field data via the file attached to the call.

When Attaching a file to this API call, you will use a base64 encoded string in the FileContents parameter. This file will serve as the active resume for the candidate record being added. You are not required to parse the data when attaching a file so you may manually set the candidate object and attach a file to be used as the active resume.

Data parameters

  • FileName - FileName serves as the name of the file that will be attached to the candidate record. This will be what the resume is named in the attachments section.
  • FileContents - FileContents are the actual contents of the resume being attached or parsed. This will need to be a base64 encoded string of the resume.
  • EncodingType - This is not a required parameter but will use the value "BASE64" if used.
  • Src - Src is the value for the source field on the candidate record. This is often used for applicants to show which job board, website, or method this candidate used to enter the database.
  • Duplicate - This is returned in the response to display how many duplicates exist from the data you supplied.
  • DupeId - DupeId is returned with the unique candidate id for any candidates that are already in the database with the data you supplied. This matches the resume or file contents in the POST
  • AddId - If there are no duplicates found, then the candidate is added. The AddId is the unique candidiate id for the newly added candidate
  • rolluplist - This can be used with a unique rollup code to add the new candidate record to a rollup in the database
  • useAddr - This is a boolean value to determine whether the call will parse the information from the FileContents parameter or using the supplied candidate object. Setting this to true will skip file parsing and only use the candidate object to fill out the candidate name fields.
  • errorMessage - This parameter is returned if there are any issues in creating the candidate record.
  • status - Status is included in the response to supply the status of the call. A status of "SUCCESS" means the record was created successfully.
  • NameInfo - NameInfo is the candidate object that can be included when the useAddr parameter is set to true. The available object fields will be outlined below.

NameInfo object parameters

  • firstname - This is the first name for the candidate record.
  • lastname - This is the last name for the candidate record.
  • middlename - This represents the middle initial field for the candidate.
  • address - This parameter represents the address of the candidate.
  • city - This will be the city for the address parameter listed above.
  • state - This will be the state for the city and address parameters listed above.
  • zip - This is the 5 digit zip code for the address parameter above.
  • country - This parameter represents the Country field for the candidate record.
  • emailaddress - The emailaddress parameter is used to set the default email address field.
  • mobilephone - mobilephone is used to set the cell phone field for this candidate.
  • homephone - homephone is used to set the home phone field for this candidate
  • faxphone - faxphone is used to set the fax phone field for this candidate.
  • title - The title parameter is used to set the title field.
  • coid - coid is a parameter used to set the company id for the candidate. Company id is a unique value for each company and can be used to link candidates to a specific company.

Examples

------------------ REQUEST -------------------
API
POST /rest/api/Candidates/inhaler  
Authorization: BEARER {SessionId}  
  
{  
"FileName": "Current Resume",  
"FileContents": "{Base64 encoded string}",  
"useAddr": false,  
}
json
{
  "method": "POST",
  "url": "https://www2.pcrecruiter.net/rest/api/Candidates/Inhaler",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "BEARER Token"
  },
  "body": {
  "FileName": "Current Resume",  
  "FileContents": "{Base64 encoded string}",  
  "useAddr": false,
  }
}
------------------ RESPONSE ------------------
json
{  
"FileName": null,  
"FileContents": null,  
"EncodingType": null,  
"Src": null,  
"JobId": null,  
"Duplicate": false,  
"DupeId": 0,  
"AddId": {CandidateId},  
"rolluplist": null,  
"useAddr": false,  
"errorMessage": "",  
"status": "SUCCESS",  
"NameInfo":{  
"AggregateCount": null  
}  
}

TIP

This API call uses the inhaler endpoint to pass the file name and base 64 encoded file contents and use the parsing capability to create the candidate record and fill out the candidate field from the parsed information found within the file contents. This method is not as accurate as setting your own nameinfo parameters but can be used in the absence of that data outside of the file contents.

------------------ REQUEST -------------------
API
POST /rest/api/Candidates/inhaler  
Authorization: BEARER {SessionId}  
  
{  
"FileName": "Current Resume",  
"FileContents": "{Base64 encoded string}",  
"useAddr": true,  
"NameInfo": {  
"firstname":"Jane",  
"lastname":"Smith",  
"address":"4420 Sherwin Road",  
"city":"Willoughby",  
"state":"Ohio",  
"zip":"44094",  
"country":"United States",  
"emailaddress":"support@mainsequence.net",  
"mobilephone":"(440) 946-5214",  
"title":"QA Analyst",  
"coid":"{CompanyId}"  
}  
}
json
{
  "method": "POST",
  "url": "https://www2.pcrecruiter.net/rest/api/Candidates/Inhaler",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "BEARER Token"
  },
  "body": {
  "FileName": "Current Resume",  
  "FileContents": "Base64 encoded string",  
  "useAddr": true,  
  "NameInfo": {
    "firstname":"Jane",  
    "lastname":"Smith",  
    "address":"4420 Sherwin Road",  
    "city":"Willoughby",  
    "state":"Ohio",  
    "zip":"44094",  
    "country":"United States",  
    "emailaddress":"support@mainsequence.net",  
    "mobilephone":"(440) 946-5214",  
    "title":"QA Analyst",  
    "coid":"CompanyId"
    }
  }
}
------------------ RESPONSE ------------------
json
{  
"FileName": null,  
"FileContents": null,  
"EncodingType": null,  
"Src": null,  
"JobId": null,  
"Duplicate": false,  
"DupeId": 0,  
"AddId": {CandidateId},  
"rolluplist": null,  
"useAddr": false,  
"errorMessage": "",  
"status": "SUCCESS",  
"NameInfo":{  
"AggregateCount": null  
}  
}

TIP

This API call uses the inhaler endpoint to pass the file name and base 64 encoded file contents but uses the NameInfo object to assign exact values to each field. This will create a candidate with the NameInfo candidate object and have the file attached as the current resume.