beel_activate_company
Activates a company in TEST or PROD mode, registering its NIF with AEAT in PROD and handling billing via checkout when no card is on file. Idempotent and cancels pending switch-offs.
Instructions
Switches an existing company on in the mode carried in the body. The mode is always explicit and never taken from the credential's environment, so a Test key can switch a NIF on in Live.
Modes and billing
TEST: immediate and free.PROD: immediate when the account already has a card on file or an enterprise contract, and the NIF is added to the existing subscription. With no card on file it answers402 CHECKOUT_REQUIRED, returning acheckout_urlwhensuccess_urlandcancel_urlare supplied. It also requires being the billing subject of the account (403 NOT_BILLING_OWNERotherwise).
Idempotency and pending switch-offs
Repeating the call: opens no second checkout and adds no second subscription item; it returns the existing activation with
already_active: true. The sameIdempotency-Keysent to this route and to the nested one it replaces is the same operation, so it is replayed and never charged twice.A pending switch-off is cancelled: while it is pending the NIF is still on — it just carries an effective date — so switching it on again only removes that date, answers
scheduled_deactivation_cancelled: true, and charges or credits nothing.
Endpoint: POST /v1/companies/{company_id}/activations
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| company_id | Yes | Unique identifier (UUID) of the company being switched 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. |