Create new product/service
Creates a new product or service in the catalog
API Key authentication.
Format: Authorization: Bearer beel_sk_<key>
Scopes: API Keys use the same scopes as OAuth2 tokens. Each key is created with
specific scopes that limit which endpoints it can access. The required scope for each
endpoint is documented in the operation's security section under OAuth2.
Obtaining Keys: API Keys are managed from the BeeL dashboard
Security: API Keys are secret credentials. Do not share them or store them in source code
In: header
Header Parameters
Idempotency key to prevent duplicates in sensitive operations.
- Any unique client-generated string (e.g. an order id). A UUID also works but is not required
- Allowed characters: letters, digits,
_and-(max 255 chars) - If the same key is sent twice, the result of the first operation is returned
- Keys expire after processing
^[a-zA-Z0-9_-]+$length <= 255Unique alphanumeric product code (optional)
^[a-zA-Z0-9_-]*$length <= 50Product/service name
length <= 255Detailed description (optional)
Product/service category:
- PRODUCT - Physical, tangible products
- SERVICE - General services
- CONSULTING - Consulting and advisory services
- SOFTWARE - Development, licenses, SaaS
- TRAINING - Courses, workshops, training
- OTHER - Other unclassified types
"PRODUCT" | "SERVICE" | "CONSULTING" | "SOFTWARE" | "TRAINING" | "OTHER"Suggested default price (optional)
0.00010 <= valueUnit of measure (optional)
length <= 50Complete tax information with cross-validations:
- IVA: only percentages 0, 4, 10, 21
- IGIC: only percentages 0, 3, 5, 7, 9.5, 15, 20
- IPSI: only percentages 0.5, 1, 2, 4, 8, 10
- OTHER: any percentage between 0 and 100
Exception: when regime_key = "17" (OSS/IOSS) the invoice applies the destination country VAT instead of the Spanish one, so any percentage in the EU range [0, 27] is accepted regardless of the tax type set.
Equivalence surcharge percentage (optional)
0.010 <= value <= 100IRPF withholding percentage (optional)
0.010 <= value <= 100Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://app.beel.es/api/v1/products" \ -H "Content-Type: application/json" \ -d '{ "name": "Technical consulting" }'{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"code": "SERV-001",
"name": "Technical consulting",
"description": "Specialized technical consulting services in web development",
"category": "CONSULTING",
"default_price": 85.5,
"unit": "hours",
"main_tax": {
"type": "IVA",
"percentage": 21,
"regime_key": "01"
},
"equivalence_surcharge": 5.2,
"irpf": 15,
"active": true,
"created_at": "2025-01-18T10:30:00Z",
"updated_at": "2025-01-18T15:45:30Z"
},
"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 required"
},
"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"
}
}