Sandbox
note
The sandbox validates that your API flow works against simulated services. It does not prove that a Legal Entity is registered or active in production, and no data is sent to AEAT.
Use the sandbox to develop and test your Spanish integration without issuing real fiscal documents.
- API URL:
https://es-sandbox.api.acubeapi.com - Data: use test companies and test documents only.
- Registering a new Legal Entity: the entity is created directly with
POST /legal-entities. The tax ID (NIF, NIE or CIF) format is validated, but no external portal handoff is required. - Tax reporting to AEAT: billing records are not sent to AEAT. The AEAT response is simulated.
- Send outcomes: the simulated AEAT response is derived from the recipient tax
id of the invoice, in the same spirit as test card numbers. Any ordinary recipient
resolves to
accepted; the reservedESSANDBOX*values below force a specific outcome so you can build and test your error handling.
Reserved recipient tax ids
Send an invoice (or a draft, then
POST /invoices/draft/{uuid}/send)
whose recipient tax id is one of the following to obtain that exact outcome. Read the
result back with GET /invoices/{uuid}.
Recipient taxId | Resulting status | errorReason |
|---|---|---|
| (any other value) | accepted | null |
ESSANDBOXERR0001 | rejected | INVALID_RECIPIENT_FISCAL_ID |
ESSANDBOXERR0002 | rejected | DUPLICATE_INVOICE_NUMBER |
ESSANDBOXERR0003 | rejected | SCHEMA_VALIDATION_FAILED |
ESSANDBOXERR0004 | rejected | UNAUTHORIZED_RECIPIENT |
ESSANDBOXINC0001 | failed | PROCESSING_INCIDENT |
ESSANDBOXACC0001 | accepted_with_errors | FINGERPRINT_MISMATCH |
ESSANDBOXTEC0001 | error | GATEWAY_TIMEOUT |
ESSANDBOXENV0001 | error | SUBMISSION_REJECTED |
See Invoice lifecycle for what each status means.