List Workforce Job Categories
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/own_workforces/job-categories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/own_workforces/job-categories"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.dcycle.io/v1/own_workforces/job-categories \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'List Workforce Job Categories
List the distinct employment categories used across the organization and its descendants
GET
/
v1
/
own_workforces
/
job-categories
List Workforce Job Categories
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/own_workforces/job-categories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/own_workforces/job-categories"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.dcycle.io/v1/own_workforces/job-categories \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'← Own Workforce API
Return the distinct
Like List Workforce Countries, this endpoint always spans the organization tree; there is no
employment_category values that appear on the workforce contracts of the header organization and its descendants.
Employment category is free text, captured exactly as it was imported. Expect the same role to appear under several spellings across subsidiaries — this endpoint reports what is stored, it does not normalize. If you need a clean breakdown, group on the
job_category dimension of the own-workforce datasets instead.consolidate_group switch.
Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faResponse
A bare JSON array of employment category strings, not an object.Example
curl -X GET "https://api.dcycle.io/v1/own_workforces/job-categories" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
import os
import requests
headers = {
"x-api-key": os.getenv("DCYCLE_API_KEY"),
"x-organization-id": os.getenv("DCYCLE_ORG_ID"),
}
response = requests.get(
"https://api.dcycle.io/v1/own_workforces/job-categories",
headers=headers,
)
for category in response.json():
print(category)
const axios = require('axios');
const headers = {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID
};
axios.get('https://api.dcycle.io/v1/own_workforces/job-categories', { headers })
.then(response => response.data.forEach(category => console.log(category)))
.catch(error => console.error(error));
Successful Response
["Engineer", "Operations", "Sales", "Plant operator"]
Common Errors
401 Unauthorized
Cause: the key is invalid, or it does not belong to the organization inx-organization-id — the two are looked up as a pair. A request carrying no credentials at all answers AUTH_REQUIRED instead.
{
"detail": "Invalid API key for organization",
"code": "INVALID_API_KEY"
}
403 Forbidden
Cause: the key’s owner is not an enabled member of the organization inx-organization-id.
{
"detail": "Logged User is not Member of Organization",
"code": "LOGGED_USER_NOT_MEMBER"
}
Related Endpoints
List countries
The same treatment for work locations
List employees
Each row carries its employment category
Was this page helpful?