Ir al contenido

Create a webhook endpoint

POST
/v1/webhook-endpoints
curl --request POST \
--url https://api.flashpi.com.ec/v1/webhook-endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "url": "https://hooks.example.com/flashpi", "description": "ERP production receiver", "enabledEvents": [ "invoice.authorized", "invoice.rejected" ], "payloadMode": "full" }'

Registers a public HTTPS URL for the chosen event types. The endpoint starts pending_verification: Flashpi POSTs a signed webhook_endpoint.verification body with a challenge, and the endpoint must answer 2xx echoing it ({"challenge": "..."}, or the challenge as plain text) before it receives events. Read its signing secret with GET …/secret. Requires an account-scoped (global) API key with read_write access. Test keys manage the endpoints of test events and live keys those of live events.

Idempotency-Key
string
>= 1 characters <= 255 characters /^[\x21-\x7E]+$/

Makes the request safe to retry: 1 to 255 visible ASCII characters (a UUID works well), remembered for 24 hours per account and mode. A retry with the same key and the same request returns the first successful response again, with the header Idempotent-Replayed: true. The same key with a different request gets 422 idempotency_key_reused; while the first request still runs, 409 idempotency_key_in_progress. A failed request does not keep its key.

Accept-Language
string

Language of error messages and of the localized texts of resources (SRI messages, failures, certificate rejections): Spanish when the entry with the highest q-value is es or es- plus a region (es-EC, es-419), English otherwise. Errors state it in Content-Language.

X-Correlation-Id
string
>= 1 characters <= 128 characters /^[A-Za-z0-9._:/+=-]{1,128}$/

Your own ID for the request (letters, digits and -_.:/+=), echoed back in the X-Correlation-Id response header and logged next to the request ID. An invalid value gets 400 invalid_correlation_id.

Media typeapplication/json
object
url
required

Where Flashpi POSTs the events: a public HTTPS URL without credentials or fragment. Changing it requires a new verification.

string
<= 2048 characters

Example

https://hooks.example.com/flashpi
description

A label for your own reference.

string | null
<= 500 characters

Example

ERP production receiver
enabledEvents
required

Event types the endpoint receives; * receives every type, including future ones.

Array<string>
>= 1 items <= 100 items
Allowed values: invoice.authorized invoice.rejected purchase_settlement.authorized purchase_settlement.rejected credit_note.authorized credit_note.rejected debit_note.authorized debit_note.rejected waybill.authorized waybill.rejected withholding.authorized withholding.rejected certificate.verified certificate.pending certificate.blocked certificate.revoked certificate.reactivated document.ride.generated document.ride.failed document.email.sent document.email.delivered document.email.bounced document.email.complained document.email.failed account.email_paused account.email_resumed *

Example

[
"invoice.authorized",
"invoice.rejected"
]
payloadMode

full (default): the event with a snapshot of its resource in data. thin: the event without data, only id, type, environment and createdAt (read the snapshot with GET /v1/events/{id}).

string
default: full
Allowed values: full thin
Media typeapplication/json

A URL that receives Standard Webhooks, signed with a whsec_ secret (read it with GET …/secret). It receives the events of the mode of the API key that created it (test or live).

object
id
required
string format: uuid
url
required

Where Flashpi POSTs the events: a public HTTPS URL without credentials or fragment. Changing it requires a new verification.

string
<= 2048 characters
description
required

A label for your own reference.

string | null
<= 500 characters
enabledEvents
required

Event types the endpoint receives; * receives every type, including future ones.

Array<string>
>= 1 items <= 100 items
Allowed values: invoice.authorized invoice.rejected purchase_settlement.authorized purchase_settlement.rejected credit_note.authorized credit_note.rejected debit_note.authorized debit_note.rejected waybill.authorized waybill.rejected withholding.authorized withholding.rejected certificate.verified certificate.pending certificate.blocked certificate.revoked certificate.reactivated document.ride.generated document.ride.failed document.email.sent document.email.delivered document.email.bounced document.email.complained document.email.failed account.email_paused account.email_resumed *
payloadMode
required

full (default): the event with a snapshot of its resource in data. thin: the event without data, only id, type, environment and createdAt (read the snapshot with GET /v1/events/{id}).

