beel_create_customers_bulk
Create up to 500 customer records in one atomic call, with optional dry-run validation against AEAT registers, duplicate checks, and field-format verification before anything is saved.
Instructions
Creates up to 500 customers of this company in a single call.
Atomic: if any customer fails validation the whole batch is rejected with
422BULK_VALIDATION_ERRORand nothing is persisted. This is not a partial operation.dry_run: withdry_run=truethe batch is only validated — tax identifiers against the AEAT register, duplicates inside the batch and against the existing customers, field formats — nothing is written and the answer is200. Withdry_run=false, the default, validation is followed by creation and the answer is201.Report: both modes return the same per-record report, so a dry run and a real run are read the same way.
Endpoint: POST /v1/companies/{company_id}/customers/bulk
⚠️ Fiscal guardrails — read before calling:
Why a name that does not match the census makes an invoice unsubmittable. (resource: beel://guardrails/nif-validation)
For the exhaustive rules and worked examples, call beel_docs_search.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| dry_run | No | Validate the batch without persisting it (`true`), or validate and create it (`false`, the default). Either way the batch is atomic. | |
| 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. | |
| 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. |