beel_patch_company
Update editable company fields: address, contact, bank details, legal representative, and invoice customization, while preserving immutable fiscal data. Returns confirmed stored company information.
Instructions
Updates the editable fields of a company; the set is the one
UpdateCompanyRequest declares.
Immutable fields:
nif,entity_typeandlegal_form, once set.legal_name: changing it 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.
Test credentials on a Live company
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.
What comes back
The 200 returns CompanyData with every field this request accepts, under the same
name and the same type — so the response is the confirmation of what was stored, and a
later GET says the same. A field you never set comes back absent, which means "nothing
stored", not "hidden".
Two things live outside this body and keep their own reads: the invoice series
(GET /v1/companies/{company_id}/series) and the rendering block, which is also served
on its own by GET /v1/companies/{company_id}/invoice-customization.
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 | 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. |