string
Allowed values: full thin
status
required

pending_verification (receives nothing until it echoes the challenge), active or disabled.

string
Allowed values: pending_verification active disabled
environment
required

Mode of the events it receives.

string
Allowed values: test live
verification
required

The activation handshake: Flashpi POSTs a signed webhook_endpoint.verification body with a challenge, and the endpoint must answer 2xx echoing it.

object
verifiedAt
required
string | null format: date-time
inProgress
required

Whether a handshake attempt is scheduled or running.

boolean
attempts
required

Attempts of the current handshake.

number
lastAttemptAt
required
string | null format: date-time
lastError
required

Why the last attempt failed: challenge_mismatch, unexpected_status, timeout, connection_failed, dns_resolution_failed, tls_error, address_not_allowed or invalid_url.

string | null
lastResponseStatus
required
integer | null
previousSecretExpiresAt
required

After a rotation: until when deliveries are also signed with the previous secret.

string | null format: date-time
disabledAt
required
string | null format: date-time
createdAt
required
string format: date-time
updatedAt
required
string format: date-time

Example

{
"id": "01a1407e-5b1c-7d7a-9c55-0e4bb9e9a001",
"url": "https://hooks.example.com/flashpi",
"description": "ERP production receiver",
"enabledEvents": [
"invoice.authorized",
"invoice.rejected"
],
"payloadMode": "full",
"status": "pending_verification",
"environment": "test",
"verification": {
"attempts": 1,
"lastError": "challenge_mismatch",
"lastResponseStatus": 200
}
}
Idempotent-Replayed
string
Allowed values: true

true when this is the stored answer of an earlier request with the same Idempotency-Key (same status and body, no Location). Absent otherwise.

X-Request-Id
string format: uuid

Flashpi’s ID of the request, a UUIDv7 (also requestId in errors). Include it when you contact support.

malformed_json: the body is not valid JSON. bad_request: the body does not decompress with its Content-Encoding. Or invalid_idempotency_key: the Idempotency-Key header is malformed.

Media typeapplication/problem+json

RFC 9457 problem details, in the language of Content-Language (en, or es with Accept-Language: es). Some codes add extension members, listed below; others may appear.

object
type
required

URI of the problem type: the page that documents code, in the language of the response (https://flashpi.com.ec/docs/en/errors/{code} in English, https://flashpi.com.ec/docs/errors/{code} with Accept-Language: es). It changes with the language, so branch on code, never on type.

string format: uri
title
required

Localized summary of the type.

string
status
required

HTTP status code.

number
detail
required

Localized explanation of this occurrence.

string
instance
required

Path of the request.

string
code
required

Stable machine-readable error code, the same in every language. Branch on it, never on type, title or detail. New codes may be added: handle an unknown one by its HTTP status.

string
Allowed values: bad_request malformed_json invalid_correlation_id validation_failed authentication_required forbidden not_found method_not_allowed not_acceptable conflict payload_too_large unsupported_media_type rate_limited internal_error service_unavailable invalid_api_key key_scope_mismatch key_read_only ip_not_allowed invalid_idempotency_key idempotency_key_reused idempotency_key_in_progress issuer_already_exists establishment_already_exists emission_point_already_exists resource_in_use issuer_onboarding_not_ready issuer_onboarding_expired issuer_onboarding_completed issuer_onboarding_rejected total_mismatch sequential_already_used sequentials_exhausted document_schema_invalid document_too_large document_not_authorized ride_not_available email_recipient_missing email_already_queued email_resend_limit_reached account_email_limit_reached email_sending_paused test_recipient_not_allowed platform_email_limit_reached webhook_endpoint_disabled webhook_endpoint_already_verified webhook_endpoint_not_verified webhook_delivery_in_progress sandbox_not_enabled demo_issuer_quota_exceeded demo_issuer_unavailable account_suspended
errors
required

Field-level errors (may be empty).

Array<object>
object
field
required

Path of the invalid field.

string
code
required

Stable machine-readable reason. New codes may be added: treat an unknown one like invalid_value.

string
Allowed values: required unknown_field invalid_type invalid_format invalid_option too_short too_long out_of_range invalid_value unsupported_character not_found invalid_decimal invalid_identification invalid_check_digit final_consumer_not_allowed not_in_force too_many_additional_fields reserved_name amount_mismatch future_date date_too_early date_too_late discount_exceeds_amount duplicate vat_required unsupported_tax rate_mismatch incompatible_issuer_profile url_not_allowed demo_issuer_test_only demo_issuer_sequential_not_allowed ruc_mismatch
message
required

Localized message.

string
requestId
required

Request ID (UUIDv7); include it when contacting support.

string
documentId

idempotency_key_reused: the document the Idempotency-Key already created.

string format: uuid
limit

The daily limit that was reached (email_resend_limit_reached, account_email_limit_reached, demo_issuer_quota_exceeded).

integer
resetsAt

When the daily limit resets: the next midnight in Ecuador (the three codes above and platform_email_limit_reached). Retry-After gives the same in seconds.

string format: date-time
rideStatus

ride_not_available: the status of the RIDE.

string
Allowed values: pending generated failed
documentStatus

document_not_authorized: the status of the document.

string
Allowed values: processing pending_sri authorized rejected failed voided
environment

email_sending_paused: the mode whose email sending is paused.

string
Allowed values: test live
expectedTotal

total_mismatch: the expectedTotal you sent.

string
computedTotal

total_mismatch: the total Flashpi computed.

string
key
additional properties
any

Example

{
"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": "required",
"message": "This field is required."
}
],
"requestId": "017f22e2-79b0-7cc3-98c4-dc0c0c07398f",
"rideStatus": "pending",
"documentStatus": "processing",
"environment": "test",
"expectedTotal": "112.00",
"computedTotal": "111.99"
}

