Parsing resumes and job descriptions using Affinda is easy using Affinda’s simple and flexible REST API. Our API Reference provides all the required information to start processing documents programmatically. The guide below provides information that is specific to Recruitment Technology to make it even easier.

Uploading documents

To make your first API call, you’ll need to:
  1. Generate an API key (SettingsAPI Keys)
  2. Retrieve the Workspace identifier (Workspace -> Workflow -> Integrations)
  3. Retrieve the relevant Document Type identifier (Document Types -> Resume Parser (or other Document Type) -> Settings)
# 1. Set your API key (found in the Affinda dashboard)
export AFFINDA_API_KEY="aff_562..."

# 2. Upload a document and wait for processing to finish
curl -X POST https://api.affinda.com/v3/documents \
     -H "Authorization: Bearer $AFFINDA_API_KEY" \
     -F "file=@sample_invoice.pdf" \
     -F "workspace=YOUR_WORKSPACE_IDENTIFIER"
     -F "documentType"=YOUR_DOCUMENT_TYPE_IDENTIFIER

Optional parameters

The above sample will allow users to upload a document using our default settings. However, users may wish to consider the use of other parameters when setting up their integrations.
The below are commonly used parameters for the Resume Parsing use case. For the full list of parameters, see Uploading Documents.
Synchronous vs. Asynchronous responses Customers can set wait to true / false depending if the parsing response needs to be returned synchronously or not.
  • **True: **Response will be returned once parsing has completed and will include extracted data
  • **False: **Response will be returned immediately with _meta _object only (which includes the unique identifier assigned to that document). Extracted data will need to be requested later (either through polling or webhooks). Recommended for customers who are bulk uploading.
The default is true (synchronous parsing). Document Deletion For customers who do not wish to store their documents, options are available:
  • expiryTime: Document will be automatically deleted at this time
  • deleteAfterParse: No data is stored, and the document is deleted as soon as it is parsed
For more information, see Data Retention. Compact By default, the Affinda API will return the full JSON response with associated metadata for each field. To reduce the amount of information in the data object, customers can choose to enable compact to return only the parsed value. Parsing Time For customers where speed of response is a key consideration, additional improvements can be achieved when uploading via API by setting the following parameters:
  • wait: True
  • enableValidationTool: False
  • deleteAfterParse: True
  • compact: True
Search & Match integration For information about integrating Affinda’s Search & Match product, see here.