Sync HRIS ↔ AeroHire

Bidirectional synchronisation between your HRIS and AeroHire — eliminate double data entry for applicant data.

The Problem

Recruiting teams maintain applicant data in AeroHire, while HR teams must manually transfer the same data to the HRIS (e.g. SAP SuccessFactors, Workday, BambooHR). This leads to:

  • Time spent on duplicate data entry
  • Error-prone manual copy-paste processes
  • Data delays — HR does not have the current applicant status
  • Compliance issues with GDPR-compliant data deletion

The Solution

With the AeroHire API you can build automatic bidirectional synchronisation:

  • AeroHire → HRIS: Hired candidates are automatically created as new employees in the HRIS
  • HRIS → AeroHire: New open positions from the HRIS are automatically created as jobs in AeroHire

Architecture

AeroHire does not yet offer outgoing webhooks (in development). A polling-based sync every 5 minutes for status changes is recommended until webhooks are available.

Step-by-step Implementation

1

Create AeroHire API key

Create an API key with the scopes applications:write, candidates:read, jobs:read in AeroHire under Settings → API Access.

2

Set up webhook endpoint in your HRIS

Set up an HTTP endpoint in your HRIS that receives AeroHire data. The endpoint must accept JSON.

webhook-handler.jsJavaScript
// Express.js webhook handler
import express from "express";
const app = express();
app.use(express.json());

app.post("/webhook/aerohire", async (req, res) => {
  const { event, data } = req.body;

  switch (event) {
    case "application.status_changed":
      await syncApplicationStatus(data.application);
      break;
    case "candidate.hired":
      await createEmployeeRecord(data.candidate);
      break;
  }

  res.status(200).json({ received: true });
});
3

Import existing candidates

During initial setup, retrieve all existing applications from AeroHire and import them into your HRIS.

initial-import.jsJavaScript
const API_KEY = process.env.AEROSELECT_API_KEY;
const BASE = "https://api.aeroselect.io/api/v2/external";

async function importAllApplications() {
  let page = 1;
  let hasMore = true;
  const imported = [];

  while (hasMore) {
    const res = await fetch(`${BASE}/applications?page=${page}`, {
      headers: { "X-API-Key": API_KEY },
    });
    const { data, meta } = await res.json();

    for (const application of data) {
      await hris.upsertApplication({
        external_id: application.id,
        candidate_email: application.candidate.email,
        status: application.status,
        job_title: application.job.title,
      });
    }

    imported.push(...data);
    hasMore = page < meta.last_page;
    page++;
  }

  console.log(`${imported.length} applications imported`);
}
4

Enable bidirectional sync

Automatically create new employees from the HRIS as candidates in AeroHire and transfer hired AeroHire candidates to the HRIS.

hris-sync.tsJavaScript
// Transfer hired candidate to HRIS
async function onCandidateHired(applicationId: number) {
  const appRes = await fetch(
    `${BASE}/applications/${applicationId}`,
    { headers: { "X-API-Key": API_KEY } }
  );
  const { data: application } = await appRes.json();

  const candidateRes = await fetch(
    `${BASE}/candidates/${application.candidate.id}`,
    { headers: { "X-API-Key": API_KEY } }
  );
  const { data: candidate } = await candidateRes.json();

  // Create as new employee in HRIS
  await hris.createEmployee({
    first_name: candidate.first_name,
    last_name: candidate.last_name,
    email: candidate.email,
    phone: candidate.phone,
    start_date: new Date().toISOString().slice(0, 10),
    job_title: application.job.title,
    source: "aerohire",
    aerohire_candidate_id: candidate.id,
  });
}

Polling Strategy (until webhooks are available)

polling.jsJavaScript
// Poll every 5 minutes for new status changes
const POLL_INTERVAL = 5 * 60 * 1000;
const BASE = "https://api.aeroselect.io/api/v2/external";
const API_KEY = process.env.AEROSELECT_API_KEY;

async function pollApplicationChanges(lastSyncAt: string) {
  const res = await fetch(
    `${BASE}/applications?updated_after=${lastSyncAt}`,
    { headers: { "X-API-Key": API_KEY } }
  );
  const { data } = await res.json();

  for (const application of data) {
    await processApplicationChange(application);
  }

  return new Date().toISOString();
}

let lastSync = new Date(Date.now() - POLL_INTERVAL).toISOString();
setInterval(async () => {
  lastSync = await pollApplicationChanges(lastSync);
}, POLL_INTERVAL);

Common Errors and Solutions

ProblemSolution
Duplicate candidates in HRISUse email as unique key for upsert
Rate limit during initial importAdd delay between pages: await sleep(200)
409 Conflict when submitting applicationCheck for existing application before submitting