authentication_required: no Authorization: Bearer header. invalid_api_key: the key is malformed, unknown or revoked.

Media typeapplication/problem+json

RFC 9457 problem details, in the language of Content-Language (en, or es with Accept-Language: es). Some codes add extension members, listed below; others may appear.

object
type
required

URI of the problem type: the page that documents code, in the language of the response (https://flashpi.com.ec/docs/en/errors/{code} in English, https://flashpi.com.ec/docs/errors/{code} with Accept-Language: es). It changes with the language, so branch on code, never on type.

string format: uri
title
required

Localized summary of the type.

string
status
required

HTTP status code.

number
detail
required

Localized explanation of this occurrence.

string
instance
required

Path of the request.

string
code
required

Stable machine-readable error code, the same in every language. Branch on it, never on type, title or detail. New codes may be added: handle an unknown one by its HTTP status.

string
Allowed values: bad_request malformed_json invalid_correlation_id validation_failed authentication_required forbidden not_found method_not_allowed not_acceptable conflict payload_too_large unsupported_media_type rate_limited internal_error service_unavailable invalid_api_key key_scope_mismatch key_read_only ip_not_allowed invalid_idempotency_key idempotency_key_reused idempotency_key_in_progress issuer_already_exists establishment_already_exists emission_point_already_exists resource_in_use issuer_onboarding_not_ready issuer_onboarding_expired issuer_onboarding_completed issuer_onboarding_rejected total_mismatch sequential_already_used sequentials_exhausted document_schema_invalid document_too_large document_not_authorized ride_not_available email_recipient_missing email_already_queued email_resend_limit_reached account_email_limit_reached email_sending_paused test_recipient_not_allowed platform_email_limit_reached webhook_endpoint_disabled webhook_endpoint_already_verified webhook_endpoint_not_verified webhook_delivery_in_progress sandbox_not_enabled demo_issuer_quota_exceeded demo_issuer_unavailable account_suspended
errors
required

Field-level errors (may be empty).

Array<object>
object
field
required

Path of the invalid field.

string
code
required

Stable machine-readable reason. New codes may be added: treat an unknown one like invalid_value.

string
Allowed values: required unknown_field invalid_type invalid_format invalid_option too_short too_long out_of_range invalid_value unsupported_character not_found invalid_decimal invalid_identification invalid_check_digit final_consumer_not_allowed not_in_force too_many_additional_fields reserved_name amount_mismatch future_date date_too_early date_too_late discount_exceeds_amount duplicate vat_required unsupported_tax rate_mismatch incompatible_issuer_profile url_not_allowed demo_issuer_test_only demo_issuer_sequential_not_allowed ruc_mismatch
message
required

Localized message.

string
requestId
required

Request ID (UUIDv7); include it when contacting support.

string
documentId

idempotency_key_reused: the document the Idempotency-Key already created.

string format: uuid
limit

The daily limit that was reached (email_resend_limit_reached, account_email_limit_reached, demo_issuer_quota_exceeded).

integer
resetsAt

When the daily limit resets: the next midnight in Ecuador (the three codes above and platform_email_limit_reached). Retry-After gives the same in seconds.

string format: date-time
rideStatus

ride_not_available: the status of the RIDE.

string
Allowed values: pending generated failed
documentStatus

document_not_authorized: the status of the document.

string
Allowed values: processing pending_sri authorized rejected failed voided
environment

email_sending_paused: the mode whose email sending is paused.

string
Allowed values: test live
expectedTotal

total_mismatch: the expectedTotal you sent.

string
computedTotal

total_mismatch: the total Flashpi computed.

string
key
additional properties
any

Example

{
"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": "required",
"message": "This field is required."
}
],
"requestId": "017f22e2-79b0-7cc3-98c4-dc0c0c07398f",
"rideStatus": "pending",
"documentStatus": "processing",
"environment": "test",
"expectedTotal": "112.00",
"computedTotal": "111.99"
}
WWW-Authenticate
string

