Headcount Data API
This API allows you to fetch detailed headcount data for analysis and reporting, making it easier to monitor hiring, approvals, and overall headcount management.
Frequently Asked Questions
1. What does the Headcount Data API do?
The Headcount Data API enables users to retrieve comprehensive headcount information, including historical, current, and future data. It supports a range of use cases, from tracking approved headcounts to understanding the time taken for approval processes. This can be particularly useful for HR, finance, and operations teams looking to perform data analysis and make informed decisions.
Users can opt for either:
- Headcounts data
- Full Forecast data
2. What are the typical use cases that this API solves?
| Use-cases | How the API Solves It | |
|---|---|---|
| 1 | Viewing Hiring plan | Use hiring-plan-active = 'True' to pull all headcounts in the active hiring plan, allowing finance teams to analyze current and future budget commitments. |
| 2 | Tracking forecast | Use headcount-status ("approved", "closed", null) and termination-date = null to get the headcount and employees in the current forecast. |
| 3 | Monitor hiring progress and approval status | Use headcount-status (approved, in-approval, closed), hiring-status, and approval-requested-date to get a list of all headcounts that are either approved or pending approval. This helps HR track the progress of hiring and the approval process. |
| 4 | Track progress of hiring | Use headcount-status (approved, in-approval, closed), hiring-status (non-started, in-progress, offer-stage, hired). |
| 5 | Identify the average time taken to approve a headcount | Use approval-requested-date and headcount-approved-date to calculate the time taken for each headcount to be approved, which helps in process optimization. |
| 6 | Backfill tracking and reporting | Use backfill-employee, headcount-type (Backfill) to track headcount openings that are tied to specific backfill needs, ensuring these are prioritized for recruitment. |
| 7 | Tracking denied and archived headcounts | Use denied-date, archived-date, archived-justification, and denied-justification to report on denied or archived headcounts, helping to audit and understand why certain requests were rejected. |
| 8 | Monitor headcount changes over time | Use last-updated to pull all headcounts that were updated in a period, allowing teams to keep track of recent changes. |
| 9 | Plan for future fiscal year budgets based on headcount needs | Use budget-annualized-salary, target-annualized-salary, and future budget-start-date, target-start-date to forecast headcount salary costs in upcoming fiscal years. This ensures better planning for recruitment and salary expenses in alignment with organizational growth. |
| 10 | Viewing Open Headcount requests | Retrieve the data and filter by: 1. headcount-id not equals null; 2. hiring-status not equals null and not equals Hired. Note: To get Open Headcount requests for the current Hiring Plan, further filter by hiring-plan-active = 'True'. |
3. How do I authenticate with the API?
The API requires an API key for authentication. Ensure you include the API key in the headers of your request as follows:
Authorization: Bearer YOUR_API_KEY
4. How do I make a request to the API?
To request headcount data, send a GET request to the API endpoint: https://api.teamohana.us/{domain_name}/v1/headcount
Here's an example request with recommended configuration.
Note: Please replace YOUR_DOMAIN_NAME and YOUR_API_KEY with your specific values.
curl -X GET \
https://api.teamohana.us/YOUR_DOMAIN_NAME/v1/headcount \
-H 'Accept: application/json' \
-H 'Accept-Encoding: gzip' \
-H 'Authorization: Bearer YOUR_API_KEY' \
--compressed5. How do I use filters to get to the specific data of my interest?
The Headcount endpoint has support for a wide variety of filters to support your use cases. Please see the updated API spec for the types of filters supported.
There is an additional Discovery endpoint. This allows you to find the id you want to use as a filter. Please refer to API Docs.
- Supported objects: Plan, Division, Department
Some examples of filter usage:
- Filter by Plan
curl -G https://api.teamohana.us/<your-domain-name>/v1/headcount \ -H 'Authorization: Bearer YOUR_API_KEY' \ --data-urlencode 'plan-id=YOUR_PLAN_ID' - Filter by Status
curl -G https://api.teamohana.us/<your-domain-name>/v1/headcount \ -H 'Authorization: Bearer YOUR_API_KEY' \ --data-urlencode 'status=approved' - Filter by Hiring Status
curl -G https://api.teamohana.us/<your-domain-name>/v1/headcount \ -H 'Authorization: Bearer YOUR_API_KEY' \ --data-urlencode 'hc-hiring-status=in-progress' - Filter by multiple Hiring Status
curl -G https://api.teamohana.us/<your-domain-name>/v1/headcount \ -H 'Authorization: Bearer YOUR_API_KEY' \ --data-urlencode 'hc-hiring-status=in-progress' \ --data-urlencode 'hc-hiring-status=offer-sent' - Filter by Plan and Department
curl -G https://api.teamohana.us/<your-domain-name>/v1/headcount \ -H 'Authorization: Bearer YOUR_API_KEY' \ --data-urlencode 'department-id=YOUR_DEPARTMENT_ID' \ --data-urlencode 'plan-id=YOUR_PLAN_ID' - Filter by Plan, Department and Hiring Status
curl -G https://api.teamohana.us/<your-domain-name>/v1/headcount \ -H 'Authorization: Bearer YOUR_API_KEY' \ --data-urlencode 'hc-hiring-status=in-progress' \ --data-urlencode 'department-id=YOUR_DEPARTMENT_ID' \ --data-urlencode 'plan-id=YOUR_PLAN_ID' - Filter by Division, Plan and Hiring Status
curl -G https://api.teamohana.us/<your-domain-name>/v1/headcount \ -H 'Authorization: Bearer YOUR_API_KEY' \ --data-urlencode 'hc-hiring-status=in-progress' \ --data-urlencode 'plan-id=YOUR_PLAN_ID' \ --data-urlencode 'division-id=YOUR_DIVISION_ID' - Filter by Division, Department, Plan and Hiring Status
curl -G https://api.teamohana.us/<your-domain-name>/v1/headcount \ -H 'Authorization: Bearer YOUR_API_KEY' \ --data-urlencode 'hc-hiring-status=in-progress' \ --data-urlencode 'department-id=YOUR_DEPARTMENT_ID' \ --data-urlencode 'plan-id=YOUR_PLAN_ID' \ --data-urlencode 'division-id=YOUR_DIVISION_ID'
6. What is the response format?
The API responds with a JSON object. Below is an example of the response structure:
Standard fields:
[
{
"hiring-status": "Hired",
"employee-type": "Full Time",
"department": "Sales",
"headcount-approved-date": "2024-07-15T00:00:00Z",
"target-variable": 1234,
"priority": "Normal",
"target-equity": 4321,
"opening-id": "1234-123",
"budget-equity": 44000,
"headcount-id": "ORG-123",
"budget-salary": 205000,
"reporting-manager": "John Nash",
"annualized-budget-salary": 2460000,
"actual-equity": 4321,
"actual-variable": 1324,
"budget-job-level": "L1",
"headcount-type": "New hire",
"archived-justification": "Not required",
"archived-date": "2024-07-15T00:00:00Z",
"backfill-employee-email": "back.fill@email.com",
"headcount-denied-date": "2024-07-15T00:00:00Z",
"target-start-date": "2024-06-27T21:07:14Z",
"budget-start-date": "2024-08-26T00:00:00Z",
"division": "Engineering",
"budget-pay-rate": "YEAR",
"job-level": "L2",
"job-name": "GH-1234 - Sales Director, Generative AI",
"denied-justification": "Not Suitable",
"actual-salary": 2345,
"location": "San francisco, USA",
"reporting-manager-email": "john.nash@email.com",
"last-updated": "2024-07-15T00:00:00Z",
"headcount-status": "Approved",
"actual-start-date": "2024-06-27T21:07:14Z",
"pay-rate": "YEAR",
"budget-currency": "USD",
"job-title": "Software Engineer",
"backfill-employee": "John Wick",
"annualized-actual-salary": 28140,
"backfill-employee-id": 1234,
"target-salary": 84840,
"target-currency": "USD",
"annualized-target-salary": 1018080,
"employee-name": "John Doe",
"actual-currency": "USD",
"budget-variable": 105000,
"headcount-url": "https://app.teamohana.us/headcount-details/ORG-123",
"team": "Sales",
"approval-requested-date": "2024-07-15T00:00:00Z",
"initiative": "Initiative Name",
"target-pay-rate": "YEAR",
"hiring-plan-active": "True",
"hiring-plan": "DEFAULT"
}
]Custom fields:
[
{
"custom-fields": {
"HEADCOUNT": {
"Field 1": value,
"Field 2": value,
"Field 3": value
},
"EMPLOYEE": {
"Field 1": value,
"Field 2": value,
"Field 3": value
},
"OFFER": {
"Field 1": value,
"Field 2": value,
"Field 3": value
}
}
}
]7. What should I do if I encounter errors?
In case of errors, the API will return an appropriate HTTP status code along with a message describing the issue. Common error codes include:
- 401 Unauthorized: Request does not contain valid credentials.
- 500 Internal Server Error: Something went wrong at TeamOhana. Please contact support.
8. What is the limit of the number of API requests?
The API rate limit is currently set to 5 requests per second. If you require any adjustments to this limit, please reach out to our support team for assistance.
For more information or assistance with the API, please contact us.
Pigment Connector API
This API allows you to fetch the full Forecast data from TeamOhana for analysis and reporting, making it easier to monitor hiring, approvals, and overall headcount management.
Onboarding
Setup
Pigment allows you to connect to an external API via API Request as an Integration option. Using this, you will be setting up a connection to the TeamOhana Pigment Connector API.
Pre-requisites:
- An existing Pigment account, and
- A working import configuration ID.
Set up a new API request connection in Pigment with the following information:
- POST endpoint URL
https://api.teamohana.us/<your name in TeamOhana>/v1/headcount/upload/pigment
- Headers
Authorization: Bearer <your TeamOhana API key>x-pigment-api-key: <your Pigment API key>
- JSON Body
{"import-configuration-id": <your Pigment Import Configuration ID>}
Verification
Once the API request connection has been set up, please set up a way to test the import in a Board where you would like to use it. The Forecast data should now be available for viewing in a Dimension List.
If you want to try the TeamOhana Pigment connector API without the above setup, please execute the following command with any HTTP client of your choice (curl is being used in the example, but any HTTP client would work).
curl -X POST \
https://api.teamohana.us/<your name in TeamOhana>/v1/headcount/upload/pigment \
-H 'accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer <Your TeamOhana API key>' \
-H 'x-pigment-api-key: <Your Pigment API key>' \
-d '{"import-configuration-id": <Your Pigment Import Configuration ID>}'Troubleshooting
- Triggering an import from Pigment may bring up an error. Usually, this is displayed as a Webhook error.
- The data might still end up getting imported successfully.
- The data might not get imported. In that case, please open a support request with TeamOhana.
- If you do not see some columns you expect in your Pigment Dimension List, please verify that they appear with the same name in the source CSV used to create the Import Configuration.
Process diagram
API use-cases
Once the API connection has been successfully set up and verified, you are ready to use the Forecast data. Some typical use cases are:
| Use-cases | How the API Solves It | |
|---|---|---|
| 1 | Viewing Hiring Plan | Use hiring-plan-active = 'True' to pull all headcounts in the active hiring plan, allowing finance teams to analyze current and future budget commitments. |
| 2 | Tracking forecast | Use headcount-status ("approved", "closed", null) and termination-date = null to get the headcount and employees in the current forecast. |
| 3 | Monitor hiring progress and approval status | Use headcount-status (approved, in-approval, closed), hiring-status, and approval-requested-date to get a list of all headcounts that are either approved or pending approval. This helps HR track the progress of hiring and the approval process. |
| 4 | Track the progress of hiring | Use headcount-status (approved, in-approval, closed), hiring-status (non-started, in-progress, offer-stage, hired). |
| 5 | Identify the average time taken to approve a headcount | Use approval-requested-date and headcount-approved-date to calculate the time taken for each headcount to be approved, which helps in process optimization. |
| 6 | Backfill tracking and reporting | Use backfill-employee, headcount-type (Backfill) to track headcount openings that are tied to specific backfill needs, ensuring these are prioritized for recruitment. |
| 7 | Tracking denied and archived headcounts | Use denied-date, archived-date, archived-justification, and denied-justification to report on denied or archived headcounts, helping to audit and understand why certain requests were rejected. |
| 8 | Monitor headcount changes over time | Use last-updated to pull all headcounts that were updated in a period, allowing teams to keep track of recent changes. |
| 9 | Plan for future fiscal year budgets based on headcount needs | Use budget-annualized-salary, target-annualized-salary, and future budget-start-date, target-start-date to forecast headcount salary costs in upcoming fiscal years. This ensures better planning for recruitment and salary expenses in alignment with organizational growth. |
Scenarios API
The Scenario API has following two parts.
Discovery endpoint
This allows you to discover which scenarios can be pulled into your planning process. It returns un-merged Scenarios that the authenticated user has access to. Information returned includes:
- The Scenario Name
- A human-readable Scenario ID
Export endpoint
This returns data for a specific Scenario. Data format is either JSON or CSV, depending on your choice when invoking the endpoint.
Swagger API Documentation
Detailed swagger API documentation and schema is available on our API Documentation page.
Contact Us
If you need an API Key or if you need assistance with the API, please reach out to our support team at support@teamohana.com.