Get your user and company setup

distru-get-meRead

Gets the authenticated user and their company setup: timezone, US state, compliance system, active modules and key inventory and sales settings.

Inputs

Every tool also takes the common inputs.

FieldTypeRequired
includePermissionsbooleanNo

Output

Presence on a nested field assumes its parent exists.

FieldTypePresence
userobjectAlways
user.idstringAlways
user.fullNamestringCan be null
user.emailstringAlways
user.isAdminbooleanAlways
user.permissionsstring[]Can be absent
myCompanyobjectAlways
myCompany.idstringAlways
myCompany.namestringAlways
myCompany.legalBusinessNamestringAlways
timezonestringAlways
usStatestringCan be null
complianceTypeenum
BIOTRACKMETRCNONE
Can be null
activeModulesenum[]
18 values
ANALYTICSAPIBIOTRACKBLAZECORECOST_ACCOUNTINGCULTIVATIONCULTIVATION_ANALYTICSDISTRU_COMMERCEDISTRU_CONNECTDUTCHIELABEL_PRINTINGLEAFLINKMETRCQBOROUTINGTREEZTRYM
Always
settingsobjectAlways
settings.inventoryobjectAlways
settings.inventory.allowNegativeAvailableQuantitybooleanAlways
settings.inventory.binTrackingEnabledbooleanAlways
settings.salesobjectAlways
settings.sales.salesOrderAutofulfillbooleanAlways
What the AI reads

Gets the authenticated user and their company setup: timezone, US state, compliance system, active modules and key inventory and sales settings. Call once at the start of a session to read dates in the right timezone and to know which compliance- and module-backed tools apply. With several accounts, call it once per account: user, company and settings differ. Pass includePermissions to check what the user may do before a write. isAdmin means full access: every permission plus admin-only actions. myCompany is the user's own company, as distru-search-companies returns it with isMyCompany: true. When settings.inventory.allowNegativeAvailableQuantity is false, Processing sales orders cannot reserve more than the available quantity for a given product and location. When settings.sales.salesOrderAutofulfill is true, saving a sales order as Processing fills its unfulfilled batch- and package-tracked lines with stock from the line's location. Batches: earliest expiration date, then smallest quantity. Packages: same test result as the line's last package, then earliest expiration date, earliest packaged date, smallest quantity. One line can span several packages.