RFC 6750 challenge: Bearer realm="flashpi", plus error="invalid_token" with invalid_api_key.

The API key cannot perform this operation: key_scope_mismatch, key_read_only or ip_not_allowed; or its account is suspended (account_suspended).

Media typeapplication/problem+json

RFC 9457 problem details, in the language of Content-Language (en, or es with Accept-Language: es). Some codes add extension members, listed below; others may appear.

object
type
required

URI of the problem type: the page that documents code, in the language of the response (https://flashpi.com.ec/docs/en/errors/{code} in English, https://flashpi.com.ec/docs/errors/{code} with Accept-Language: es). It changes with the language, so branch on code, never on type.

string format: uri
title
required

Localized summary of the type.

string
status
required

HTTP status code.

number
detail
required

Localized explanation of this occurrence.

string
instance
required

Path of the request.

string
code
required

Stable machine-readable error code, the same in every language. Branch on it, never on type, title or detail. New codes may be added: handle an unknown one by its HTTP status.

string
Allowed values: bad_request malformed_json invalid_correlation_id validation_failed authentication_required forbidden not_found method_not_allowed not_acceptable conflict payload_too_large unsupported_media_type rate_limited internal_error service_unavailable invalid_api_key key_scope_mismatch key_read_only ip_not_allowed invalid_idempotency_key idempotency_key_reused idempotency_key_in_progress issuer_already_exists establishment_already_exists emission_point_already_exists resource_in_use issuer_onboarding_not_ready issuer_onboarding_expired issuer_onboarding_completed issuer_onboarding_rejected total_mismatch sequential_already_used sequentials_exhausted document_schema_invalid document_too_large document_not_authorized ride_not_available email_recipient_missing email_already_queued email_resend_limit_reached account_email_limit_reached email_sending_paused test_recipient_not_allowed platform_email_limit_reached webhook_endpoint_disabled webhook_endpoint_already_verified webhook_endpoint_not_verified webhook_delivery_in_progress sandbox_not_enabled demo_issuer_quota_exceeded demo_issuer_unavailable account_suspended
errors
required

Field-level errors (may be empty).

Array<object>
object
field
required

Path of the invalid field.

string
code
required

Stable machine-readable reason. New codes may be added: treat an unknown one like invalid_value.

string
Allowed values: required unknown_field invalid_type invalid_format invalid_option too_short too_long out_of_range invalid_value unsupported_character not_found invalid_decimal invalid_identification invalid_check_digit final_consumer_not_allowed not_in_force too_many_additional_fields reserved_name amount_mismatch future_date date_too_early date_too_late discount_exceeds_amount duplicate vat_required unsupported_tax rate_mismatch incompatible_issuer_profile url_not_allowed demo_issuer_test_only demo_issuer_sequential_not_allowed ruc_mismatch
message
required

Localized message.

string
requestId
required

Request ID (UUIDv7); include it when contacting support.

string
documentId

idempotency_key_reused: the document the Idempotency-Key already created.

string format: uuid
limit

The daily limit that was reached (email_resend_limit_reached, account_email_limit_reached, demo_issuer_quota_exceeded).

integer
resetsAt

When the daily limit resets: the next midnight in Ecuador (the three codes above and platform_email_limit_reached). Retry-After gives the same in seconds.

string format: date-time
rideStatus

ride_not_available: the status of the RIDE.

string
Allowed values: pending generated failed
documentStatus

document_not_authorized: the status of the document.

string
Allowed values: processing pending_sri authorized rejected failed voided
environment

email_sending_paused: the mode whose email sending is paused.

string
Allowed values: test live
expectedTotal

total_mismatch: the expectedTotal you sent.

string
computedTotal

total_mismatch: the total Flashpi computed.

string
key
additional properties
any

Example

{
"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": "required",
"message": "This field is required."
}
],
"requestId": "017f22e2-79b0-7cc3-98c4-dc0c0c07398f",
"rideStatus": "pending",
"documentStatus": "processing",
"environment": "test",
"expectedTotal": "112.00",
"computedTotal": "111.99"
}

