beel_deactivate_by_id
Deactivate a company's NIF in a chosen environment, stopping invoice issuance and corrections. For Live, it schedules the switch-off at the end of the billing cycle.
Instructions
Switches the company (NIF) off in the mode given by environment; the other mode is untouched. The activation is sealed rather than deleted, so its history survives; after the switch-off takes effect the NIF can neither issue nor correct invoices in that mode until it is switched on again, and in Live that sealing is what releases the NIF for another account.
In Live the switch-off is scheduled, not immediate: the cycle is paid up front, so the response carries an effective_at and the NIF keeps invoicing until then. Nothing is refunded. effective_at is the end of the current billing cycle, unless the NIF was switched on within that same cycle, in which case it is the end of the next one. TEST, and PROD under an enterprise contract, are immediate and answer with no effective_at.
Repeating the call on a mode whose switch-off is already pending returns the same date with already_scheduled: true, and switching off a mode that was never on is a silent no-op. Switching off in Live requires being the billing subject of the account.
Endpoint: DELETE /v1/companies/{company_id}/activations
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| company_id | Yes | NIF (company) being switched on. 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 NIF you do not reach answers `403`, and so does a NIF that does not exist, so the existence of a NIF in another account is never disclosed. | |
| environment | Yes | Mode to switch the NIF off in. |