Generate the next employee number
mutation {
GenerateEmployeeNumber
}
{
"data": { "GenerateEmployeeNumber": "EMP-2025-00123" }
}
Create an employee
mutation CreateEmployee($input: EmployeeInput!) {
CreateEmployee(input: $input) {
id
employee_number
first_name
last_name
email
active
}
}
{
"input": {
"employee_number": "EMP-2025-001",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"phone": "+1234567890",
"position": "Sales Representative"
}
}
{
"data": {
"CreateEmployee": {
"id": 100120,
"employee_number": "EMP-2025-001",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"active": true
}
}
}
Update an employee
| id - ID |
|---|
| Id of the employee |
mutation UpdateEmployee($id: ID!, $input: EmployeeInput!) {
UpdateEmployee(id: $id, input: $input) {
id
first_name
last_name
email
phone
position
}
}
{
"id": 100120,
"input": {
"phone": "+1987654321",
"position": "Senior Sales Representative"
}
}
{
"data": {
"UpdateEmployee": {
"id": 100120,
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"phone": "+1987654321",
"position": "Senior Sales Representative"
}
}
}
Delete an employee
| id - ID |
|---|
| Id of the employee |
mutation DeleteEmployee($id: ID!) {
DeleteEmployee(id: $id)
}
{
"data": { "DeleteEmployee": true }
}
Delete multiple employees
| ids - [ID] |
|---|
| List of employee identifiers |
mutation DeleteEmployees($ids: [ID!]!) {
DeleteEmployees(ids: $ids)
}
{
"ids": [100120, 100121, 100122]
}
{
"data": { "DeleteEmployees": true }
}
Disable an employee
| id - ID |
|---|
| Id of the employee |
mutation DisableEmployee($id: ID!) {
DisableEmployee(id: $id) {
id
active
}
}
{
"data": {
"DisableEmployee": {
"id": 100120,
"active": false
}
}
}
Disable multiple employees
| ids - [ID] |
|---|
| List of employee identifiers |
mutation DisableEmployees($ids: [ID!]!) {
DisableEmployees(ids: $ids)
}
{
"ids": [100120, 100121, 100122]
}
{
"data": { "DisableEmployees": true }
}
Enable an employee
| id - ID |
|---|
| Id of the employee |
mutation EnableEmployee($id: ID!) {
EnableEmployee(id: $id) {
id
active
}
}
{
"data": {
"EnableEmployee": {
"id": 100120,
"active": true
}
}
}
Enable multiple employees
| ids - [ID] |
|---|
| List of employee identifiers |
mutation EnableEmployees($ids: [ID!]!) {
EnableEmployees(ids: $ids)
}
{
"ids": [100120, 100121, 100122]
}
{
"data": { "EnableEmployees": true }
}
Invite an employee to the B2B store
| id - ID |
|---|
| Id of the employee |
mutation InviteEmployeeToB2bStore($id: ID!, $input: EmployeeInput!) {
InviteEmployeeToB2bStore(id: $id, input: $input) {
id
b2b_store_status
}
}
{
"id": 100120,
"input": {
"b2b_store_settings": {
"permissions": ["view_catalog", "place_orders"]
}
}
}
{
"data": {
"InviteEmployeeToB2bStore": {
"id": 100120,
"b2b_store_status": "active"
}
}
}
Invite multiple employees to the B2B store
| ids - [ID] |
|---|
| List of employee identifiers |
mutation InviteEmployeesToB2bStore($ids: [ID!]!, $input: EmployeeInput!) {
InviteEmployeesToB2bStore(ids: $ids, input: $input) {
id
b2b_store_status
}
}
{
"ids": [100120, 100121],
"input": {
"b2b_store_settings": {
"permissions": ["view_catalog", "place_orders"]
}
}
}
{
"data": {
"InviteEmployeesToB2bStore": [
{ "id": 100120, "b2b_store_status": "active" },
{ "id": 100121, "b2b_store_status": "active" }
]
}
}
Deny B2B store access to an employee
| id - ID |
|---|
| Id of the employee |
mutation DenyAccessToB2bStore($id: ID!) {
DenyAccessToB2bStore(id: $id) {
id
b2b_store_status
}
}
{
"data": {
"DenyAccessToB2bStore": {
"id": 100120,
"b2b_store_status": "denied"
}
}
}
Disable B2B store access for an employee
| id - ID |
|---|
| Id of the employee |
mutation DisableAccessToB2bStore($id: ID!) {
DisableAccessToB2bStore(id: $id) {
id
b2b_store_status
}
}
{
"data": {
"DisableAccessToB2bStore": {
"id": 100120,
"b2b_store_status": "disabled"
}
}
}
| id - ID |
|---|
| Identifier (optional) |
| employee_number - String |
|---|
| Employee reference number |
| position - String |
|---|
| Position/Role |
| employable - Object |
|---|
| Employable entity (EmployableInput) |
| b2b_store_settings - JSON |
|---|
| B2B store settings |
| address - Object |
|---|
| Address (AddressInput) |
| b2b_store_status - B2bStoreStatus |
|---|
| B2B store status (pending/denied/active/disabled) |
| notes - String |
|---|
| Additional notes |
| Value | Description |
|---|
pending | Access request pending approval. |
denied | Access request denied. |
active | Active B2B store access. |
disabled | B2B store access disabled. |