Idempotency_key_in_progress: a request with this Idempotency-Key is still running.

Media typeapplication/problem+json

RFC 9457 problem details, in the language of Content-Language (en, or es with Accept-Language: es). Some codes add extension members, listed below; others may appear.

object
type
required

URI of the problem type: the page that documents code, in the language of the response (https://flashpi.com.ec/docs/en/errors/{code} in English, https://flashpi.com.ec/docs/errors/{code} with Accept-Language: es). It changes with the language, so branch on code, never on type.

string format: uri
title
required

Localized summary of the type.

string
status
required

HTTP status code.

number
detail
required

Localized explanation of this occurrence.

string
instance
required

Path of the request.

string
code
required

Stable machine-readable error code, the same in every language. Branch on it, never on type, title or detail. New codes may be added: handle an unknown one by its HTTP status.

string
Allowed values: bad_request malformed_json invalid_correlation_id validation_failed authentication_required forbidden not_found method_not_allowed not_acceptable conflict payload_too_large unsupported_media_type rate_limited internal_error service_unavailable invalid_api_key key_scope_mismatch key_read_only ip_not_allowed invalid_idempotency_key idempotency_key_reused idempotency_key_in_progress issuer_already_exists establishment_already_exists emission_point_already_exists resource_in_use issuer_onboarding_not_ready issuer_onboarding_expired issuer_onboarding_completed issuer_onboarding_rejected total_mismatch sequential_already_used sequentials_exhausted document_schema_invalid document_too_large document_not_authorized ride_not_available email_recipient_missing email_already_queued email_resend_limit_reached account_email_limit_reached email_sending_paused test_recipient_not_allowed platform_email_limit_reached webhook_endpoint_disabled webhook_endpoint_already_verified webhook_endpoint_not_verified webhook_delivery_in_progress sandbox_not_enabled demo_issuer_quota_exceeded demo_issuer_unavailable account_suspended
errors
required

Field-level errors (may be empty).

Array<object>
object
field
required

Path of the invalid field.

string
code
required

Stable machine-readable reason. New codes may be added: treat an unknown one like invalid_value.

string
Allowed values: required unknown_field invalid_type invalid_format invalid_option too_short too_long out_of_range invalid_value unsupported_character not_found invalid_decimal invalid_identification invalid_check_digit final_consumer_not_allowed not_in_force too_many_additional_fields reserved_name amount_mismatch future_date date_too_early date_too_late discount_exceeds_amount duplicate vat_required unsupported_tax rate_mismatch incompatible_issuer_profile url_not_allowed demo_issuer_test_only demo_issuer_sequential_not_allowed ruc_mismatch
message
required

Localized message.

string
requestId
required

Request ID (UUIDv7); include it when contacting support.

string
documentId

idempotency_key_reused: the document the Idempotency-Key already created.

string format: uuid
limit

The daily limit that was reached (email_resend_limit_reached, account_email_limit_reached, demo_issuer_quota_exceeded).

integer
resetsAt

When the daily limit resets: the next midnight in Ecuador (the three codes above and platform_email_limit_reached). Retry-After gives the same in seconds.

string format: date-time
rideStatus

ride_not_available: the status of the RIDE.

string
Allowed values: pending generated failed
documentStatus

document_not_authorized: the status of the document.

string
Allowed values: processing pending_sri authorized rejected failed voided
environment

email_sending_paused: the mode whose email sending is paused.

string
Allowed values: test live
expectedTotal

total_mismatch: the expectedTotal you sent.

string
computedTotal

total_mismatch: the total Flashpi computed.

string
key
additional properties
any

Example

{
"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": "required",
"message": "This field is required."
}
],
"requestId": "017f22e2-79b0-7cc3-98c4-dc0c0c07398f",
"rideStatus": "pending",
"documentStatus": "processing",
"environment": "test",
"expectedTotal": "112.00",
"computedTotal": "111.99"
}

