Onboarding Legal Entity
A Spanish taxpayer is brought into A-Cube with a single create call.
1. Create the legal entity
POST /legal-entities
Authorization: Bearer {{jwt}}
Content-Type: application/json
Accept: application/json
{
"taxId": "A58818501",
"name": "A-Cube Test Company",
"email": "test@acme.test",
"phoneNumber": "+34600000000",
"country": "ES",
"address": "Calle Mayor 1",
"city": "Madrid",
"stateOrProvince": "Madrid",
"zipCode": "28001",
"config": {
"supplierInvoiceEnabled": true,
"customerInvoiceEnabled": true
}
}
| Field | Required | Notes |
|---|---|---|
taxId | yes | Spanish NIF, NIE or CIF — exactly 9 characters, format-checked |
name | yes | registered name, up to 120 characters (NombreRazonEmisor) |
address, city, zipCode | yes | postal address of the entity |
email, phoneNumber, country, stateOrProvince | no | contact and address detail |
config | no | invoicing capabilities, see below |
{
"uuid": "01a047df-a310-75f9-8176-b9370c82a850",
"taxId": "A58818501",
"name": "A-Cube Test Company",
"email": "test@acme.test",
"phoneNumber": "+34600000000",
"country": "ES",
"address": "Calle Mayor 1",
"city": "Madrid",
"stateOrProvince": "Madrid",
"zipCode": "28001",
"status": "legal_entity.onboarding_completed",
"createdAt": "2026-08-28T10:17:13+00:00",
"updatedAt": null,
"config": {
"supplierInvoiceEnabled": true,
"customerInvoiceEnabled": true
}
}
Store the uuid: it identifies the entity in every later call.
Capabilities
config field | Effect |
|---|---|
customerInvoiceEnabled | required for the entity to issue invoices to its customers |
supplierInvoiceEnabled | stored on the entity; reserved for future use, not enforced today |
status is returned as legal_entity.onboarding_completed once the entity is usable.
2. Update or remove
- Replace:
PUT /legal-entities/{uuid} - Delete:
DELETE /legal-entities/{uuid}
Environments
For environment-specific behaviour, see sandbox and production.