Employers

Manage employer accounts, profiles, and configurations. Create new employers, retrieve employer details, and manage employer-level settings.

8 endpoints

Guide

Employer endpoints let you create and manage employer accounts that form the organizational backbone of BlueHive. Employers own employees, service bundles, and orders. Every occupational health workflow starts with an employer.

Creating an Employer

To onboard a new employer, provide their company name, physical address, at least one phone number, and an email. The API returns the created employer with a unique ID that you will use in all subsequent operations.

Create an employer
Register a new employer account
const response = await fetch('https://api.bluehive.com/v1/employers', {
  method: 'POST',
  headers: {
    'Authorization': 'ApiKey YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'Acme Manufacturing',
    address: {
      street1: '456 Industrial Blvd',
      city: 'Detroit',
      state: 'MI',
      zipCode: '48201'
    },
    phones: [
      { number: '3135551234', type: 'Work', primary: true }
    ],
    email: '[email protected]',
    website: 'https://acme-mfg.com',
    employeeConsent: true
  })
});

const employer = await response.json();
console.log('Employer ID:', employer._id);
// Store this ID — you'll need it for employees, orders, and bundles

Employer Lifecycle

After creating an employer, the typical workflow is:

  • Create the employer account with company details
  • Add employees to the employer using the Employees API
  • Configure service bundles to define which tests/services are available
  • Create and send orders for employees through the Orders API
  • Monitor results and manage the order lifecycle

Retrieving Employer Details

Fetch an employer by their unique ID to get the full profile including address, contact information, and configuration settings.

Get employer details
Retrieve a specific employer
curl https://api.bluehive.com/v1/employers/64f1a2b3c4d5e6f7a8b9c0d1 \
  -H "Authorization: ApiKey YOUR_API_KEY"
Chat with Bea