Skip to content

Errors

Every error answer is application/problem+json (RFC 9457):

{
"type": "https://flashpi.com.ec/docs/en/errors/validation_failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid. See errors for details.",
"instance": "/v1/invoices",
"code": "validation_failed",
"errors": [
{ "field": "customer.id", "code": "invalid_check_digit", "message": "The check digit of this identification number is wrong." },
{ "field": "items[0].quantity", "code": "invalid_decimal", "message": "This field must be a decimal number written as a string with a dot, with at most 6 decimals." }
],
"requestId": "01a1412b-9c03-7e55-b1a8-27f4d6e0c913"
}
Member Description
code A stable English slug, the same in every language. Branch on it, never on type or the texts.
type The page of the code (below), in the language of the answer: https://flashpi.com.ec/docs/en/errors/<code> in English, https://flashpi.com.ec/docs/errors/<code> in Spanish. It changes with the language, so do not branch on it.
title, detail A short summary of the problem and an explanation of this occurrence.
status The HTTP status, repeated.
instance The path of the request.
errors[] The field errors (empty when there are none), each with its field path, code and message.
requestId The request’s ID, also in the x-request-id header of every answer.

Some errors add members of their own, such as limit and resetsAt on daily limits, expectedTotal and computedTotal on total_mismatch, or documentId on an Idempotency-Key that already created a document.

title, detail, errors[].message and the texts in documents (sriMessages, failure) are in English by default, and in Spanish when the Accept-Language entry with the highest priority (q) is es or es- plus a region, such as es-EC. Content-Language says which language was used. The type follows the language too: it points at the English page of the code (/docs/en/errors/<code>) or at the Spanish one (/docs/errors/<code>). Codes never change with the language, so your code should branch on code and errors[].code only.

Terminal window
curl https://api.flashpi.com.ec/v1/documents/01a1412b-ae38-7c39-8c71-16d2b5dfc472 \
-H "Authorization: Bearer $FLASHPI_API_KEY" \
-H "Accept-Language: es"

The SRI’s answers are never passed through as they are: Flashpi maps them to its own codes and texts.

  • Every answer carries x-request-id, a UUIDv7 that Flashpi generates. It is the requestId of errors and appears in the console’s request logs. Include it when you contact support.
  • You may send X-Correlation-Id (1 to 128 letters, digits and - _ . : / + =) to tie a request to your own records, such as your order number. Flashpi echoes it back in the same header and logs it next to the request ID. An invalid value gets 400 invalid_correlation_id.

Every code has a page at the URL of its type, in English and in Spanish, with what to do about it, whether to retry and its texts in both languages. The list comes from Flashpi’s error catalog, so it is complete. Most codes come from the invoicing API; the console’s own codes are listed too, because its answers point at these pages as well.

Invoicing API

HTTPCodeTitle
400bad_requestBad request
400malformed_jsonMalformed JSON
400invalid_correlation_idInvalid correlation ID
400invalid_idempotency_keyInvalid idempotency key
401authentication_requiredAuthentication required
401invalid_api_keyInvalid API key
403key_scope_mismatchAPI key scope mismatch
403key_read_onlyRead-only API key
403ip_not_allowedIP address not allowed
403sandbox_not_enabledSandbox not enabled
403account_suspendedAccount suspended
404not_foundNot found
409conflictConflict
409idempotency_key_in_progressRequest in progress
409issuer_already_existsIssuer already exists
409establishment_already_existsEstablishment already exists
409emission_point_already_existsEmission point already exists
409resource_in_useResource in use
409issuer_onboarding_not_readyOnboarding not ready
409issuer_onboarding_expiredOnboarding expired
409issuer_onboarding_completedOnboarding already completed
409issuer_onboarding_rejectedCertificate rejected
409sequential_already_usedSequential already used
409sequentials_exhaustedSequentials exhausted
409document_not_authorizedDocument not authorized
409ride_not_availableRIDE not available
409email_recipient_missingNo email recipient
409email_already_queuedEmail already queued
409email_sending_pausedDocument emails paused
409test_recipient_not_allowedTest email recipient not allowed
409webhook_endpoint_disabledWebhook endpoint disabled
409webhook_endpoint_already_verifiedWebhook endpoint already verified
409webhook_endpoint_not_verifiedWebhook endpoint not verified
409webhook_delivery_in_progressWebhook delivery in progress
413payload_too_largePayload too large
415unsupported_media_typeUnsupported media type
422validation_failedValidation failed
422idempotency_key_reusedIdempotency key reused
422total_mismatchTotal mismatch
422document_schema_invalidDocument does not match the SRI schema
422document_too_largeDocument too large
429email_resend_limit_reachedResend limit reached
429account_email_limit_reachedDaily email limit reached
429platform_email_limit_reachedFlashpi's daily email limit reached
429demo_issuer_quota_exceededDemo issuer quota exceeded
500internal_errorInternal server error
503demo_issuer_unavailableDemo issuer unavailable

