beel_activate_compliance_system
Activates or schedules a company's VeriFactu, SII, or TicketBAI compliance status from a chosen date with system-specific settings, handling incompatible systems and date rules.
Instructions
Activates system for this company from effective_from on, in the environment of the
request, with the settings of that system. It is a fact of the taxpayer: it applies to
every invoice issued from that date, never to a single one.
Today or later:
effective_fromtoday applies the system from now on; a later date schedules it. A date in the past answers422 COMPLIANCE_EFFECTIVE_DATE_IN_PAST.Changing the settings: activating a system that already applies, with other
settings, ends its current period oneffective_fromand starts a new one. A later date replaces an activation of the same system that is still scheduled.Same body, no change: a body equal to the activation in force or to the scheduled one answers
200and changes nothing.Systems that exclude each other: VeriFactu, the SII and TicketBAI never apply on the same day. Activating one ends the one that applies on
effective_from, in the same call, and the response shows how the company is left. When that is not possible, the request answers422 COMPLIANCE_SYSTEMS_INCOMPATIBLEand nothing changes.VeriFactu: activating
VERIFACTUbehaves like turning VeriFactu on withPUT /v1/companies/{company_id}/verifactu-configuration, with the same errors. That resource stays available and reports the same state. VeriFactu has nosettings. In Live, the signed and validated AEAT representation is required and the NIF is registered for VeriFactu submission at the time of the call, also wheneffective_fromis a later date.SII:
settings.periodicityandsettings.reasonare required, andacknowledge_responsibilitymust betrue. Activating it registers the NIF of the company for SII submission, so it needs a NIF, as VeriFactu does. The option for the SII must be in force in the AEAT tax census byeffective_from: otherwise the AEAT rejects the submissions.SII in Live: the account needs the SII contracted, and every change of the SII takes effect tomorrow at the earliest: entering it, leaving it (also by activating
VERIFACTUwhile the SII applies) and changingsettings.reasonorsettings.periodicity. Withoutsii_exit, leaving the SII never takes effect on a past date. The company enters the SII on 1 January, unless it declares withsettings.already_in_siithat it is already in the SII: then it can enter on any date. Once in the SII, it can only be left from 1 January whensettings.reasonisVOLUNTARYorMANDATORY_LARGE_COMPANY, from the first day of a month when it isREDEME, and on any date when it isVAT_GROUP. Changingsettings.periodicityof the SII in force takes effect on 1 January, so it is scheduled before that day. Moving fromVOLUNTARYto anotherreasonkeeps the company in the SII and is accepted on any date from tomorrow. Any other change ofsettings.reasonends the period in force, so it follows the rule for leaving under thereasonof that period.SII in Sandbox: no contract is needed, and the company can enter and leave the SII and change its settings on any date from today.
TicketBAI: available in Sandbox only; in Live it answers
422 COMPLIANCE_SYSTEM_NOT_AVAILABLE.settings.territoryis required, and it has to be the provincial tax authority of the fiscal address of the company, determined from its postal code: Álava (01), Bizkaia (48) or Gipuzkoa (20). Otherwise the request answers422 TICKETBAI_TERRITORY_MISMATCH, also when the company has no postal code or its fiscal address is outside Spain. What decides is whether the foral rules of that territory govern the company's personal income tax (IRPF), corporate income tax (IS) or, for a permanent establishment, non-resident income tax (IRNR), and that can hold with a fiscal address registered elsewhere: for example, a self-employed person whose habitual residence is in the Basque Country, or a company domiciled elsewhere in Spain whose volume of operations exceeded 12 million euros the previous year, 75% or more of it in the Basque Country. Then sendsettings.territory_confirmedastrue, and the fiscal address is not checked. In Bizkaia,settings.lroe_modelis required, and so issettings.activity_codewith the model"140".acknowledge_responsibilityis ignored.
With VERIFACTU, sii_exit permits a past date after a REDEME exclusion or VAT group
cessation. effective_from must be the first day of the notification month for REDEME,
or the cessation date for a VAT group. The company confirms that no other cause of
monthly VAT returns remains. Valid evidence is required in Live and Sandbox.
BeeL keeps existing SII obligations and their evidence, without retrospective VeriFactu
registrations or changes to original PDFs. Pending submissions continue; rejected ones
remain available for individual correction and are excluded from the company retry batch
outside the legal SII period. New invoices use their own fiscal date. Exchanging an
original SII simplified invoice remains limited by SIMPLIFIED_EXCHANGE_NOT_RECORDABLE.
As a conservative product safeguard, BeeL rejects an exit spanning any issued invoice
at or after the applicable mandatory invoicing-system deadline.
Order of the rules
The rules are checked in this order, and the first one that fails answers; nothing is changed:
The request:
VALIDATION_ERROR,IDEMPOTENCY_KEY_REQUIRED.Access to the company:
403.Evidence destination, confirmation and dates:
VALIDATION_ERROR,SII_EXIT_CONFIRMATION_REQUIRED,SII_EXIT_DATE_MISMATCH; then an equal activation answers200without rewriting evidence.The system in the environment:
COMPLIANCE_SYSTEM_NOT_AVAILABLE; withSIIin Live,SII_NOT_CONTRACTEDand then402.The settings and the territory:
SII_ACKNOWLEDGEMENT_REQUIRED,SII_QUARTERLY_REQUIRES_VOLUNTARY,SII_TERRITORY_NOT_SUPPORTED,TICKETBAI_TERRITORY_MISMATCH.The dates:
COMPLIANCE_EFFECTIVE_DATE_IN_PAST,SII_CHANGE_ONLY_FROM_TOMORROW,SII_ENTRY_ONLY_FROM_JANUARY_FIRST,SII_EXIT_ONLY_FROM_JANUARY_FIRST,SII_EXIT_ONLY_FROM_MONTH_START,SII_PERIODICITY_CHANGE_ONLY_FROM_JANUARY_FIRST,COMPLIANCE_SYSTEMS_INCOMPATIBLE.With
sii_exit, compatible history and issued invoices:SII_EXIT_CAUSE_MISMATCH,SII_EXIT_SPANS_VERIFACTU_DEADLINE. WithVERIFACTUin Live:VERIFACTU_REPRESENTATION_REQUIRED.The registration of the NIF:
COMPANY_NIF_MISSING,API_COMMUNICATION_ERROR.
PUT /v1/companies/{company_id}/verifactu-configuration with enabled: true is this
operation with VERIFACTU and effective_from today, in the same order.
The response carries the same body as GET /v1/companies/{company_id}/compliance.
BeeL API endpoint: POST /v1/companies/{company_id}/compliance/systems/{system}/activate (reference: https://docs.beel.es)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"company_id": "<company_id>",
"system": "<system>",
"body": "<body>"
},
"name": "beel_activate_compliance_system"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| system | Yes | The compliance system the operation acts on. A value that is not listed answers `400 VALIDATION_ERROR`. | |
| company_id | Yes | Unique identifier (UUID) of the company the operation acts on — its identifier, not its NIF. It is the only source of context: the account that owns it is derived from it, and the `BeeL-Active-Company` header plays no part. A company you do not reach answers `403`, and so does a company that does not exist, so the existence of a company in another account is never disclosed. | |
| idempotency_key | No | Optional idempotency key for this operation. Omit it and one is derived from the request itself, which makes a blind retry safe but also collapses a SECOND, deliberately identical operation into the first for 24 hours. Set it — to an order id, or anything unique per intended operation — whenever you mean to create something that may look identical to what you just created. |