payload_too_large: the JSON body is larger than 1 MB.

Media typeapplication/problem+json

RFC 9457 problem details, in the language of Content-Language (en, or es with Accept-Language: es). Some codes add extension members, listed below; others may appear.

object
type
required

URI of the problem type: the page that documents code, in the language of the response (https://flashpi.com.ec/docs/en/errors/{code} in English, https://flashpi.com.ec/docs/errors/{code} with Accept-Language: es). It changes with the language, so branch on code, never on type.

string format: uri
title
required

Localized summary of the type.

string
status
required

HTTP status code.

number
detail
required

Localized explanation of this occurrence.

string
instance
required

Path of the request.

string
code
required

Stable machine-readable error code, the same in every language. Branch on it, never on type, title or detail. New codes may be added: handle an unknown one by its HTTP status.

string
Allowed values: bad_request malformed_json invalid_correlation_id validation_failed authentication_required forbidden not_found method_not_allowed not_acceptable conflict payload_too_large unsupported_media_type rate_limited internal_error service_unavailable invalid_api_key key_scope_mismatch key_read_only ip_not_allowed invalid_idempotency_key idempotency_key_reused idempotency_key_in_progress issuer_already_exists establishment_already_exists emission_point_already_exists resource_in_use issuer_onboarding_not_ready issuer_onboarding_expired issuer_onboarding_completed issuer_onboarding_rejected total_mismatch sequential_already_used sequentials_exhausted document_schema_invalid document_too_large document_not_authorized ride_not_available email_recipient_missing email_already_queued email_resend_limit_reached account_email_limit_reached email_sending_paused test_recipient_not_allowed platform_email_limit_reached webhook_endpoint_disabled webhook_endpoint_already_verified webhook_endpoint_not_verified webhook_delivery_in_progress sandbox_not_enabled demo_issuer_quota_exceeded demo_issuer_unavailable account_suspended
errors
required

Field-level errors (may be empty).

Array<object>
object
field
required

Path of the invalid field.

string
code
required

Stable machine-readable reason. New codes may be added: treat an unknown one like invalid_value.

string
Allowed values: required unknown_field invalid_type invalid_format invalid_option too_short too_long out_of_range invalid_value unsupported_character not_found invalid_decimal invalid_identification invalid_check_digit final_consumer_not_allowed not_in_force too_many_additional_fields reserved_name amount_mismatch future_date date_too_early date_too_late discount_exceeds_amount duplicate vat_required unsupported_tax rate_mismatch incompatible_issuer_profile url_not_allowed demo_issuer_test_only demo_issuer_sequential_not_allowed ruc_mismatch
message
required

Localized message.

string
requestId
required

Request ID (UUIDv7); include it when contacting support.

string
documentId

idempotency_key_reused: the document the Idempotency-Key already created.

string format: uuid
limit

The daily limit that was reached (email_resend_limit_reached, account_email_limit_reached, demo_issuer_quota_exceeded).

integer
resetsAt

When the daily limit resets: the next midnight in Ecuador (the three codes above and platform_email_limit_reached). Retry-After gives the same in seconds.

string format: date-time
rideStatus

ride_not_available: the status of the RIDE.

string
Allowed values: pending generated failed
documentStatus

document_not_authorized: the status of the document.

string
Allowed values: processing pending_sri authorized rejected failed voided
environment

email_sending_paused: the mode whose email sending is paused.

string
Allowed values: test live
expectedTotal

total_mismatch: the expectedTotal you sent.

string
computedTotal

total_mismatch: the total Flashpi computed.

string
key
additional properties
any

Example

{
"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": "required",
"message": "This field is required."
}
],
"requestId": "017f22e2-79b0-7cc3-98c4-dc0c0c07398f",
"rideStatus": "pending",
"documentStatus": "processing",
"environment": "test",
"expectedTotal": "112.00",
"computedTotal": "111.99"
}

