Skip to content

Errors ​

Responses use a JSON envelope.

json
{
  "success": false,
  "error": "Validation Error",
  "errors": {
    "id_external": ["The id external field is required."]
  }
}

When an error has a stable cause, the response adds error_code and, for account-level errors, retryable. Decide on status and error_code; error and message are human-readable and may change.

Common Status Codes ​

StatusMeaning
200Existing resource returned or updated.
201Resource accepted or created.
400Business operation failed, or the request carries routing headers that are not accepted.
401Authentication failed.
403Authenticated key cannot access a business context, or the connection type does not accept that resource (orders_not_supported_by_connection), or the key's user is not an active owner or administrator when scheduling a direct invoice (actor_not_authorized).
404Resource or supported endpoint not found.
409Conflict with the current state: idempotency, invoicing not enabled, or AEAT readiness incomplete for direct invoices, or binding headers that do not match the connection (see Authentication).
422Payload validation failed.
423The account or connection does not accept the operation yet. See below.
428Binding headers missing on a store module key. API connections never receive it.
429Rate limit exceeded. See Rate Limits.
500Unexpected server error.
503Temporary service protection response. Respect Retry-After when present.

Treat 422 responses as business errors that require payload changes before retrying.

423: operation blocked at account level ​

A 423 does not depend on the payload: resending the same request keeps failing until the account changes. Tell the cases apart by error_code:

error_coderetryableWhat happensWhat to do
billing_issuance_restrictedfalseThe account used up its free allowance without a payment method, or has an outstanding payment. The order is stored, but no invoice is issued.Do not retry in a loop. Tell the account owner; action.url points to the page where they resolve it. Then resend the order with the same id_external.
sync_not_readytrueThe store connection has not completed its guided setup in Factulit. Commerce connections only; API connections are exempt.Pause at account level and retry later without burning per-order retries.
json
{
  "success": false,
  "error": "Billing issuance restricted",
  "error_code": "billing_issuance_restricted",
  "message": "Has alcanzado la franquicia gratuita. Anade un metodo de pago para seguir emitiendo; ...",
  "billing_status": "restricted",
  "action": { "code": "resolve_billing", "url": "https://..." },
  "retryable": false
}

The message is written in Spanish for the account owner. If Factulit cannot temporarily check the billing status, it returns 503 with error_code: billing_unavailable and retryable: true: retry with backoff.

Public API documentation for Factulit.