beel_patch_by_id
Update editable company fields (NIF, address, banking, invoice customization) via PATCH, enforcing fiscal identity immutability and Live/Test write restrictions.
Instructions
Updates the editable fields of a company (NIF); the set is the one
UpdateCompanyRequest declares. nif, entity_type and legal_form are immutable
once set, and changing legal_name requires the NIF to pass an AEAT census
re-validation — which for a company checks the CIF only, so it cannot fail because of
the name sent.
Once the company is activated in Live, a test credential may only write the fields that
affect how the invoice looks: logo_url, invoice_accent_color,
invoice_template_type, invoice_language, email_language and additional_info.
Any other field describes the real business — fiscal address, legal representative, bank
details, contact data, IAE, activity start date, payment term — and answers
422 FISCAL_IDENTITY_LIVE_ONLY from Test, since the company is a single record shared
by both modes. A company not activated in Live accepts the whole body from Test, and
sending a field its current value is never a change.
The 200 returns CompanyData, which carries the identity of the NIF and not the rest
of the request body. The rendering fields are read back from
GET /v1/companies/{company_id}/invoice-customization; the remaining ones are
write-only. The invoice series are read from GET /v1/companies/{company_id}/series.
Endpoint: PATCH /v1/companies/{company_id}
⚠️ Fiscal guardrails — read before calling:
Which company an operation acts on, and how that is selected. (resource: beel://guardrails/multi-nif)
For the exhaustive rules and worked examples, call beel_docs_search.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| company_id | Yes | NIF (company) the operation acts 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. |