unsupported_media_type: the body declares a charset that does not start with utf- (for example latin1, or utf8 without the hyphen) or a Content-Encoding other than gzip, deflate or br.

Media typeapplication/problem+json

RFC 9457 problem details, in the language of Content-Language (en, or es with Accept-Language: es). Some codes add extension members, listed below; others may appear.

object
type
required

URI of the problem type: the page that documents code, in the language of the response (https://flashpi.com.ec/docs/en/errors/{code} in English, https://flashpi.com.ec/docs/errors/{code} with Accept-Language: es). It changes with the language, so branch on code, never on type.

string format: uri
title
required

Localized summary of the type.

string
status
required

HTTP status code.

number
detail
required

Localized explanation of this occurrence.

string
instance
required

Path of the request.

string
code
required

Stable machine-readable error code, the same in every language. Branch on it, never on type, title or detail. New codes may be added: handle an unknown one by its HTTP status.

string
Allowed values: bad_request malformed_json invalid_correlation_id validation_failed authentication_required forbidden not_found method_not_allowed not_acceptable conflict payload_too_large unsupported_media_type rate_limited internal_error service_unavailable invalid_api_key key_scope_mismatch key_read_only ip_not_allowed invalid_idempotency_key idempotency_key_reused idempotency_key_in_progress issuer_already_exists establishment_already_exists emission_point_already_exists resource_in_use issuer_onboarding_not_ready issuer_onboarding_expired issuer_onboarding_completed issuer_onboarding_rejected total_mismatch sequential_already_used sequentials_exhausted document_schema_invalid document_too_large document_not_authorized ride_not_available email_recipient_missing email_already_queued email_resend_limit_reached account_email_limit_reached email_sending_paused test_recipient_not_allowed platform_email_limit_reached webhook_endpoint_disabled webhook_endpoint_already_verified webhook_endpoint_not_verified webhook_delivery_in_progress sandbox_not_enabled demo_issuer_quota_exceeded demo_issuer_unavailable account_suspended
errors
required

Field-level errors (may be empty).

Array<object>
object
field
required

Path of the invalid field.

string
code
required

Stable machine-readable reason. New codes may be added: treat an unknown one like invalid_value.

string
Allowed values: required unknown_field invalid_type invalid_format invalid_option too_short too_long out_of_range invalid_value unsupported_character not_found invalid_decimal invalid_identification invalid_check_digit final_consumer_not_allowed not_in_force too_many_additional_fields reserved_name amount_mismatch future_date date_too_early date_too_late discount_exceeds_amount duplicate vat_required unsupported_tax rate_mismatch incompatible_issuer_profile url_not_allowed demo_issuer_test_only demo_issuer_sequential_not_allowed ruc_mismatch
message
required

Localized message.

string
requestId
required

Request ID (UUIDv7); include it when contacting support.

string
documentId

idempotency_key_reused: the document the Idempotency-Key already created.

string format: uuid
limit

The daily limit that was reached (email_resend_limit_reached, account_email_limit_reached, demo_issuer_quota_exceeded).

integer
resetsAt

When the daily limit resets: the next midnight in Ecuador (the three codes above and platform_email_limit_reached). Retry-After gives the same in seconds.

string format: date-time
rideStatus

ride_not_available: the status of the RIDE.

string
Allowed values: pending generated failed
documentStatus

document_not_authorized: the status of the document.

string
Allowed values: processing pending_sri authorized rejected failed voided
environment

email_sending_paused: the mode whose email sending is paused.

string
Allowed values: test live
expectedTotal

total_mismatch: the expectedTotal you sent.

string
computedTotal

total_mismatch: the total Flashpi computed.

string
key
additional properties
any

Example

{
"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": "required",
"message": "This field is required."
}
],
"requestId": "017f22e2-79b0-7cc3-98c4-dc0c0c07398f",
"rideStatus": "pending",
"documentStatus": "processing",
"environment": "test",
"expectedTotal": "112.00",
"computedTotal": "111.99"
}

