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
| Status | Meaning |
|---|---|
200 | Existing resource returned or updated. |
201 | Resource accepted or created. |
400 | Business operation failed, or the request carries routing headers that are not accepted. |
401 | Authentication failed. |
403 | Authenticated 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). |
404 | Resource or supported endpoint not found. |
409 | Conflict 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). |
422 | Payload validation failed. |
423 | The account or connection does not accept the operation yet. See below. |
428 | Binding headers missing on a store module key. API connections never receive it. |
429 | Rate limit exceeded. See Rate Limits. |
500 | Unexpected server error. |
503 | Temporary 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_code | retryable | What happens | What to do |
|---|---|---|---|
billing_issuance_restricted | false | The 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_ready | true | The 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.