Company Schema
Companies, employees, partners, vehicles and counterparties.
Queries
-
currentEmployee
Returns the current employee context for the authenticated user in the selected company.
-
myCompanies
Returns a list of companies the user belongs to.
-
getCompanyRoles
Returns roles defined for the company.
-
getPermissions
Returns available permissions for creating or editing roles.
-
getRole
Returns a single role by ID.
-
countries
Returns a list of countries.
-
country
Returns a single country by ID or code.
-
getLicenseCategories
Returns driver license categories (used when adding drivers).
-
getEmployeeStatuses
Returns employment status options.
-
getEmploymentTypes
Returns employment type options.
-
getCompanyDrivers
Returns drivers of the company with optional pagination.
-
employeeInvites
Returns employee invites sent by the company (paginated).
-
myEmployeeInvites
Returns invites received by the current user.
-
joinCompanyRequests
Returns join requests to the company (paginated).
-
getCompanyTrucks
Returns trucks owned or used by the company.
-
getCompanySemiTrailers
Returns semi-trailers of the company.
-
getCompanyTractors
Returns tractors of the company.
-
employees
Returns employees of the company with pagination and sorting.
-
checkCompanyExists
Checks if a company exists by registration number and country.
-
getCounterpartyStatuses
Returns counterparty status options.
-
getCounterpartyTypes
Returns counterparty type options.
-
getCompanyCounterparties
Returns counterparties of the company.
-
partnerships
Returns partnerships of the company.
-
partnershipInvites
Returns partnership invites created by the company (paginated).
-
myPartnershipInvites
Returns partnership invites received by the company.
-
myJoinCompanyRequests
Returns join requests created by the current user.
Mutations
-
createCompany
Creates a new company with name, country, registration number, tax ID, type and currency.
-
updateCompany
Updates company details.
-
deleteCompany
Deletes a company.
-
changeCompanyType
Changes company type (cargo owner, carrier, forwarder).
-
saveRole
Creates or updates a role with permissions.
-
deleteRole
Deletes a role.
-
assignEmployeeRole
Assigns a role to an employee.
-
createPartnershipInvite
Creates a partnership invite for another company.
-
acceptPartnershipInvite
Accepts a partnership invite using the token.
-
rejectPartnershipInvite
Rejects a partnership invite.
-
terminatePartnership
Terminates an existing partnership.
-
saveDriver
Creates or updates a driver with contact, license and employment info.
-
deleteDriver
Deletes a driver.
-
createEmployeeInvite
Creates an invite for a user to join the company by email.
-
acceptEmployeeInvite
Accepts an employee invite using the token.
-
rejectEmployeeInvite
Rejects an employee invite.
-
createJoinCompanyRequest
Creates a request to join a company (by country code, registration number, tax ID).
-
acceptJoinCompanyRequest
Accepts a join company request and assigns a role.
-
rejectJoinCompanyRequest
Rejects a join company request.
-
removeEmployee
Removes an employee from the company (admin action).
-
leaveCompany
Current user leaves the company.
-
saveTruck
Creates or updates a truck.
-
setTruckDriver
Assigns a driver to a truck.
-
deleteTruck
Deletes a truck.
-
saveSemiTrailer
Creates or updates a semi-trailer.
-
setSemiTrailerDriver
Assigns a driver to a semi-trailer.
-
deleteSemiTrailer
Deletes a semi-trailer.
-
saveTractor
Creates or updates a tractor.
-
setTractorDriver
Assigns a driver to a tractor.
-
deleteTractor
Deletes a tractor.
-
saveCounterparty
Creates or updates a counterparty (business partner).
-
deleteCounterparty
Deletes a counterparty.