API v1.3.0 — contract fixes: flexible idempotency keys, optional country, HTTPS-only webhooks
Contract-correctness wave from an API test pass. Idempotency keys no longer have to be UUIDs, address country becomes optional, webhook endpoints must be HTTPS, and several error responses are now more accurate (correct codes, correct status, and a previously-opaque 500 turned into an actionable 422).
Contract-correctness wave from an API test pass. Idempotency keys no longer have to be UUIDs, address country becomes optional, webhook endpoints must be HTTPS, and several error responses are now more accurate (correct codes, correct status, and a previously-opaque 500 turned into an actionable 422).
What breaks
- Webhook endpoints must be HTTPS —
POST /v1/webhooks(and updates) now rejecthttp://URLs with 422WEBHOOK_URL_MUST_BE_HTTPS. Signed fiscal payloads are never delivered in cleartext. Re-register any non-HTTPS endpoint over HTTPS. - Customers can't carry both
nifandalternative_id— sending both onPOST /v1/customersnow returns 422ALTERNATIVE_ID_AND_NIF_EXCLUSIVE. Previously the alternative_id was silently dropped and only the NIF kept. Send exactly one identifier. POST /v1/companiesstatus changed 404 → 403 — clients branching on 404COMPANY_NOT_FOUNDfor the multi-NIF-unavailable case must switch to 403MULTI_NIF_NOT_ENABLED.
What else changed
Idempotency-Keyaccepts any unique string — not just a UUID. Any client-generated key matching^[a-zA-Z0-9_-]{1,255}$works (e.g.invoice-order-12345). UUIDs still work but are no longer required. Previously a non-UUID key was rejected with 422.address.countryis now optional —country_code(ISO 3166-1 alpha-2) is the canonical field. If you omitcountryit defaults to the country name; you only need to sendcountry_code.X-Request-Idresponse header — every response now carriesX-Request-Id, matchingmeta.request_idin the body, so you can correlate logs without parsing the payload.POST /v1/companiesreturns a clear 403 — when multi-NIF isn't available on your plan it now responds 403MULTI_NIF_NOT_ENABLEDinstead of a misleading 404COMPANY_NOT_FOUNDon a creation endpoint.- Series with an unknown format variable now fails cleanly —
POST /v1/configuration/serieswith an unrecognized{VARIABLE}returns 422SERIES_FORMAT_UNRECOGNIZED_VARSwith the standard error envelope, instead of an opaque empty 500. - Consistent error code for alternative IDs — the wire error code is now
ALTERNATIVE_ID_INVALID(matching the published catalog), not an internal Spanish variant.
Endpoints
- POST/v1/companiesReturns 403 MULTI_NIF_NOT_ENABLED (was 404) when multi-NIF is not available on the plan
Where to go next
Node.js / TypeScript SDK now available
The official BeeL. SDK for Node.js and TypeScript is now published on npm as @beel_es/sdk. It is fully typed from the OpenAPI spec, with automatic retries, idempotency keys, typed errors, and webhook signature verification built in.
Renamed the active-company header
The request header that selects which company a request operates on has been renamed from `X-Active-Profile` to `Beel-Active-Company`.