Skip to content

Errors and limits

What EenFactuurMaken.nl REST API errors look like, all error codes per HTTP status, rate limits, plan limits and how to retry.

The error shape

Every error has the same shape:

json
{
  "statusCode": 409,
  "statusMessage": "This invoice has been issued and can no longer be changed. Create a credit note to correct it.",
  "data": {
    "code": "invoice_locked",
    "message": "This invoice has been issued and can no longer be changed. Create a credit note to correct it.",
    "details": { "status": "issued" }
  }
}
  • data.code is a stable snake_case code. Use that in your code; the messages may change.
  • data.details sometimes adds more information, like the fields for validation_failed or the check results for invoice_not_compliant.

Validation errors

With 422 validation_failed, details lists the field (path) and what's wrong for each problem:

json
{
  "data": {
    "code": "validation_failed",
    "details": [
      { "path": ["lines", 0, "unitPriceCents"], "message": "Invalid input: expected number, received string" }
    ]
  }
}

Invoice not compliant

With 422 invoice_not_compliant (when issuing), details is a list of check results, each with level (error, warning, info), field and code. All codes and how to fix them are in Invoice checks.

Error codes

StatusCodes
401unauthenticated, invalid_api_key, invalid_token
402plan_limit_reached (monthly invoice limit, or 25 customers or products on Free), plan_upgrade_required (the feature is part of Pro, such as webhooks; details.feature says which)
403api_key_permission_denied, bad_origin, email_recipient_not_allowed, email_sending_paused, forbidden, insufficient_scope, session_not_fresh, session_required
404not_found, link_invalid
409external_id_taken, idempotency_key_in_progress, invoice_locked, invoice_not_issued, invoice_cancelled, invoice_not_cancellable, invoice_has_credit_notes, invoice_not_creditable, invoice_fully_credited, credit_note_draft_exists, invoice_already_paid, invoice_not_paid, invoice_not_remindable, reminder_too_early, reminder_in_progress, number_taken, peppol_kvk_required, layout_limit_reached, layout_read_only, recurring_inactive, recurring_run_in_progress, email_domain_exists, email_domain_taken, email_domain_provider_conflict, already_subscribed, no_active_subscription, not_cancelled, subscription_ended, webhook_endpoint_limit, webhook_delivery_not_retryable
410link_expired, public_link_expired
413logo_too_large (logo larger than 500 KB)
415logo_unsupported_type (PNG and JPEG only)
422validation_failed, invoice_not_compliant, unknown_customer, idempotency_key_invalid, idempotency_key_mismatch, webhook_url_invalid, webhook_url_blocked, no_recipient, too_many_recipients, unknown_layout, recurring_template_invalid, email_domain_invalid, email_domain_public, exchange_rate_unknown_currency
429rate_limited, email_daily_limit, email_rate_limited, invoice_resend_limit, email_platform_limit
500idempotency_replay_unavailable
502email_send_failed
503billing_unavailable, exchange_rate_unavailable, email_domain_capacity

The most common ones:

CodeWhat to do
invoice_lockedThe invoice is finalised. Create a credit note.
invoice_not_compliantFix the items with level: "error" and try again.
number_takenThe number you passed to issue already exists. Leave it out to get the next number.
external_id_takenAn invoice or customer with this externalId already exists. details.resource and details.id say which; use that one. See Integrate with your SaaS.
unknown_customerThere's no customer with the customerExternalId you sent. Create the customer first.
api_key_permission_deniedYour key's access is too low. details.required says what's needed. See Access levels.
plan_limit_reachedWait until next month, delete an unused draft or upgrade to Pro. details.limit tells you which limit.
email_recipient_not_allowedOn Free you can only email the customer's address or your own.
peppol_kvk_requiredWithout a KvK number there's no UBL. See PDF and e-invoice.

Idempotency-Key

CodeWhat to do
422 idempotency_key_invalidThe key must be 1 to 255 characters, without spaces. Use a UUID.
422 idempotency_key_mismatchYou already used the key for a different request. Create a new key per action.
409 idempotency_key_in_progressThe first request with this key is still running. Wait Retry-After seconds and try again with the same key.
500 idempotency_replay_unavailableThe earlier request succeeded, but the stored response can't be read any more. Look the result up with a GET.

See Idempotent requests.

Webhooks

CodeWhat to do
422 webhook_url_invalidThe URL isn't valid: https on port 443 only, without user name, password or #.
422 webhook_url_blockedThe host is an IP address or internal name, points to a private address or doesn't exist. See Which URLs are allowed?
409 webhook_endpoint_limitYou already have 5 endpoints. Delete one.
409 webhook_delivery_not_retryableOnly failed or skipped messages can be sent again, not test events.

Rate limits

LimitValue
Per API key120 requests a minute (429 rate_limited with Retry-After)
Per IP address300 requests a minute
VIES check (/vat-check)20 a minute
EmailSee Sending by email
Request size2 MB

Retrying

  • Send an Idempotency-Key with every POST. Then after a network error, a timeout or a 502/503 you simply send the same request with the same key again: if the first request did succeed, you get its response back (Idempotent-Replayed: true) and nothing happens twice.
  • 429: wait the number of seconds in Retry-After (or a minute) and try again.
  • 409 idempotency_key_in_progress: wait Retry-After (1 second) and try again with the same key.
  • 502 and 503: temporary. Retry with an increasing delay (for example 2, 4 and 8 seconds).
  • Other 4xx: don't retry without changing something. Errors aren't stored, so after your change you may use the same key again.
  • Give invoices and customers an externalId. Then even a retry without a key never creates a second invoice: you get 409 external_id_taken with the id of the existing one.
  • Not sure whether /send or /remind worked? Check sentAt or lastReminderAt on the invoice, or GET /emails, first.

Last updated on 29 October 2026

Stuck?

Email us at support@eenfactuurmaken.nl. Tell us what you tried and what happened, and we will help you out.

support@eenfactuurmaken.nl