A company is the top-level tenant in MultiSas. Every piece of data — clients, orders, products, employees, invoices — is scoped to a company document and isolated from all other tenants. Before any module can be used, a company must be registered in the system, a subscription plan must be assigned, and at least one user account must be activated. This page walks through each step of that setup process.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/MultiSas/llms.txt
Use this file to discover all available pages before exploring further.
Company Fields
Stored in thecompany collection. The following fields define a company’s identity, access level, and billing configuration:
| Field | Type | Notes |
|---|---|---|
name_company | String | The business’s registered name |
name_founder | String | Name of the person who founded or owns the business |
nit_company | String | Tax identification number (NIT/RUT) |
type_company | String | Business type — determines which modules and counters are provisioned (see below) |
role_user | String (enum) | Defaults to "Sin rol". Must be set to "Admin" or "Super Admin" before the account can operate |
available_plans | String (enum) | Subscription plan: "Plan Basico", "Plan Profesional", "Plan Premium", "Plan Personalizado", or "Sin Plan" |
type_available_plans | String (enum) | Billing frequency: "Mensual", "Anual", "Permanente", or "Vacio" |
months_quantity | Number | Number of months purchased (used to compute expired_available_plans) |
day_available_plans | String | Date and time the current plan was activated |
expired_available_plans | String | Calculated expiration date of the current plan |
active_account | Array | Activation history objects: { name: String, value: String } |
counters | Map<String, Number> | Auto-incremented bill numbering counters, one per document type. Keys depend on type_company |
active_account states:
| Name | Value | Meaning |
|---|---|---|
"Pendiente" | "1" | Payment submitted, awaiting confirmation |
"Activo" | "2" | Payment confirmed, account is live |
"Inactivo" | "3" | Plan expired or payment lapsed |
Company Type Configuration
Thetype_company field controls which functional modules are enabled and which bill counters are initialised when the company is first registered. This mapping is defined in src/core/middleware/lib/companyConfig.js.
Setting the wrong
type_company at registration time means the company will have the wrong set of counters and modules. Choose carefully — changing it later requires manual counter migration.farmacia — Pharmacy
restaurante — Restaurant
comercial — Commercial / Retail
produccion — Production
Sublimation businesses (
sublimacion) are not listed in companyConfig.js because their counters (bill_counter, bill_counter_production, bill_counter_credit, bill_counter_debit) are provisioned separately through the sublimation registration flow. All four type_company values above map directly to the keys in companyConfig.Registration & Activation Flow
Register the Company (Super Admin)
A Super Admin calls the company registration endpoint with the business details:The system creates the company document with
role_user: "Sin rol" and available_plans: "Sin Plan".Assign a Subscription Plan (Super Admin)
The Super Admin assigns a plan and billing period to activate the account:This also updates
active_account to { name: "Activo", value: "2" }.Company Admin Logs In
The company admin authenticates to receive a JWT token, which must be included in all subsequent requests as a Bearer token:
Available Plans Summary
| Plan | Key Features |
|---|---|
| Plan Basico | Electronic invoicing, client/product/supplier management, basic document storage, 1 user, 1 company |
| Plan Profesional | Everything in Basico + credit/debit notes, basic inventory, sales reports, multi-user, read API |
| Plan Premium | Everything in Profesional + advanced inventory, accounts receivable, multi-company, full API, custom PDF templates, advanced roles |
| Plan Personalizado | Custom feature set agreed with the client |