See the Queries page for a presentation of this resource.
Generate the next employee number
GraphQL
mutation {
GenerateEmployeeNumber
}
JSON
{
"data": { "GenerateEmployeeNumber": "EMP-2025-00123" }
}
Create an employee
GraphQL
mutation CreateEmployee($input: EmployeeInput!) {
CreateEmployee(input: $input) {
id
employee_number
first_name
last_name
email
active
}
}
JSON
{
"input": {
"employee_number": "EMP-2025-001",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected] ",
"phone": "+1234567890",
"position": "Sales Representative"
}
}
JSON
{
"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
GraphQL
mutation UpdateEmployee($id: ID!, $input: EmployeeInput!) {
UpdateEmployee(id: $id, input: $input) {
id
first_name
last_name
email
phone
position
}
}
JSON
{
"id": 100120,
"input": {
"phone": "+1987654321",
"position": "Senior Sales Representative"
}
}
JSON
{
"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
GraphQL
mutation DeleteEmployee($id: ID!) {
DeleteEmployee(id: $id)
}
JSON
{
"data": { "DeleteEmployee": true }
}
Delete multiple employees
ids - [ID] List of employee identifiers
GraphQL
mutation DeleteEmployees($ids: [ID!]!) {
DeleteEmployees(ids: $ids)
}
JSON
{
"ids": [100120, 100121, 100122]
}
JSON
{
"data": { "DeleteEmployees": true }
}
Disable an employee
id - ID Id of the employee
GraphQL
mutation DisableEmployee($id: ID!) {
DisableEmployee(id: $id) {
id
active
}
}
JSON
{
"data": {
"DisableEmployee": {
"id": 100120,
"active": false
}
}
}
Disable multiple employees
ids - [ID] List of employee identifiers
GraphQL
mutation DisableEmployees($ids: [ID!]!) {
DisableEmployees(ids: $ids)
}
JSON
{
"ids": [100120, 100121, 100122]
}
JSON
{
"data": { "DisableEmployees": true }
}
Enable an employee
id - ID Id of the employee
GraphQL
mutation EnableEmployee($id: ID!) {
EnableEmployee(id: $id) {
id
active
}
}
JSON
{
"data": {
"EnableEmployee": {
"id": 100120,
"active": true
}
}
}
Enable multiple employees
ids - [ID] List of employee identifiers
GraphQL
mutation EnableEmployees($ids: [ID!]!) {
EnableEmployees(ids: $ids)
}
JSON
{
"ids": [100120, 100121, 100122]
}
JSON
{
"data": { "EnableEmployees": true }
}
Invite an employee to the B2B store
id - ID Id of the employee
GraphQL
mutation InviteEmployeeToB2bStore($id: ID!, $input: EmployeeInput!) {
InviteEmployeeToB2bStore(id: $id, input: $input) {
id
b2b_store_status
}
}
JSON
{
"id": 100120,
"input": {
"b2b_store_settings": {
"permissions": ["view_catalog", "place_orders"]
}
}
}
JSON
{
"data": {
"InviteEmployeeToB2bStore": {
"id": 100120,
"b2b_store_status": "active"
}
}
}
Invite multiple employees to the B2B store
ids - [ID] List of employee identifiers
GraphQL
mutation InviteEmployeesToB2bStore($ids: [ID!]!, $input: EmployeeInput!) {
InviteEmployeesToB2bStore(ids: $ids, input: $input) {
id
b2b_store_status
}
}
JSON
{
"ids": [100120, 100121],
"input": {
"b2b_store_settings": {
"permissions": ["view_catalog", "place_orders"]
}
}
}
JSON
{
"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
GraphQL
mutation DenyAccessToB2bStore($id: ID!) {
DenyAccessToB2bStore(id: $id) {
id
b2b_store_status
}
}
JSON
{
"data": {
"DenyAccessToB2bStore": {
"id": 100120,
"b2b_store_status": "denied"
}
}
}
Disable B2B store access for an employee
id - ID Id of the employee
GraphQL
mutation DisableAccessToB2bStore($id: ID!) {
DisableAccessToB2bStore(id: $id) {
id
b2b_store_status
}
}
JSON
{
"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 pendingAccess request pending approval. deniedAccess request denied. activeActive B2B store access. disabledB2B store access disabled.