Issue a debit note
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://api.flashpi.com.ec/v1/debit-notes"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"issuerId\": \"01a13eca-2e80-7c3d-9f21-5b8e4a6d0c17\", \"establishment\": \"001\", \"emissionPoint\": \"001\", \"customer\": { \"idType\": \"ruc\", \"id\": \"1790000000001\", \"name\": \"Supermercados La Pradera S.A.\", \"email\": \"compras@example.com\" }, \"modifiedDocument\": { \"number\": \"001-001-000000123\", \"issueDate\": \"2026-10-15\" }, \"reasons\": [ { \"description\": \"Late payment interest\", \"amount\": \"10.00\", \"taxes\": [ { \"type\": \"vat\", \"rate\": \"15\" } ] } ], \"payments\": [ { \"method\": \"other_financial_system\", \"amount\": \"11.50\" } ] }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.flashpi.com.ec/v1/debit-notes"
payload := strings.NewReader("{ \"issuerId\": \"01a13eca-2e80-7c3d-9f21-5b8e4a6d0c17\", \"establishment\": \"001\", \"emissionPoint\": \"001\", \"customer\": { \"idType\": \"ruc\", \"id\": \"1790000000001\", \"name\": \"Supermercados La Pradera S.A.\", \"email\": \"compras@example.com\" }, \"modifiedDocument\": { \"number\": \"001-001-000000123\", \"issueDate\": \"2026-10-15\" }, \"reasons\": [ { \"description\": \"Late payment interest\", \"amount\": \"10.00\", \"taxes\": [ { \"type\": \"vat\", \"rate\": \"15\" } ] } ], \"payments\": [ { \"method\": \"other_financial_system\", \"amount\": \"11.50\" } ] }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.flashpi.com.ec/v1/debit-notes")) .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .method("POST", HttpRequest.BodyPublishers.ofString("{ \"issuerId\": \"01a13eca-2e80-7c3d-9f21-5b8e4a6d0c17\", \"establishment\": \"001\", \"emissionPoint\": \"001\", \"customer\": { \"idType\": \"ruc\", \"id\": \"1790000000001\", \"name\": \"Supermercados La Pradera S.A.\", \"email\": \"compras@example.com\" }, \"modifiedDocument\": { \"number\": \"001-001-000000123\", \"issueDate\": \"2026-10-15\" }, \"reasons\": [ { \"description\": \"Late payment interest\", \"amount\": \"10.00\", \"taxes\": [ { \"type\": \"vat\", \"rate\": \"15\" } ] } ], \"payments\": [ { \"method\": \"other_financial_system\", \"amount\": \"11.50\" } ] }")) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());const url = 'https://api.flashpi.com.ec/v1/debit-notes';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"issuerId":"01a13eca-2e80-7c3d-9f21-5b8e4a6d0c17","establishment":"001","emissionPoint":"001","customer":{"idType":"ruc","id":"1790000000001","name":"Supermercados La Pradera S.A.","email":"compras@example.com"},"modifiedDocument":{"number":"001-001-000000123","issueDate":"2026-10-15"},"reasons":[{"description":"Late payment interest","amount":"10.00","taxes":[{"type":"vat","rate":"15"}]}],"payments":[{"method":"other_financial_system","amount":"11.50"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.flashpi.com.ec/v1/debit-notes \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "issuerId": "01a13eca-2e80-7c3d-9f21-5b8e4a6d0c17", "establishment": "001", "emissionPoint": "001", "customer": { "idType": "ruc", "id": "1790000000001", "name": "Supermercados La Pradera S.A.", "email": "compras@example.com" }, "modifiedDocument": { "number": "001-001-000000123", "issueDate": "2026-10-15" }, "reasons": [ { "description": "Late payment interest", "amount": "10.00", "taxes": [ { "type": "vat", "rate": "15" } ] } ], "payments": [ { "method": "other_financial_system", "amount": "11.50" } ] }'Issues a debit note (nota de débito, XML 1.0.0) that modifies an invoice. Its VAT rates are the ones in force on the invoice date. Issuing is asynchronous: the document is validated, numbered (sequential and access key) and stored with status processing, and the response is 202 Accepted. Flashpi then signs it and sends it to the SRI; follow it with GET /v1/documents/{id} or webhooks. With options.waitForAuthorization the request waits for the SRI (15 s by default, 30 s at most) and answers 200 with the authorized, rejected or failed document, or 202 when the wait ends first. Requires a read_write API key; an issuer-scoped key can only issue for its issuer. fp_test_ keys issue in the SRI test environment, fp_live_ keys in production.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”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.
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.
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.
Request Bodyrequired
Section titled “Request Bodyrequired”A debit note (nota de débito) that increases the amount of a document, for example for interest or fees. Flashpi computes the taxes and the total.
object
The issuer (taxpayer) that issues the document.
Establishment code (3 digits) registered on the issuer.
Emission point code (3 digits) registered on the establishment.
Issue date, YYYY-MM-DD. Defaults to today in Ecuador; it cannot be later.
Sequential to use instead of the next one, for example when migrating from another system. It must not be used yet; later automatic sequentials continue after the highest one used. Not accepted with the shared demo issuer (422 demo_issuer_sequential_not_allowed).
Additional information printed on the document (name → value, 1 to 300 characters each). A document carries at most 15 fields including the legends Flashpi adds (RUC Proveedor, and Gran Contribuyente for large taxpayers), so at most 13 or 14 of yours.
object
Delivery options.
object
Email the authorized document (PDF and XML) to the counterparty, when it has an email address. Defaults to the issuer’s sendEmailByDefault (true unless the issuer opted out).
Sync mode: wait for the SRI before answering. The response is 200 with the document once it is authorized, rejected or failed, or 202 with its current status (usually pending_sri) when the wait ends first; the document then continues asynchronously. Defaults to false (202 at once).
Sync mode: the longest wait, in seconds, from 1 to 30. Defaults to 15. A longer wait is refused with out_of_range. Used only with waitForAuthorization.
The buyer of the modified document. It cannot be a final consumer.
object
Identification type: ruc (13 digits ending in 001, format only), cedula (10 digits, check digit verified), passport, final_consumer (no identification; only invoices accept it) or foreign_id (issued by the tax authority of another country).
Identification number. Required unless idType is final_consumer, whose number is always 9999999999999.
Legal name or full name. Required unless idType is final_consumer (printed as CONSUMIDOR FINAL).
Address. Credit and debit notes do not print it.
Where the authorized document is emailed (see options.sendEmail).
The document the note modifies.
object
Type of the modified document. Defaults to invoice.
Number of the modified document: establishment-emission point-sequential.
Issue date of the modified document (on or before the note). Its VAT rates are the ones in force on this date.
The reasons and their amounts.
A reason for a debit note and its amount before taxes.
object
Reason.
Amount before taxes.
The VAT of this amount (exactly one vat).
A tax of a line. Every line needs exactly one vat; invoices and credit notes accept one ad valorem ice too. Flashpi computes the bases and amounts.
object
vat (IVA) or ice (ICE).
For vat, the rate: 0, 5, 8 (differentiated, tourism), 12, 13, 14, 15, exempt or not_subject; it must be in force on the issue date (for credit and debit notes, on the modified document issue date). For ice, the ad valorem percentage with up to 2 decimals (for example 75).
For ice only (required): the 4-digit ICE code of TABLA 18.
How the debit is paid; the payments must add up to the total.
A payment. The payments must add up to the document total.
object
Payment method: cash (without the financial system), debt_offset, debit_card, electronic_money, prepaid_card, credit_card, other_financial_system (bank transfers, checks and other payments through the financial system) or securities_endorsement.
Amount paid with this method.
Payment term in termUnit units. Required on purchase settlements.
Unit of term: days or months.
The total you expect. Flashpi computes every total; when it differs from this value the request is refused with 422 total_mismatch, which shows both values.
Examples
A complete request
{ "issuerId": "01a13eca-2e80-7c3d-9f21-5b8e4a6d0c17", "establishment": "001", "emissionPoint": "001", "customer": { "idType": "ruc", "id": "1790000000001", "name": "Supermercados La Pradera S.A.", "email": "compras@example.com" }, "modifiedDocument": { "number": "001-001-000000123", "issueDate": "2026-10-15" }, "reasons": [ { "description": "Late payment interest", "amount": "10.00", "taxes": [ { "type": "vat", "rate": "15" } ] } ], "payments": [ { "method": "other_financial_system", "amount": "11.50" } ]}Responses
Section titled “Responses”Sync mode only: the SRI settled the document within the wait (status authorized, rejected or failed).
An SRI document of any type.
object
Mode of the API key that issued it: test (SRI pruebas) or live.
Tax status: processing (being signed and sent), pending_sri (waiting for the SRI), authorized, rejected, failed or voided.
Establishment-emission point-sequential.
The 49-digit access key, also the authorization number.
Version of the SRI XML.
Totals computed by Flashpi. Invoices have every field but withheld; purchase settlements and credit notes have no tip; debit notes have no discount nor tip; withholding receipts only have withheld.
object
Sum of the line subtotals.
Sum of the line discounts.
A tax total, grouped per tax and rate.
object
VAT: the rate (15, 0, exempt, …). ICE: the percentage.
ICE: the TABLA 18 code.
Taxable base.
Tax amount.
Tip.
Total (credited amount of a credit note, total of a debit note).
Total withheld.
The SRI authorization.
object
Authorization number (the access key), once authorized.
The RIDE (printed PDF), generated once the document is authorized.
object
Email delivery, separate from the tax status: sent only once the document is authorized, when it was requested and there is a recipient.
object
Whether the email was requested.
not_requested (opted out), skipped (no recipient), queued (sent once authorized), then sent, delivered, bounced, complained or failed.
One email to one recipient.
object
Why the email failed or bounced, as a code: for example rejected, timeout, invalid_address, bounce_permanent, bounce_suppressed (the address is on the suppression list of Flashpi’s email provider after an earlier bounce or complaint), complaint, account_email_limit_reached (the account’s emails of the day were used up; nothing was sent), platform_email_limit_reached (Flashpi’s emails of the day across all accounts were used up; nothing was sent), email_sending_paused (the account’s emails of the mode are paused; nothing was sent), platform_email_sending_paused (Flashpi paused the emails of its email provider for every account after too many bounces or complaints; nothing was sent), test_recipient_not_allowed (a test document whose recipient is not a verified member of the account’s team; nothing was sent: download the RIDE and the XML to send them) or invalid_domain (the recipient’s domain does not exist or receives no mail: no MX, A or AAAA record, or a null MX; nothing was sent).
Warnings about the recipient’s address, computed when the document is read: empty when nothing looks wrong.
Something about the email that looks wrong. A warning never stops or changes the email.
object
recipient_domain_typo: the recipient’s domain looks like a typo of a common mail domain (for example gmial.com for gmail.com). The email is still sent to the address as given; nothing changes it.
Follows Accept-Language (English or Spanish).
The address with the suggested domain.
Messages of the last SRI answer, mapped to Flashpi codes (the reasons of a rejection, or warnings of an authorization). Texts follow Accept-Language (English or Spanish).
A message of the SRI, mapped by Flashpi.
object
Flashpi error code.
Example
{ "id": "01a13fdf-9620-77a7-a18e-0b13542f5fed", "type": "invoice", "environment": "test", "status": "processing", "establishment": "001", "emissionPoint": "001", "sequential": 123, "number": "001-001-000000123", "accessKey": "1510202601179000000000110010010000001234152637411", "issueDate": "2026-10-15", "xmlVersion": "2.1.0", "counterparty": { "id": "1790000000001", "name": "Supermercados La Pradera S.A." }, "totals": { "subtotal": "60.31", "discount": "0.75", "taxes": [ { "type": "vat", "rate": "15", "code": "3031", "taxableBase": "57.50", "amount": "8.63" } ], "tip": "0.00", "total": "68.94", "withheld": "62.50" }, "authorization": { "number": null, "authorizedAt": null }, "ride": { "status": "pending", "template": "modern", "generatedAt": null }, "email": { "requested": true, "status": "not_requested", "deliveries": [ { "recipient": "compras@example.com", "status": "queued", "error": null } ], "warnings": [ { "code": "recipient_domain_typo", "message": "The recipient's email address may be mistyped: did you mean compras@gmail.com?", "suggestedRecipient": "compras@gmail.com" } ] }, "sriMessages": [ { "code": "calculation_mismatch", "message": "The SRI found differences in the calculations.", "severity": "error" } ], "failure": { "code": "certificate_required", "message": "The issuer has no accepted signing certificate for this mode. Upload its .p12 certificate and issue the document again." }}Headers
Section titled “Headers”Path of the document: /v1/documents/{id}. Not sent on an idempotent replay (Idempotent-Replayed: true): build it from the body as shown.
true when this is the stored answer of an earlier request with the same Idempotency-Key (same status and body, no Location). Absent otherwise.
Flashpi’s ID of the request, a UUIDv7 (also requestId in errors). Include it when you contact support.
Accepted: the document is stored and is being processed (status processing, or pending_sri when a sync wait ended first).
An SRI document of any type.
object
Mode of the API key that issued it: test (SRI pruebas) or live.
Tax status: processing (being signed and sent), pending_sri (waiting for the SRI), authorized, rejected, failed or voided.
Establishment-emission point-sequential.
The 49-digit access key, also the authorization number.
Version of the SRI XML.
Totals computed by Flashpi. Invoices have every field but withheld; purchase settlements and credit notes have no tip; debit notes have no discount nor tip; withholding receipts only have withheld.
object
Sum of the line subtotals.
Sum of the line discounts.
A tax total, grouped per tax and rate.
object
VAT: the rate (15, 0, exempt, …). ICE: the percentage.
ICE: the TABLA 18 code.
Taxable base.
Tax amount.
Tip.
Total (credited amount of a credit note, total of a debit note).
Total withheld.
The SRI authorization.
object
Authorization number (the access key), once authorized.
The RIDE (printed PDF), generated once the document is authorized.
object
Email delivery, separate from the tax status: sent only once the document is authorized, when it was requested and there is a recipient.
object
Whether the email was requested.
not_requested (opted out), skipped (no recipient), queued (sent once authorized), then sent, delivered, bounced, complained or failed.
One email to one recipient.
object
Why the email failed or bounced, as a code: for example rejected, timeout, invalid_address, bounce_permanent, bounce_suppressed (the address is on the suppression list of Flashpi’s email provider after an earlier bounce or complaint), complaint, account_email_limit_reached (the account’s emails of the day were used up; nothing was sent), platform_email_limit_reached (Flashpi’s emails of the day across all accounts were used up; nothing was sent), email_sending_paused (the account’s emails of the mode are paused; nothing was sent), platform_email_sending_paused (Flashpi paused the emails of its email provider for every account after too many bounces or complaints; nothing was sent), test_recipient_not_allowed (a test document whose recipient is not a verified member of the account’s team; nothing was sent: download the RIDE and the XML to send them) or invalid_domain (the recipient’s domain does not exist or receives no mail: no MX, A or AAAA record, or a null MX; nothing was sent).
Warnings about the recipient’s address, computed when the document is read: empty when nothing looks wrong.
Something about the email that looks wrong. A warning never stops or changes the email.
object
recipient_domain_typo: the recipient’s domain looks like a typo of a common mail domain (for example gmial.com for gmail.com). The email is still sent to the address as given; nothing changes it.
Follows Accept-Language (English or Spanish).
The address with the suggested domain.
Messages of the last SRI answer, mapped to Flashpi codes (the reasons of a rejection, or warnings of an authorization). Texts follow Accept-Language (English or Spanish).
A message of the SRI, mapped by Flashpi.
object
Flashpi error code.
Example
{ "id": "01a13fdf-9620-77a7-a18e-0b13542f5fed", "type": "invoice", "environment": "test", "status": "processing", "establishment": "001", "emissionPoint": "001", "sequential": 123, "number": "001-001-000000123", "accessKey": "1510202601179000000000110010010000001234152637411", "issueDate": "2026-10-15", "xmlVersion": "2.1.0", "counterparty": { "id": "1790000000001", "name": "Supermercados La Pradera S.A." }, "totals": { "subtotal": "60.31", "discount": "0.75", "taxes": [ { "type": "vat", "rate": "15", "code": "3031", "taxableBase": "57.50", "amount": "8.63" } ], "tip": "0.00", "total": "68.94", "withheld": "62.50" }, "authorization": { "number": null, "authorizedAt": null }, "ride": { "status": "pending", "template": "modern", "generatedAt": null }, "email": { "requested": true, "status": "not_requested", "deliveries": [ { "recipient": "compras@example.com", "status": "queued", "error": null } ], "warnings": [ { "code": "recipient_domain_typo", "message": "The recipient's email address may be mistyped: did you mean compras@gmail.com?", "suggestedRecipient": "compras@gmail.com" } ] }, "sriMessages": [ { "code": "calculation_mismatch", "message": "The SRI found differences in the calculations.", "severity": "error" } ], "failure": { "code": "certificate_required", "message": "The issuer has no accepted signing certificate for this mode. Upload its .p12 certificate and issue the document again." }}Headers
Section titled “Headers”Path of the document: /v1/documents/{id}. Not sent on an idempotent replay (Idempotent-Replayed: true): build it from the body as shown.
true when this is the stored answer of an earlier request with the same Idempotency-Key (same status and body, no Location). Absent otherwise.
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.
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
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.
Localized summary of the type.
HTTP status code.
Localized explanation of this occurrence.
Path of the request.
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.
Field-level errors (may be empty).
object
Path of the invalid field.
Stable machine-readable reason. New codes may be added: treat an unknown one like invalid_value.
Localized message.
Request ID (UUIDv7); include it when contacting support.
idempotency_key_reused: the document the Idempotency-Key already created.
The daily limit that was reached (email_resend_limit_reached, account_email_limit_reached, demo_issuer_quota_exceeded).
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.
ride_not_available: the status of the RIDE.
document_not_authorized: the status of the document.
email_sending_paused: the mode whose email sending is paused.
total_mismatch: the expectedTotal you sent.
total_mismatch: the total Flashpi computed.
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.
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
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.
Localized summary of the type.
HTTP status code.
Localized explanation of this occurrence.
Path of the request.
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.
Field-level errors (may be empty).
object
Path of the invalid field.
Stable machine-readable reason. New codes may be added: treat an unknown one like invalid_value.
Localized message.
Request ID (UUIDv7); include it when contacting support.
idempotency_key_reused: the document the Idempotency-Key already created.
The daily limit that was reached (email_resend_limit_reached, account_email_limit_reached, demo_issuer_quota_exceeded).
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.
ride_not_available: the status of the RIDE.
document_not_authorized: the status of the document.
email_sending_paused: the mode whose email sending is paused.
total_mismatch: the expectedTotal you sent.
total_mismatch: the total Flashpi computed.
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"}Headers
Section titled “Headers”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). Or sandbox_not_enabled: issuerId is the shared demo issuer (sandbox) and the account’s sandbox is not enabled yet (its owner has not verified their email).
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
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.
Localized summary of the type.
HTTP status code.
Localized explanation of this occurrence.
Path of the request.
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.
Field-level errors (may be empty).
object
Path of the invalid field.
Stable machine-readable reason. New codes may be added: treat an unknown one like invalid_value.
Localized message.
Request ID (UUIDv7); include it when contacting support.
idempotency_key_reused: the document the Idempotency-Key already created.
The daily limit that was reached (email_resend_limit_reached, account_email_limit_reached, demo_issuer_quota_exceeded).
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.
ride_not_available: the status of the RIDE.
document_not_authorized: the status of the document.
email_sending_paused: the mode whose email sending is paused.
total_mismatch: the expectedTotal you sent.
total_mismatch: the total Flashpi computed.
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"}Sequential_already_used: the requested sequential is taken. sequentials_exhausted: the emission point reached sequential 999999999 for this document type. Or idempotency_key_in_progress: a request with this Idempotency-Key is still running.
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
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.
Localized summary of the type.
HTTP status code.
Localized explanation of this occurrence.
Path of the request.
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.
Field-level errors (may be empty).
object
Path of the invalid field.
Stable machine-readable reason. New codes may be added: treat an unknown one like invalid_value.
Localized message.
Request ID (UUIDv7); include it when contacting support.
idempotency_key_reused: the document the Idempotency-Key already created.
The daily limit that was reached (email_resend_limit_reached, account_email_limit_reached, demo_issuer_quota_exceeded).
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.
ride_not_available: the status of the RIDE.
document_not_authorized: the status of the document.
email_sending_paused: the mode whose email sending is paused.
total_mismatch: the expectedTotal you sent.
total_mismatch: the total Flashpi computed.
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.
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
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.
Localized summary of the type.
HTTP status code.
Localized explanation of this occurrence.
Path of the request.
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.
Field-level errors (may be empty).
object
Path of the invalid field.
Stable machine-readable reason. New codes may be added: treat an unknown one like invalid_value.
Localized message.
Request ID (UUIDv7); include it when contacting support.
idempotency_key_reused: the document the Idempotency-Key already created.
The daily limit that was reached (email_resend_limit_reached, account_email_limit_reached, demo_issuer_quota_exceeded).
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.
ride_not_available: the status of the RIDE.
document_not_authorized: the status of the document.
email_sending_paused: the mode whose email sending is paused.
total_mismatch: the expectedTotal you sent.
total_mismatch: the total Flashpi computed.
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.
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
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.
Localized summary of the type.
HTTP status code.
Localized explanation of this occurrence.
Path of the request.
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.
Field-level errors (may be empty).
object
Path of the invalid field.
Stable machine-readable reason. New codes may be added: treat an unknown one like invalid_value.
Localized message.
Request ID (UUIDv7); include it when contacting support.
idempotency_key_reused: the document the Idempotency-Key already created.
The daily limit that was reached (email_resend_limit_reached, account_email_limit_reached, demo_issuer_quota_exceeded).
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.
ride_not_available: the status of the RIDE.
document_not_authorized: the status of the document.
email_sending_paused: the mode whose email sending is paused.
total_mismatch: the expectedTotal you sent.
total_mismatch: the total Flashpi computed.
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; for example invalid_check_digit, final_consumer_not_allowed, not_in_force, unsupported_character, too_many_additional_fields, amount_mismatch, out_of_range for a sync wait above the maximum, demo_issuer_test_only or demo_issuer_sequential_not_allowed with the demo issuer), total_mismatch (expectedTotal differs from the computed total), document_too_large or document_schema_invalid. Or idempotency_key_reused: the Idempotency-Key was used with a different request.
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
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.
Localized summary of the type.
HTTP status code.
Localized explanation of this occurrence.
Path of the request.
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.
Field-level errors (may be empty).
object
Path of the invalid field.
Stable machine-readable reason. New codes may be added: treat an unknown one like invalid_value.
Localized message.
Request ID (UUIDv7); include it when contacting support.
idempotency_key_reused: the document the Idempotency-Key already created.
The daily limit that was reached (email_resend_limit_reached, account_email_limit_reached, demo_issuer_quota_exceeded).
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.
ride_not_available: the status of the RIDE.
document_not_authorized: the status of the document.
email_sending_paused: the mode whose email sending is paused.
total_mismatch: the expectedTotal you sent.
total_mismatch: the total Flashpi computed.
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"}demo_issuer_quota_exceeded: issuerId is the shared demo issuer (sandbox) and the account already issued today’s test documents with it (days follow the calendar in Ecuador). It carries Retry-After, limit and resetsAt; use your own issuer to issue more.
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
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.
Localized summary of the type.
HTTP status code.
Localized explanation of this occurrence.
Path of the request.
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.
Field-level errors (may be empty).
object
Path of the invalid field.
Stable machine-readable reason. New codes may be added: treat an unknown one like invalid_value.
Localized message.
Request ID (UUIDv7); include it when contacting support.
idempotency_key_reused: the document the Idempotency-Key already created.
The daily limit that was reached (email_resend_limit_reached, account_email_limit_reached, demo_issuer_quota_exceeded).
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.
ride_not_available: the status of the RIDE.
document_not_authorized: the status of the document.
email_sending_paused: the mode whose email sending is paused.
total_mismatch: the expectedTotal you sent.
total_mismatch: the total Flashpi computed.
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"}Headers
Section titled “Headers”Whole seconds to wait before trying again.
demo_issuer_unavailable: issuerId is the shared demo issuer (sandbox) and it cannot sign test documents now (no usable test certificate). Nothing is created; retry later or use your own issuer.
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
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.
Localized summary of the type.
HTTP status code.
Localized explanation of this occurrence.
Path of the request.
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.
Field-level errors (may be empty).
object
Path of the invalid field.
Stable machine-readable reason. New codes may be added: treat an unknown one like invalid_value.
Localized message.
Request ID (UUIDv7); include it when contacting support.
idempotency_key_reused: the document the Idempotency-Key already created.
The daily limit that was reached (email_resend_limit_reached, account_email_limit_reached, demo_issuer_quota_exceeded).
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.
ride_not_available: the status of the RIDE.
document_not_authorized: the status of the document.
email_sending_paused: the mode whose email sending is paused.
total_mismatch: the expectedTotal you sent.
total_mismatch: the total Flashpi computed.
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"}