Delete several products
Scopeproducts:writeDeletes up to 100 products of the catalog, listed in product_ids.
- Partial operation: the response reports which products were deleted
(
deleted_products) and which failed (errors, one entry per product with itsproduct_id), with the counts insummary. That is why it answers200with a body instead of204. - Deprecated: use
DELETE /v1/companies/{company_id}/products/bulk, which deletes the same way but takes the IDs in theidsquery parameter instead of in the request body: aDELETEbody has no defined semantics and intermediaries may drop it.
Keys are prefixed beel_sk_, and each one carries the scopes it was created with: a key
short of the scope an operation needs is answered 403. The scope an operation requires
is shown next to its title, and the full catalogue lives in the Scopes reference.
Keys are created from the BeeL dashboard. They are secret credentials: do not share them or commit them to source control.
In: header
1 <= items <= 100Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://app.beel.es/api/v1/products/bulk" \ -H "Content-Type: application/json" \ -d '{ "product_ids": [ "497f6eca-6276-4993-bfeb-53cbbbba6f08" ] }'{
"success": true,
"data": {
"deleted_products": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"errors": [
{
"product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
"error": "string"
}
],
"summary": {
"total_processed": 0,
"successful": 0,
"failed": 0
}
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required to access this resource"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "You do not have permission to access this resource"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The provided data is not valid",
"details": {
"field": "specific error message"
}
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
},
"type": "https://docs.beel.es/errors/INVOICE_NO_LINES",
"title": "INVOICE_NO_LINES",
"detail": "La factura debe tener al menos una línea",
"instance": "/v1/invoices/abc-123"
}{
"success": false,
"error": {
"code": "UNPROCESSABLE_ENTITY",
"message": "Data cannot be processed",
"details": {
"field": "Specific error description"
}
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"success": false,
"error": {
"code": "UNSUPPORTED_MEDIA_TYPE",
"message": "Unsupported media type: text/plain. Supported: application/json"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}Create several products POST
Creates up to 100 products in one call. - **Partial operation:** each product is processed and reported independently, so a row the domain rejects — a rate the law does not allow, a duplicate code — comes back inside the report while the rest are created. - **Status code:** always `201` when the batch was processed, even if not a single product could be created. A malformed request — a missing field, an empty array, more than 100 items — answers `422` instead and nothing is processed. - **Deprecated:** use `POST /v1/companies/{company_id}/products/bulk`, which behaves identically.
Ensure a default series per document type PUT
Ensures the company (NIF) has a default invoice series for `STANDARD`, `SIMPLIFIED` and `CORRECTIVE` in the current environment, and returns the resulting set. The request takes no body: the desired end state is one default per document type, so repeating it changes nothing. - **Already there:** a document type that already has a default keeps it, and it is returned unchanged. - **Missing:** it is created with code `F`, `S` or `R` and format `{CODIGO}-{YYYY}-{NUM:4}`, active and marked as default. - **Code taken:** if that code already belongs to another series, the document type is omitted from the response and is left with no default.