Validation_failed: see errors (url_not_allowed for a URL that is not public HTTPS). Or idempotency_key_reused: the Idempotency-Key was used with a different request.

Media typeapplication/problem+json

RFC 9457 problem details, in the language of Content-Language (en, or es with Accept-Language: es). Some codes add extension members, listed below; others may appear.

object
type
required

URI of the problem type: the page that documents code, in the language of the response (https://flashpi.com.ec/docs/en/errors/{code} in English, https://flashpi.com.ec/docs/errors/{code} with Accept-Language: es). It changes with the language, so branch on code, never on type.

string format: uri
title
required

Localized summary of the type.

string
status
required

HTTP status code.

number
detail
required

Localized explanation of this occurrence.

string
instance
required

Path of the request.

string
code
required

Stable machine-readable error code, the same in every language. Branch on it, never on type, title or detail. New codes may be added: handle an unknown one by its HTTP status.

string
Allowed values: bad_request malformed_json invalid_correlation_id validation_failed authentication_required forbidden not_found method_not_allowed not_acceptable conflict payload_too_large unsupported_media_type rate_limited internal_error service_unavailable invalid_api_key key_scope_mismatch key_read_only ip_not_allowed invalid_idempotency_key idempotency_key_reused idempotency_key_in_progress issuer_already_exists establishment_already_exists emission_point_already_exists resource_in_use issuer_onboarding_not_ready issuer_onboarding_expired issuer_onboarding_completed issuer_onboarding_rejected total_mismatch sequential_already_used sequentials_exhausted document_schema_invalid document_too_large document_not_authorized ride_not_available email_recipient_missing email_already_queued email_resend_limit_reached account_email_limit_reached email_sending_paused test_recipient_not_allowed platform_email_limit_reached webhook_endpoint_disabled webhook_endpoint_already_verified webhook_endpoint_not_verified webhook_delivery_in_progress sandbox_not_enabled demo_issuer_quota_exceeded demo_issuer_unavailable account_suspended
errors
required

Field-level errors (may be empty).

Array<object>
object
field
required

Path of the invalid field.

string
code
required

Stable machine-readable reason. New codes may be added: treat an unknown one like invalid_value.

string
Allowed values: required unknown_field invalid_type invalid_format invalid_option too_short too_long out_of_range invalid_value unsupported_character not_found invalid_decimal invalid_identification invalid_check_digit final_consumer_not_allowed not_in_force too_many_additional_fields reserved_name amount_mismatch future_date date_too_early date_too_late discount_exceeds_amount duplicate vat_required unsupported_tax rate_mismatch incompatible_issuer_profile url_not_allowed demo_issuer_test_only demo_issuer_sequential_not_allowed ruc_mismatch
message
required

Localized message.

string
requestId
required

Request ID (UUIDv7); include it when contacting support.

string
documentId

idempotency_key_reused: the document the Idempotency-Key already created.

string format: uuid
limit

The daily limit that was reached (email_resend_limit_reached, account_email_limit_reached, demo_issuer_quota_exceeded).

integer
resetsAt

When the daily limit resets: the next midnight in Ecuador (the three codes above and platform_email_limit_reached). Retry-After gives the same in seconds.

string format: date-time
rideStatus

ride_not_available: the status of the RIDE.

string
Allowed values: pending generated failed
documentStatus

document_not_authorized: the status of the document.

string
Allowed values: processing pending_sri authorized rejected failed voided
environment

email_sending_paused: the mode whose email sending is paused.

string
Allowed values: test live
expectedTotal

total_mismatch: the expectedTotal you sent.

string
computedTotal

total_mismatch: the total Flashpi computed.

string
key
additional properties
any

Example

{
"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": "required",
"message": "This field is required."
}
],
"requestId": "017f22e2-79b0-7cc3-98c4-dc0c0c07398f",
"rideStatus": "pending",
"documentStatus": "processing",
"environment": "test",
"expectedTotal": "112.00",
"computedTotal": "111.99"
}