Skip to main content

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 reserved ESSANDBOX* 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 taxIdResulting statuserrorReason
(any other value)acceptednull
ESSANDBOXERR0001rejectedINVALID_RECIPIENT_FISCAL_ID
ESSANDBOXERR0002rejectedDUPLICATE_INVOICE_NUMBER
ESSANDBOXERR0003rejectedSCHEMA_VALIDATION_FAILED
ESSANDBOXERR0004rejectedUNAUTHORIZED_RECIPIENT
ESSANDBOXINC0001failedPROCESSING_INCIDENT
ESSANDBOXACC0001accepted_with_errorsFINGERPRINT_MISMATCH
ESSANDBOXTEC0001errorGATEWAY_TIMEOUT
ESSANDBOXENV0001errorSUBMISSION_REJECTED

See Invoice lifecycle for what each status means.