Errors

Errors are application/problem+json (RFC 9457) with a machine-readable code in code.

HTTP/1.1 422 Unprocessable Entity
Content-Type: application/problem+json

{
  "type": "https://api.abfaktura.cz/docs/chyby#DocumentLimitReached",
  "title": "The request was refused",
  "status": 422,
  "code": "DocumentLimitReached"
}

Act on the code and the HTTP status, not on title and detail, which may change. Validation errors (400) list the fields and their errors in errors:

{
  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
  "title": "One or more validation errors occurred.",
  "status": 400,
  "errors": { "Lines": ["The field Lines must be a string or array type with a minimum length of '1'."] }
}

Codes

CodeStatusMeaning
Unauthorized401The API key or token is missing or not valid (revoked, expired).
ApiKeyScope403The key or token lacks a permission; detail names it.
Forbidden403The user of the key may not do this.
PlanRequired402The API is part of the paid plans only.
NotFound404The record does not exist or belongs to another company.
ValidationFailed400The request is malformed; errors lists the fields and reasons.
TooManyRequests429Too many requests; wait as Retry-After says.
IdempotencyKeyReused422The same Idempotency-Key was used for another request.
Conflict409A request with the same Idempotency-Key is still running, or the data conflict.
PartnerRequired422The customer (customer) or supplier (supplier), or a contactId, is missing.
DocumentLimitReached422The document limit of the plan is used up.
DocumentNumberAlreadyUsed422Another document has this number.
NumberSeriesNotFound422The number series does not exist.
CorrectionReasonRequired422A credit note needs the reason of the correction.
CorrectedInvoiceNotFound422The corrected invoice does not exist.
ProformaNotFound422The proforma does not exist.
ProformaAlreadySettled422Another invoice already settles the proforma.
QuoteNotFound422The quote does not exist.
AdvanceNotVatPayer422Only a VAT payer issues a tax document on a payment.
AdvanceNothingToCover422The proforma has no paid amount without a tax document.
WebhookUrlInvalid422The webhook address is not a public https address.
WebhookEventsInvalid422Unknown webhook event.
WebhookTooMany422The company already has 10 webhooks.
Unexpected500An error on our side. Try again; if it persists, write to the support.