Every document, PDF header, and outbound email in Eme2App originates from the data stored in Configuración → Empresa. This single record holds your legal identity (NIF, razón social, nombre comercial), contact details, SMTP credentials for sending invoices by email, the AEAT digital certificate used for electronic operations, and auxiliary tables such as accounting counters and free-form company parameters. All write operations on this record require theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/eme2dev/Eme2App/llms.txt
Use this file to discover all available pages before exploring further.
admin role; any authenticated user can read the current empresa profile via GET /api/empresa.
Company Profile Fields
Theempresa table stores one record per tenancy. The fields you can view and edit via GET /api/empresa and PUT /api/empresa are:
| Field | Type | Description |
|---|---|---|
nombre | string | Legal company name (razón social). Required. |
nombre_comercial | string | null | Trading name shown on documents. |
nif | string | Tax identification number (NIF/CIF). |
email | string | Corporate contact email. |
telefono | string | Contact phone number. |
direccion | string | Street address. |
codigo_postal | string | Postal code. |
localidad | string | City / town. |
provincia | string | Province. |
web | string | null | Corporate website URL. |
logo | string | null | Base64-encoded logo image. |
usa_series | boolean | When true, invoice series are enabled on all documents. |
pagesize_default | integer | Default rows-per-page in lists (default 25). |
digitos_plan_contable | integer | Digits used for the accounting plan (default 8). |
The API response never includes
smtp_pass. The password is stored server-side and merged automatically when building email connections.Create or Update Company Profile
BothPOST /api/empresa (initial creation, returns HTTP 201) and PUT /api/empresa (update, returns HTTP 200) accept the same request body and require the admin role. In practice most tenants use PUT /api/empresa for all subsequent edits after the empresa record is seeded at setup time.
Logo Upload
The logo is stored as a Base64 data URI and rendered in PDF headers and the application navbar. Upload or replace it independently of the main profile form.SMTP Configuration
Eme2App can send invoices, quotes, and password-reset emails directly from your company’s email account. Configure the provider in the samePUT /api/empresa call by adding the SMTP fields.
Gmail
Gmail
Enable App Passwords in your Google account (requires 2-step verification).
Outlook / Microsoft 365
Outlook / Microsoft 365
Use port 587 with STARTTLS (
smtp_secure: false) or port 465 with SSL (smtp_secure: true).Brevo (ex-Sendinblue)
Brevo (ex-Sendinblue)
Use the SMTP credentials found in Brevo → Transactional → SMTP & API.
Custom SMTP server
Custom SMTP server
Set
smtp_provider to "custom" and fill in the host and port of your mail server.Testing SMTP
Verify that the credentials work before saving, or after any change, by sending a test message:AEAT Digital Certificate
Upload your company’s.pfx or .p12 digital certificate so Eme2App can sign electronic communications with the AEAT (Agencia Estatal de Administración Tributaria). The file is converted to PEM format server-side and stored encrypted; the private key is never returned to the client.
Upload Certificate
View Certificate Info
datos field is null.
Delete Certificate
Accounting Counters
Counters track sequential numeric values used for generating accounting plan codes. Each counter is identified by acampo (field name) and stores an integer valor.
Recalculate Accounting Codes
When you change the number of digits in your accounting plan, trigger a bulk recalculation for all clients and suppliers:digitos value must be an integer between 6 and 12. The response contains one row per entity with the previous and new accounting code, and an error field for any records that could not be recalculated.
Company Parameters
Free-form key/value pairs let you store custom configuration values scoped to the active empresa—for example, default text blocks, custom codes, or integration tokens.| Field | Description |
|---|---|
parametro | Parameter name (key). Required, must be non-empty. |
descripcion | Optional human-readable description. |
valor | String value. |
Fiscal Advisory (Asesoría)
Store the contact details of the company’s tax advisor so that automated accounting summaries and reports can be sent directly to them.GET /api/empresa/aplicaciones-asesoria returns the list of accounting-software application names available for the advisory integration selector (e.g., A3, ContaPlus, Sage). It requires authentication but not an active empresa_id.
Example payload for PUT /api/empresa/asesoria:
Countries Catalog
A global read-only catalog of countries is available for assigning a country to clients and suppliers:id, codigo (ISO 3166-1 alpha-2), nombre, and territorio_fiscal_codigo used to pre-fill the fiscal territory when creating new clients from foreign countries.