Query employee profiles, permissions, and B2B store access.
GraphQL
query GetEmployee($id: ID) {
Employee(id: $id) {
id
employee_number
first_name
last_name
email
phone
position
notes
employable { id }
employable_type
employer { ... on Customer { id label } ... on Supplier { id label } }
b2b_store_settings
b2b_store_status
address { id }
user_profile { id }
active
created_at
updated_at
label
}
}
GraphQL
query Employees(
$orderBy: [QueryEmployeesOrderByOrderByClause!],
$where: QueryEmployeesWhereWhereConditions,
$search: String,
$first: Int,
$page: Int,
$trashed: Trashed
) {
Employees(
orderBy: $orderBy
where: $where
search: $search
first: $first
page: $page
trashed: $trashed
) {
paginatorInfo {
total
currentPage
}
data {
id
employee_number
first_name
last_name
email
phone
active
employer { ... on Customer { label } ... on Supplier { label } }
}
}
}
JSON
{
"where": {
"AND": [
{ "column": "ACTIVE", "operator": "EQ", "value": true }
]
},
"orderBy": [
{ "column": "LAST_NAME", "order": "ASC" }
],
"search": "employee name or email"
}
Field Type Description idInt Unique identifier of the employee. labelString Computed label (first_name + last_name). employee_numberString Employee reference number. first_nameString Employee's first name. last_nameString Employee's last name. emailString Employee's email address. phoneString Phone number. positionString Employee's position/role. notesString Notes about the employee. employableEmployable Associated employable entity. employable_typeString Type of the employable entity. employerUnion Employer (Customer or Supplier). b2b_store_settingsJSON B2B store configuration settings. b2b_store_statusB2bStoreStatus B2B store access status. addressAddress Employee's address. user_profileUserProfile Associated user profile. activeBoolean Employee's activation status. created_atDateTime Creation date and time. updated_atDateTime Last update date and time. custom_fields[EntityCustomField] Custom fields for this entity.
You can create filters based on following fields:
id - Int Example: { "column": "ID", "operator": "EQ", "value": 10001 }
employee_number - String Example: { "column": "EMPLOYEE_NUMBER", "operator": "EQ", "value": "EMP-2025-001" }
phone - String Example: { "column": "PHONE", "operator": "EQ", "value": "+1234567890" }
active - Boolean Example: { "column": "ACTIVE", "operator": "EQ", "value": true }
b2b_store_status - B2bStoreStatus Example: { "column": "B2B_STORE_STATUS", "operator": "EQ", "value": "active" }
| trashed - Filter by trashed status. Accepts ALL, TRASHED, or NOT_TRASHED. |
You can sort data based on following fields: first_name, last_name, email, phone, employee_number, active, user_profile_last_accessed_at
GraphQL
query SortEmployees(
$where: QueryEmployeesWhereWhereConditions,
$first: Int,
$page: Int
) {
Employees(
where: $where
orderBy: [{ column: LAST_NAME, order: ASC }]
first: $first
page: $page
) {
paginatorInfo {
total
currentPage
}
data {
id
first_name
last_name
email
employee_number
active
}
}
}
JSON
{
"data": {
"Employees": [
{
"id": 100001,
"first_name": "John",
"last_name": "Doe",
"email": "[email protected] ",
"employee_number": "EMP-2025-001",
"active": true
},
{
"id": 100002,
"first_name": "Jane",
"last_name": "Smith",
"email": "[email protected] ",
"employee_number": "EMP-2025-002",
"active": true
}
]
}
}
Field Type Description idInt Employable entity ID. labelString Entity label/name.
Field Type Description idID Entity ID (required). employable_typeString Entity type: Customer or Supplier (required).
Value Description pendingAccess request pending approval. deniedAccess request denied. activeActive B2B store access. disabledB2B store access disabled.