Console

HTTPCodeTitle
400invalid_tokenInvalid link
401invalid_credentialsInvalid credentials
403forbiddenForbidden
403email_not_verifiedEmail not verified
403email_verification_session_mismatchOpen the link where you asked for it
403csrf_check_failedRequest refused
403reauthentication_requiredConfirm your identity
403mfa_reauthentication_requiredConfirm with your authenticator
403mfa_requiredTwo-factor authentication required
403mfa_enrollment_requiredSet up two-factor authentication
403invitation_email_mismatchInvitation for another email
409email_already_verifiedEmail already verified
409password_not_setNo password set
409legal_acceptance_requiredAccept the legal documents
409mfa_not_enabledTwo-factor authentication is not enabled
409mfa_enrollment_not_startedNo setup in progress
409mfa_disable_not_allowedTwo-factor authentication is required
409last_ownerLast owner
409already_memberAlready a member
409invitation_requires_loginLog in to accept
409live_key_requirements_not_metLive access not ready
429too_many_attemptsToo many attempts
503google_sign_in_unavailableGoogle sign-in unavailable

Reserved (no endpoint returns them today)

HTTPCodeTitle
405method_not_allowedMethod not allowed
406not_acceptableNot acceptable
429rate_limitedToo many requests
503service_unavailableService unavailable

Every 429 carries a Retry-After header with the seconds to wait.

The code of each item of errors[], with the message it carries in English (in Spanish with Accept-Language: es). {name} marks a value of each occurrence, such as the number of decimals a field allows.

CodeMessage (errors[].message)
requiredThis field is required.
unknown_fieldThis field is not allowed.
invalid_typeThis field has the wrong type.
invalid_formatThis field has an invalid format.
invalid_optionThis field must be one of the allowed values.
too_shortThis field is too short.
too_longThis field is too long.
out_of_rangeThis field is out of the allowed range.
invalid_valueThis field has an invalid value.
unsupported_characterThis field contains the character {character}, which SRI documents cannot carry.
not_foundNo resource with this ID exists.
invalid_decimalThis field must be a decimal number written as a string with a dot, with at most {decimals} decimals.
invalid_identificationThis is not a valid identification number of type {idType}.
invalid_check_digitThe check digit of this identification number is wrong.
final_consumer_not_allowedA final consumer cannot be the counterparty of this document type; identify it with a RUC, cédula, passport or foreign ID.
not_in_forceThis value is not valid on {date}.
too_many_additional_fieldsA document carries at most {max} additional fields, and {legends} of them are taken by the legends Flashpi adds.
reserved_nameThis name is reserved for a legend Flashpi adds automatically.
amount_mismatchThese amounts must add up to {expected}; they add up to {actual}.
future_dateThe date cannot be later than today in Ecuador ({today}).
date_too_earlyThe date must be on or after {date}.
date_too_lateThe date must be on or before {date}.
discount_exceeds_amountThe discount is larger than quantity × unit price.
duplicateThis value can appear only once.
vat_requiredEach line needs exactly one VAT tax (use rate "0", "exempt" or "not_subject" when no VAT applies).
unsupported_taxThis document type does not accept this tax.
rate_mismatchThe percentage of this code is {rate}.
incompatible_issuer_profileThe issuer's {field} cannot be written in this document type, which accepts at most {max} characters.
url_not_allowedWebhook URLs must be public HTTPS URLs without credentials ({reason}).
incorrect_passwordThe password is incorrect.
invalid_codeThe code is incorrect or has expired.
demo_issuer_test_onlyThe demo issuer can only be used with test (fp_test_) API keys.
demo_issuer_sequential_not_allowedThe shared demo issuer assigns the sequential itself; leave out sequential.
ruc_mismatchThis RUC does not match the certificate, which supports {expected}. A certificate with only a cédula supports the RUCs whose first 10 digits are that cédula.