@beliq/sdk 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,1835 +1,6 @@
1
- import { P as PlainObject, a as DocumentInput } from './constants-DFGl_MXW.js';
2
- export { D as DEFAULT_BASE_URL, n as DEFAULT_MAX_RETRIES, o as DEFAULT_TIMEOUT_MS, G as GeneratePreset, L as LIVE_CONVERT_SOURCE_FORMATS, b as LIVE_CONVERT_TARGET_FORMATS, c as LIVE_GENERATE_PRESETS, d as LIVE_GENERATE_STANDARDS, e as LIVE_PARSE_FORMATS, f as LIVE_PROFILES, g as LIVE_PROFILES_BY_STANDARD, h as LIVE_VALIDATE_FORMATS, l as isProfileAllowedForStandard, p as profilesForStandard } from './constants-DFGl_MXW.js';
3
-
4
- interface components {
5
- schemas: {
6
- InvoiceLine: {
7
- description: string;
8
- quantity: number;
9
- unitCode: string;
10
- unitPrice: number;
11
- lineTotal: number;
12
- vatRate: number;
13
- vatCategoryCode: string;
14
- itemId?: string;
15
- buyerItemId?: string;
16
- grossPrice?: number;
17
- priceDiscount?: number;
18
- priceBaseQuantity?: number;
19
- standardItemId?: {
20
- id: string;
21
- schemeId: string;
22
- };
23
- classifications?: {
24
- code: string;
25
- listId: string;
26
- listVersionId?: string;
27
- }[];
28
- originCountryCode?: string;
29
- attributes?: {
30
- name: string;
31
- value: string;
32
- }[];
33
- allowances?: {
34
- amount: number;
35
- baseAmount?: number;
36
- percentage?: number;
37
- reason?: string;
38
- reasonCode?: string;
39
- }[];
40
- charges?: {
41
- amount: number;
42
- baseAmount?: number;
43
- percentage?: number;
44
- reason?: string;
45
- reasonCode?: string;
46
- }[];
47
- invoicingPeriod?: {
48
- startDate?: string;
49
- endDate?: string;
50
- };
51
- subLines?: components["schemas"]["InvoiceLine"][];
52
- };
53
- };
54
- responses: never;
55
- parameters: never;
56
- requestBodies: never;
57
- headers: never;
58
- pathItems: never;
59
- }
60
- interface operations {
61
- getAccount: {
62
- parameters: {
63
- query?: never;
64
- header?: never;
65
- path?: never;
66
- cookie?: never;
67
- };
68
- requestBody?: never;
69
- responses: {
70
- /** @description Default Response */
71
- 200: {
72
- headers: {
73
- /** @description "true" for a live key, "false" for a test key. Test-mode documents are watermarked and do not draw on the live monthly quota. */
74
- "x-beliq-livemode"?: string;
75
- /** @description Correlation id for this request. Quote it in a support request; it is the key the API, the engine, and error tracking all record. */
76
- "x-request-id"?: string;
77
- [name: string]: unknown;
78
- };
79
- content: {
80
- "application/json": {
81
- success: boolean;
82
- data?: {
83
- keyId: string | null;
84
- keyPrefix: string | null;
85
- /** @description False for a blq_test_ key, true otherwise. Selects which allowance the quota block below describes: a live key spends the plan quota over a window anchored on the organization billing day, a test key the flat sandbox allowance over the UTC calendar month. Mirrors the x-beliq-livemode response header, for callers that only see a parsed body. */
86
- livemode: boolean;
87
- org: {
88
- id: string;
89
- name: string;
90
- rulesetChannel: "latest" | "previous";
91
- };
92
- plan: {
93
- /** @description The subscription_plans row the organization references, or null when it references none, which is every organization on the free tier. */
94
- id: number | null;
95
- /** @description Never null. An organization that references no plan row is on the free tier and reads back under the free tier name. */
96
- name: string;
97
- };
98
- rateLimitPerMinute: number;
99
- quota: {
100
- limit: number;
101
- used: number;
102
- remaining: number;
103
- /** @description ISO 8601 UTC. The end of the window limit and used were counted over. On a live key that window is one month anchored on the organization billing day, so only an organization billed on the 1st resets at the turn of the month; on a test key it is the turn of the UTC month. */
104
- resetsAt: string;
105
- };
106
- };
107
- error?: {
108
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
109
- message: string;
110
- details?: {
111
- [key: string]: unknown;
112
- };
113
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
114
- incidentId?: string;
115
- };
116
- };
117
- };
118
- };
119
- /** @description Default Response */
120
- 401: {
121
- headers: {
122
- [name: string]: unknown;
123
- };
124
- content: {
125
- "application/json": {
126
- /** @enum {boolean} */
127
- success: false;
128
- error: {
129
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
130
- message: string;
131
- details?: {
132
- [key: string]: unknown;
133
- };
134
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
135
- incidentId?: string;
136
- };
137
- };
138
- };
139
- };
140
- /** @description Default Response */
141
- 403: {
142
- headers: {
143
- [name: string]: unknown;
144
- };
145
- content: {
146
- "application/json": {
147
- /** @enum {boolean} */
148
- success: false;
149
- error: {
150
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
151
- message: string;
152
- details?: {
153
- [key: string]: unknown;
154
- };
155
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
156
- incidentId?: string;
157
- };
158
- };
159
- };
160
- };
161
- /** @description Default Response */
162
- 429: {
163
- headers: {
164
- [name: string]: unknown;
165
- };
166
- content: {
167
- "application/json": {
168
- /** @enum {boolean} */
169
- success: false;
170
- error: {
171
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
172
- message: string;
173
- details?: {
174
- [key: string]: unknown;
175
- };
176
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
177
- incidentId?: string;
178
- };
179
- };
180
- };
181
- };
182
- };
183
- };
184
- generateInvoice: {
185
- parameters: {
186
- query?: never;
187
- header?: never;
188
- path?: never;
189
- cookie?: never;
190
- };
191
- requestBody: {
192
- content: {
193
- "application/json": {
194
- standard: "xrechnung" | "zugferd" | "facturx" | "peppol-bis" | "fatturapa" | "facturae" | "eslog" | "ksef";
195
- profile?: "minimum" | "basicwl" | "basic" | "en16931" | "extended" | "extended-ctc-fr" | "xrechnung" | "peppol" | "romania-ro-cius" | "netherlands-nlcius" | "ordinaria" | "eracun" | "fa3";
196
- facturxProfile?: "minimum" | "basicwl" | "basic" | "en16931" | "extended" | "extended-ctc-fr";
197
- output: "xml" | "pdf";
198
- invoice: {
199
- number: string;
200
- issueDate: string;
201
- dueDate?: string;
202
- vatPointDate?: string;
203
- vatPointDateCode?: "3" | "35" | "432";
204
- invoicingPeriod?: {
205
- startDate?: string;
206
- endDate?: string;
207
- };
208
- currencyCode: string;
209
- taxCurrencyCode?: string;
210
- taxTotalInAccountingCurrency?: number;
211
- documentType?: "invoice" | "creditnote";
212
- typeCode?: string;
213
- precedingInvoiceReference?: {
214
- id: string;
215
- issueDate?: string;
216
- };
217
- buyerReference?: string;
218
- orderReference?: string;
219
- salesOrderReference?: string;
220
- contractReference?: string;
221
- projectReference?: string;
222
- receivingAdviceReference?: string;
223
- despatchAdviceReference?: string;
224
- tenderReference?: string;
225
- invoicedObjectIdentifier?: {
226
- id: string;
227
- schemeId?: string;
228
- };
229
- buyerAccountingReference?: string;
230
- supportingDocuments?: {
231
- id: string;
232
- description?: string;
233
- externalLocation?: string;
234
- attachment?: {
235
- content: string;
236
- mimeCode: string;
237
- filename: string;
238
- };
239
- }[];
240
- note?: string;
241
- seller: {
242
- name: string;
243
- vatId?: string;
244
- taxId?: string;
245
- registrationId?: string;
246
- /** Format: email */
247
- email?: string;
248
- phone?: string;
249
- address: {
250
- street?: string;
251
- additionalStreet?: string;
252
- city: string;
253
- postalCode: string;
254
- countryCode: string;
255
- state?: string;
256
- region?: string;
257
- province?: string;
258
- countrySubentity?: string;
259
- };
260
- contactName?: string;
261
- peppol?: {
262
- schemeId: string;
263
- id: string;
264
- };
265
- };
266
- buyer: {
267
- name: string;
268
- vatId?: string;
269
- taxId?: string;
270
- registrationId?: string;
271
- /** Format: email */
272
- email?: string;
273
- phone?: string;
274
- address: {
275
- street?: string;
276
- additionalStreet?: string;
277
- city: string;
278
- postalCode: string;
279
- countryCode: string;
280
- state?: string;
281
- region?: string;
282
- province?: string;
283
- countrySubentity?: string;
284
- };
285
- contactName?: string;
286
- peppol?: {
287
- schemeId: string;
288
- id: string;
289
- };
290
- };
291
- payee?: {
292
- name: string;
293
- identifier?: {
294
- id: string;
295
- schemeId?: string;
296
- };
297
- registrationId?: string;
298
- };
299
- taxRepresentative?: {
300
- name: string;
301
- vatId: string;
302
- address: {
303
- street?: string;
304
- additionalStreet?: string;
305
- city?: string;
306
- postalCode?: string;
307
- countryCode: string;
308
- countrySubentity?: string;
309
- };
310
- };
311
- lines: {
312
- description: string;
313
- quantity: number;
314
- unitCode: string;
315
- unitPrice: number;
316
- lineTotal: number;
317
- vatRate: number;
318
- vatCategoryCode: string;
319
- itemId?: string;
320
- buyerItemId?: string;
321
- grossPrice?: number;
322
- priceDiscount?: number;
323
- priceBaseQuantity?: number;
324
- standardItemId?: {
325
- id: string;
326
- schemeId: string;
327
- };
328
- classifications?: {
329
- code: string;
330
- listId: string;
331
- listVersionId?: string;
332
- }[];
333
- originCountryCode?: string;
334
- attributes?: {
335
- name: string;
336
- value: string;
337
- }[];
338
- allowances?: {
339
- amount: number;
340
- baseAmount?: number;
341
- percentage?: number;
342
- reason?: string;
343
- reasonCode?: string;
344
- }[];
345
- charges?: {
346
- amount: number;
347
- baseAmount?: number;
348
- percentage?: number;
349
- reason?: string;
350
- reasonCode?: string;
351
- }[];
352
- invoicingPeriod?: {
353
- startDate?: string;
354
- endDate?: string;
355
- };
356
- subLines?: components["schemas"]["InvoiceLine"][];
357
- }[];
358
- taxSummary?: {
359
- vatCategoryCode: string;
360
- vatRate: number;
361
- taxableAmount: number;
362
- taxAmount: number;
363
- exemptionReasonText?: string;
364
- exemptionReasonCode?: string;
365
- }[];
366
- delivery?: {
367
- name?: string;
368
- locationId?: {
369
- schemeId?: string;
370
- id: string;
371
- };
372
- date?: string;
373
- address?: {
374
- street?: string;
375
- additionalStreet?: string;
376
- city?: string;
377
- postalCode?: string;
378
- countryCode: string;
379
- countrySubentity?: string;
380
- };
381
- };
382
- paymentMeans?: {
383
- typeCode: string;
384
- iban?: string;
385
- bic?: string;
386
- bankName?: string;
387
- paymentReference?: string;
388
- information?: string;
389
- mandateReference?: string;
390
- creditorId?: string;
391
- debitedAccountId?: string;
392
- };
393
- paymentTerms?: string;
394
- allowances?: {
395
- amount: number;
396
- baseAmount?: number;
397
- percentage?: number;
398
- reason?: string;
399
- reasonCode?: string;
400
- vatCategoryCode: string;
401
- vatRate?: number;
402
- }[];
403
- charges?: {
404
- amount: number;
405
- baseAmount?: number;
406
- percentage?: number;
407
- reason?: string;
408
- reasonCode?: string;
409
- vatCategoryCode: string;
410
- vatRate?: number;
411
- }[];
412
- totalNetAmount: number;
413
- totalTaxAmount: number;
414
- totalGrossAmount: number;
415
- paidAmount?: number;
416
- roundingAmount?: number;
417
- franceCtc?: boolean;
418
- businessProcessId?: "S8" | "B8" | "M8";
419
- italy?: {
420
- codiceDestinatario?: string;
421
- regimeFiscale?: string;
422
- progressivoInvio?: string;
423
- idTrasmittente?: {
424
- country: string;
425
- id: string;
426
- };
427
- tipoDocumento?: string;
428
- condizioniPagamento?: string;
429
- modalitaPagamento?: string;
430
- esigibilitaIVA?: string;
431
- causale?: string[];
432
- };
433
- romania?: Record<string, never>;
434
- netherlands?: Record<string, never>;
435
- spain?: {
436
- modality?: "I" | "L";
437
- invoiceIssuerType?: "EM" | "RE" | "TE";
438
- invoiceDocumentType?: string;
439
- invoiceClass?: string;
440
- taxTypeCode?: string;
441
- languageName?: string;
442
- batchIdentifier?: string;
443
- seller?: {
444
- personTypeCode?: "J" | "F";
445
- residenceTypeCode?: "R" | "U" | "E";
446
- };
447
- buyer?: {
448
- personTypeCode?: "J" | "F";
449
- residenceTypeCode?: "R" | "U" | "E";
450
- };
451
- };
452
- slovenia?: Record<string, never>;
453
- poland?: {
454
- adnotacje?: {
455
- P_16?: "1" | "2";
456
- P_17?: "1" | "2";
457
- P_18?: "1" | "2";
458
- P_18A?: "1" | "2";
459
- P_23?: "1" | "2";
460
- };
461
- dataWytworzenia?: string;
462
- placeOfIssue?: string;
463
- jst?: "1" | "2";
464
- gv?: "1" | "2";
465
- };
466
- };
467
- verify?: boolean;
468
- /** @enum {string} */
469
- template?: "standard";
470
- pdfTemplateId?: string;
471
- };
472
- };
473
- };
474
- responses: {
475
- /** @description Default Response */
476
- 200: {
477
- headers: {
478
- /** @description Document syntax the engine detected: "ubl" or "cii". */
479
- "x-syntax"?: string;
480
- /** @description CIUS/profile the engine matched, e.g. "xrechnung_3.0". */
481
- "x-profile-detected"?: string;
482
- /** @description Version of the Schematron ruleset that produced the verdict. */
483
- "x-schematron-version"?: string;
484
- /** @description SHA-256 fingerprint of the rule artifacts the engine ran. Reproduce it from x-ruleset-artifacts to confirm the ruleset that judged you is the one beliq publicly pins (see GET /v1/rulesets). */
485
- "x-ruleset-sha256"?: string;
486
- /** @description One-line verdict, e.g. "pass · 0 err · 1 warn". */
487
- "x-validation"?: string;
488
- /** @description Compact JSON naming the ruleset/artifact versions pinned for the produced format. */
489
- "x-version-block"?: string;
490
- /** @description The component rows x-ruleset-sha256 is built from, as "<key>@<version>=<fileSha256>" entries. Sort, join with newlines, and SHA-256 to reproduce the seal from published values alone. */
491
- "x-ruleset-artifacts"?: string;
492
- /** @description How the returned PDF was built: "hybrid" (PDF/A-3 with the XML embedded) or "visual" (rendered pages only). */
493
- "x-pdf-kind"?: string;
494
- /** @description "true" for a live key, "false" for a test key. Test-mode documents are watermarked and do not draw on the live monthly quota. */
495
- "x-beliq-livemode"?: string;
496
- /** @description Correlation id for this request. Quote it in a support request; it is the key the API, the engine, and error tracking all record. */
497
- "x-request-id"?: string;
498
- [name: string]: unknown;
499
- };
500
- content: {
501
- "application/xml": string;
502
- "application/pdf": string;
503
- "application/json": {
504
- success: boolean;
505
- data?: {
506
- invoiceId: string;
507
- format: string;
508
- standard: string;
509
- profile: string;
510
- validationResult: {
511
- /** @description Whether the document was verified as valid. Read together with `verified`: `valid: false` with `verified: false` means no ruleset ran, not that the document failed. */
512
- valid: boolean;
513
- /** @description Whether a ruleset actually executed. `false` only when `verify: false` skipped validation, in which case `errors` and `warnings` are empty because nothing looked at the document. */
514
- verified?: boolean;
515
- format: "cii" | "ubl" | "fatturapa" | "facturae" | "eslog" | "sdi_messaggio" | "poland_ksef_fa2" | "poland_ksef_fa3" | "unknown";
516
- sha256?: string;
517
- rulesetSha256?: string;
518
- rulesetArtifacts?: {
519
- key: string;
520
- version: string;
521
- fileSha256: string;
522
- }[];
523
- /** Format: date-time */
524
- driftCheckedAt?: string;
525
- profileDetected?: string;
526
- verificationTier?: "conformance-verified" | "builder-round-trip" | "reconstructed-rules" | "xsd-structural";
527
- verificationBadge?: "authority-verified" | "independently-rule-checked" | "structure-checked";
528
- /** @description English display text for `verificationBadge`: the label the English coverage cards and the docs show for that badge. Print it as it is. Compare `verificationBadge`, not this string. */
529
- verificationBadgeLabel?: string;
530
- schematronVersion?: string;
531
- ciusVersion?: string;
532
- peppolVersion?: string;
533
- facturxProfile?: string;
534
- facturxVersion?: string;
535
- franceCtcApplied?: boolean;
536
- franceCtcVersion?: string;
537
- franceExtendedCtcApplied?: boolean;
538
- franceCtcBlockingRuleIds?: string[];
539
- italyFatturapaXsdBundle?: string;
540
- italyFatturapaRuntimeVersion?: string;
541
- italySdiMessaggiXsdBundle?: string;
542
- italySdiMessaggiXsdVersion?: string;
543
- spainFacturaeXsdBundle?: string;
544
- spainFacturaeRuntimeVersion?: string;
545
- sloveniaEslogXsdBundle?: string;
546
- sloveniaEslogRuntimeVersion?: string;
547
- polandKsefFa3XsdBundle?: string;
548
- polandKsefFa3RuntimeVersion?: string;
549
- romaniaRoCiusVersion?: string;
550
- netherlandsNlciusVersion?: string;
551
- rulesetChannel?: "latest" | "previous";
552
- /** @description True when `previous` was requested and the format had nothing for the channel to reach, so the request ran what `latest` would have run. Either nothing is retained, or what is retained has been superseded by the authority making its successor mandatory. A superseded version is still reachable by an exact pin. Present only alongside `rulesetChannel`. */
553
- rulesetFellBack?: boolean;
554
- /**
555
- * Format: date
556
- * @description ISO date the retained ruleset serving this request stops being served. Present only when a retained ruleset ran (never on a default request); the earliest date when several ran. After it an exact pin 422s. It bounds the pin, not the channel: `previous` stops reaching the version on this date or on the authority's mandatory date for the successor, whichever comes first.
557
- */
558
- rulesetSunsetsOn?: string;
559
- /** @description Present only when the document sent to `POST /v1/validate` was a PDF: which embedded file the verdict is about, and that the PDF around it was not checked. */
560
- pdfInput?: {
561
- /**
562
- * @description Always `false`. Nothing checked the PDF itself: not its PDF/A conformance, not its XMP metadata, not how the invoice file is attached. The verdict is about the embedded XML only.
563
- * @enum {boolean}
564
- */
565
- containerChecked: false;
566
- /** @description Name of the embedded file whose XML was read, as the PDF states it. Left out when that name is longer than 255 UTF-16 code units, or holds U+0000 or half of a surrogate pair. */
567
- attachmentName?: string;
568
- /** @description How that file was picked. The steps are tried in this order, and a step whose first file cannot be read hands over to the next. `associated-file`: the first entry of the catalog's `/AF` array under a known invoice attachment name. `embedded-file`: the first entry of the `/EmbeddedFiles` name tree under such a name. `xml-content`: the first `*.xml` file whose content starts like an invoice, whatever its name. */
569
- attachmentFoundBy: "associated-file" | "embedded-file" | "xml-content";
570
- /** @description How many embedded files the step in `attachmentFoundBy` accepts, the one that was read included. Above 1, the PDF holds another file that could be taken for the invoice, and nothing compared the two. */
571
- attachmentCandidates: number;
572
- };
573
- errors: {
574
- ruleId: string;
575
- severity: "fatal" | "error" | "warning" | "info";
576
- location?: string;
577
- message: string;
578
- }[];
579
- warnings: {
580
- ruleId: string;
581
- severity: "fatal" | "error" | "warning" | "info";
582
- location?: string;
583
- message: string;
584
- }[];
585
- };
586
- output?: string;
587
- outputFormat?: string;
588
- contentType?: string;
589
- sha256?: string;
590
- pdfKind?: string;
591
- };
592
- error?: {
593
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
594
- message: string;
595
- details?: {
596
- [key: string]: unknown;
597
- };
598
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
599
- incidentId?: string;
600
- };
601
- };
602
- };
603
- };
604
- /** @description Default Response */
605
- 400: {
606
- headers: {
607
- [name: string]: unknown;
608
- };
609
- content: {
610
- "application/json": {
611
- /** @enum {boolean} */
612
- success: false;
613
- error: {
614
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
615
- message: string;
616
- details?: {
617
- [key: string]: unknown;
618
- };
619
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
620
- incidentId?: string;
621
- };
622
- };
623
- };
624
- };
625
- /** @description Default Response */
626
- 401: {
627
- headers: {
628
- [name: string]: unknown;
629
- };
630
- content: {
631
- "application/json": {
632
- /** @enum {boolean} */
633
- success: false;
634
- error: {
635
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
636
- message: string;
637
- details?: {
638
- [key: string]: unknown;
639
- };
640
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
641
- incidentId?: string;
642
- };
643
- };
644
- };
645
- };
646
- /** @description Default Response */
647
- 403: {
648
- headers: {
649
- [name: string]: unknown;
650
- };
651
- content: {
652
- "application/json": {
653
- /** @enum {boolean} */
654
- success: false;
655
- error: {
656
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
657
- message: string;
658
- details?: {
659
- [key: string]: unknown;
660
- };
661
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
662
- incidentId?: string;
663
- };
664
- };
665
- };
666
- };
667
- /** @description Default Response */
668
- 404: {
669
- headers: {
670
- [name: string]: unknown;
671
- };
672
- content: {
673
- "application/json": {
674
- /** @enum {boolean} */
675
- success: false;
676
- error: {
677
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
678
- message: string;
679
- details?: {
680
- [key: string]: unknown;
681
- };
682
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
683
- incidentId?: string;
684
- };
685
- };
686
- };
687
- };
688
- /** @description Default Response */
689
- 413: {
690
- headers: {
691
- [name: string]: unknown;
692
- };
693
- content: {
694
- "application/json": {
695
- /** @enum {boolean} */
696
- success: false;
697
- error: {
698
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
699
- message: string;
700
- details?: {
701
- [key: string]: unknown;
702
- };
703
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
704
- incidentId?: string;
705
- };
706
- };
707
- };
708
- };
709
- /** @description Default Response */
710
- 422: {
711
- headers: {
712
- [name: string]: unknown;
713
- };
714
- content: {
715
- "application/json": {
716
- /** @enum {boolean} */
717
- success: false;
718
- error: {
719
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
720
- message: string;
721
- details?: {
722
- [key: string]: unknown;
723
- };
724
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
725
- incidentId?: string;
726
- };
727
- };
728
- };
729
- };
730
- /** @description Default Response */
731
- 429: {
732
- headers: {
733
- [name: string]: unknown;
734
- };
735
- content: {
736
- "application/json": {
737
- /** @enum {boolean} */
738
- success: false;
739
- error: {
740
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
741
- message: string;
742
- details?: {
743
- [key: string]: unknown;
744
- };
745
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
746
- incidentId?: string;
747
- };
748
- };
749
- };
750
- };
751
- /** @description Default Response */
752
- 500: {
753
- headers: {
754
- [name: string]: unknown;
755
- };
756
- content: {
757
- "application/json": {
758
- /** @enum {boolean} */
759
- success: false;
760
- error: {
761
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
762
- message: string;
763
- details?: {
764
- [key: string]: unknown;
765
- };
766
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
767
- incidentId?: string;
768
- };
769
- };
770
- };
771
- };
772
- /** @description Default Response */
773
- 503: {
774
- headers: {
775
- [name: string]: unknown;
776
- };
777
- content: {
778
- "application/json": {
779
- /** @enum {boolean} */
780
- success: false;
781
- error: {
782
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
783
- message: string;
784
- details?: {
785
- [key: string]: unknown;
786
- };
787
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
788
- incidentId?: string;
789
- };
790
- };
791
- };
792
- };
793
- };
794
- };
795
- validateInvoice: {
796
- parameters: {
797
- query?: {
798
- format?: "auto" | "cii" | "ubl" | "fatturapa" | "sdi_messaggio" | "facturae" | "eslog" | "poland_ksef_fa3";
799
- franceCtc?: boolean;
800
- };
801
- header?: {
802
- /** @description Pin the validation ruleset for this request. A channel ("latest" or "previous"), or a comma-separated list of exact per-format pins as "<artifactKey>:<version>" (e.g. "xrechnung_schematron:2.4.0"). The two forms are mutually exclusive. Default (no header) uses "latest". Effective on this route only: parse/generate/convert accept but ignore it. The applied ruleset is echoed in the Beliq-Ruleset-Resolved response header; see GET /v1/rulesets for selectable channels. */
803
- "Beliq-Ruleset"?: string;
804
- };
805
- path?: never;
806
- cookie?: never;
807
- };
808
- requestBody: {
809
- content: {
810
- "application/xml": unknown;
811
- "text/xml": unknown;
812
- "application/octet-stream": unknown;
813
- "application/pdf": unknown;
814
- };
815
- };
816
- responses: {
817
- /** @description Default Response */
818
- 200: {
819
- headers: {
820
- /** @description Document syntax the engine detected: "ubl" or "cii". */
821
- "x-syntax"?: string;
822
- /** @description CIUS/profile the engine matched, e.g. "xrechnung_3.0". */
823
- "x-profile-detected"?: string;
824
- /** @description Version of the Schematron ruleset that produced the verdict. */
825
- "x-schematron-version"?: string;
826
- /** @description SHA-256 fingerprint of the rule artifacts the engine ran. Reproduce it from x-ruleset-artifacts to confirm the ruleset that judged you is the one beliq publicly pins (see GET /v1/rulesets). */
827
- "x-ruleset-sha256"?: string;
828
- /** @description One-line verdict, e.g. "pass · 0 err · 1 warn". */
829
- "x-validation"?: string;
830
- /** @description The ruleset selection that actually applied, echoed back when the request carried a Beliq-Ruleset header. Reveals a "previous"→"latest" fallback. */
831
- "beliq-ruleset-resolved"?: string;
832
- /** @description "true" for a live key, "false" for a test key. Test-mode documents are watermarked and do not draw on the live monthly quota. */
833
- "x-beliq-livemode"?: string;
834
- /** @description Correlation id for this request. Quote it in a support request; it is the key the API, the engine, and error tracking all record. */
835
- "x-request-id"?: string;
836
- [name: string]: unknown;
837
- };
838
- content: {
839
- "application/json": {
840
- success: boolean;
841
- data?: {
842
- /** @description Whether the document was verified as valid. Read together with `verified`: `valid: false` with `verified: false` means no ruleset ran, not that the document failed. */
843
- valid: boolean;
844
- /** @description Whether a ruleset actually executed. `false` only when `verify: false` skipped validation, in which case `errors` and `warnings` are empty because nothing looked at the document. */
845
- verified?: boolean;
846
- format: "cii" | "ubl" | "fatturapa" | "facturae" | "eslog" | "sdi_messaggio" | "poland_ksef_fa2" | "poland_ksef_fa3" | "unknown";
847
- sha256?: string;
848
- rulesetSha256?: string;
849
- rulesetArtifacts?: {
850
- key: string;
851
- version: string;
852
- fileSha256: string;
853
- }[];
854
- /** Format: date-time */
855
- driftCheckedAt?: string;
856
- profileDetected?: string;
857
- verificationTier?: "conformance-verified" | "builder-round-trip" | "reconstructed-rules" | "xsd-structural";
858
- verificationBadge?: "authority-verified" | "independently-rule-checked" | "structure-checked";
859
- /** @description English display text for `verificationBadge`: the label the English coverage cards and the docs show for that badge. Print it as it is. Compare `verificationBadge`, not this string. */
860
- verificationBadgeLabel?: string;
861
- schematronVersion?: string;
862
- ciusVersion?: string;
863
- peppolVersion?: string;
864
- facturxProfile?: string;
865
- facturxVersion?: string;
866
- franceCtcApplied?: boolean;
867
- franceCtcVersion?: string;
868
- franceExtendedCtcApplied?: boolean;
869
- franceCtcBlockingRuleIds?: string[];
870
- italyFatturapaXsdBundle?: string;
871
- italyFatturapaRuntimeVersion?: string;
872
- italySdiMessaggiXsdBundle?: string;
873
- italySdiMessaggiXsdVersion?: string;
874
- spainFacturaeXsdBundle?: string;
875
- spainFacturaeRuntimeVersion?: string;
876
- sloveniaEslogXsdBundle?: string;
877
- sloveniaEslogRuntimeVersion?: string;
878
- polandKsefFa3XsdBundle?: string;
879
- polandKsefFa3RuntimeVersion?: string;
880
- romaniaRoCiusVersion?: string;
881
- netherlandsNlciusVersion?: string;
882
- rulesetChannel?: "latest" | "previous";
883
- /** @description True when `previous` was requested and the format had nothing for the channel to reach, so the request ran what `latest` would have run. Either nothing is retained, or what is retained has been superseded by the authority making its successor mandatory. A superseded version is still reachable by an exact pin. Present only alongside `rulesetChannel`. */
884
- rulesetFellBack?: boolean;
885
- /**
886
- * Format: date
887
- * @description ISO date the retained ruleset serving this request stops being served. Present only when a retained ruleset ran (never on a default request); the earliest date when several ran. After it an exact pin 422s. It bounds the pin, not the channel: `previous` stops reaching the version on this date or on the authority's mandatory date for the successor, whichever comes first.
888
- */
889
- rulesetSunsetsOn?: string;
890
- /** @description Present only when the document sent to `POST /v1/validate` was a PDF: which embedded file the verdict is about, and that the PDF around it was not checked. */
891
- pdfInput?: {
892
- /**
893
- * @description Always `false`. Nothing checked the PDF itself: not its PDF/A conformance, not its XMP metadata, not how the invoice file is attached. The verdict is about the embedded XML only.
894
- * @enum {boolean}
895
- */
896
- containerChecked: false;
897
- /** @description Name of the embedded file whose XML was read, as the PDF states it. Left out when that name is longer than 255 UTF-16 code units, or holds U+0000 or half of a surrogate pair. */
898
- attachmentName?: string;
899
- /** @description How that file was picked. The steps are tried in this order, and a step whose first file cannot be read hands over to the next. `associated-file`: the first entry of the catalog's `/AF` array under a known invoice attachment name. `embedded-file`: the first entry of the `/EmbeddedFiles` name tree under such a name. `xml-content`: the first `*.xml` file whose content starts like an invoice, whatever its name. */
900
- attachmentFoundBy: "associated-file" | "embedded-file" | "xml-content";
901
- /** @description How many embedded files the step in `attachmentFoundBy` accepts, the one that was read included. Above 1, the PDF holds another file that could be taken for the invoice, and nothing compared the two. */
902
- attachmentCandidates: number;
903
- };
904
- errors: {
905
- ruleId: string;
906
- severity: "fatal" | "error" | "warning" | "info";
907
- location?: string;
908
- message: string;
909
- }[];
910
- warnings: {
911
- ruleId: string;
912
- severity: "fatal" | "error" | "warning" | "info";
913
- location?: string;
914
- message: string;
915
- }[];
916
- };
917
- error?: {
918
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
919
- message: string;
920
- details?: {
921
- [key: string]: unknown;
922
- };
923
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
924
- incidentId?: string;
925
- };
926
- };
927
- };
928
- };
929
- /** @description Default Response */
930
- 400: {
931
- headers: {
932
- [name: string]: unknown;
933
- };
934
- content: {
935
- "application/json": {
936
- /** @enum {boolean} */
937
- success: false;
938
- error: {
939
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
940
- message: string;
941
- details?: {
942
- [key: string]: unknown;
943
- };
944
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
945
- incidentId?: string;
946
- };
947
- };
948
- };
949
- };
950
- /** @description Default Response */
951
- 401: {
952
- headers: {
953
- [name: string]: unknown;
954
- };
955
- content: {
956
- "application/json": {
957
- /** @enum {boolean} */
958
- success: false;
959
- error: {
960
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
961
- message: string;
962
- details?: {
963
- [key: string]: unknown;
964
- };
965
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
966
- incidentId?: string;
967
- };
968
- };
969
- };
970
- };
971
- /** @description Default Response */
972
- 403: {
973
- headers: {
974
- [name: string]: unknown;
975
- };
976
- content: {
977
- "application/json": {
978
- /** @enum {boolean} */
979
- success: false;
980
- error: {
981
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
982
- message: string;
983
- details?: {
984
- [key: string]: unknown;
985
- };
986
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
987
- incidentId?: string;
988
- };
989
- };
990
- };
991
- };
992
- /** @description Default Response */
993
- 413: {
994
- headers: {
995
- [name: string]: unknown;
996
- };
997
- content: {
998
- "application/json": {
999
- /** @enum {boolean} */
1000
- success: false;
1001
- error: {
1002
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1003
- message: string;
1004
- details?: {
1005
- [key: string]: unknown;
1006
- };
1007
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1008
- incidentId?: string;
1009
- };
1010
- };
1011
- };
1012
- };
1013
- /** @description Default Response */
1014
- 415: {
1015
- headers: {
1016
- [name: string]: unknown;
1017
- };
1018
- content: {
1019
- "application/json": {
1020
- /** @enum {boolean} */
1021
- success: false;
1022
- error: {
1023
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1024
- message: string;
1025
- details?: {
1026
- [key: string]: unknown;
1027
- };
1028
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1029
- incidentId?: string;
1030
- };
1031
- };
1032
- };
1033
- };
1034
- /** @description Default Response */
1035
- 422: {
1036
- headers: {
1037
- [name: string]: unknown;
1038
- };
1039
- content: {
1040
- "application/json": {
1041
- /** @enum {boolean} */
1042
- success: false;
1043
- error: {
1044
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1045
- message: string;
1046
- details?: {
1047
- [key: string]: unknown;
1048
- };
1049
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1050
- incidentId?: string;
1051
- };
1052
- };
1053
- };
1054
- };
1055
- /** @description Default Response */
1056
- 429: {
1057
- headers: {
1058
- [name: string]: unknown;
1059
- };
1060
- content: {
1061
- "application/json": {
1062
- /** @enum {boolean} */
1063
- success: false;
1064
- error: {
1065
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1066
- message: string;
1067
- details?: {
1068
- [key: string]: unknown;
1069
- };
1070
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1071
- incidentId?: string;
1072
- };
1073
- };
1074
- };
1075
- };
1076
- /** @description Default Response */
1077
- 503: {
1078
- headers: {
1079
- [name: string]: unknown;
1080
- };
1081
- content: {
1082
- "application/json": {
1083
- /** @enum {boolean} */
1084
- success: false;
1085
- error: {
1086
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1087
- message: string;
1088
- details?: {
1089
- [key: string]: unknown;
1090
- };
1091
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1092
- incidentId?: string;
1093
- };
1094
- };
1095
- };
1096
- };
1097
- };
1098
- };
1099
- parseInvoice: {
1100
- parameters: {
1101
- query?: {
1102
- /** @description Checked against the allowed values, otherwise ignored. Detection is always automatic: the syntax is read from the document itself. */
1103
- format?: "auto" | "cii" | "ubl" | "fatturapa" | "sdi_messaggio" | "facturae" | "eslog" | "poland_ksef_fa3";
1104
- };
1105
- header?: never;
1106
- path?: never;
1107
- cookie?: never;
1108
- };
1109
- requestBody: {
1110
- content: {
1111
- "application/xml": unknown;
1112
- "text/xml": unknown;
1113
- "application/octet-stream": unknown;
1114
- "application/pdf": unknown;
1115
- };
1116
- };
1117
- responses: {
1118
- /** @description Default Response */
1119
- 200: {
1120
- headers: {
1121
- /** @description Document syntax the engine detected: "ubl" or "cii". */
1122
- "x-syntax"?: string;
1123
- /** @description CIUS/profile the engine matched, e.g. "xrechnung_3.0". */
1124
- "x-profile-detected"?: string;
1125
- /** @description Version of the Schematron ruleset that produced the verdict. */
1126
- "x-schematron-version"?: string;
1127
- /** @description SHA-256 fingerprint of the rule artifacts the engine ran. Reproduce it from x-ruleset-artifacts to confirm the ruleset that judged you is the one beliq publicly pins (see GET /v1/rulesets). */
1128
- "x-ruleset-sha256"?: string;
1129
- /** @description One-line verdict, e.g. "pass · 0 err · 1 warn". */
1130
- "x-validation"?: string;
1131
- /** @description "true" for a live key, "false" for a test key. Test-mode documents are watermarked and do not draw on the live monthly quota. */
1132
- "x-beliq-livemode"?: string;
1133
- /** @description Correlation id for this request. Quote it in a support request; it is the key the API, the engine, and error tracking all record. */
1134
- "x-request-id"?: string;
1135
- [name: string]: unknown;
1136
- };
1137
- content: {
1138
- "application/json": {
1139
- success: boolean;
1140
- data?: {
1141
- format: "cii" | "ubl";
1142
- profileDetected?: string;
1143
- profileUrn?: string;
1144
- businessProcessId?: string;
1145
- franceCtcDetected?: boolean;
1146
- invoice: {
1147
- number?: string;
1148
- issueDate?: string;
1149
- currencyCode?: string;
1150
- documentType?: "invoice" | "creditnote";
1151
- typeCode?: string;
1152
- buyerReference?: string;
1153
- seller?: {
1154
- name?: string;
1155
- vatId?: string;
1156
- taxId?: string;
1157
- address?: {
1158
- street?: string;
1159
- additionalStreet?: string;
1160
- city?: string;
1161
- postalCode?: string;
1162
- countryCode?: string;
1163
- };
1164
- };
1165
- buyer?: {
1166
- name?: string;
1167
- vatId?: string;
1168
- taxId?: string;
1169
- address?: {
1170
- street?: string;
1171
- additionalStreet?: string;
1172
- city?: string;
1173
- postalCode?: string;
1174
- countryCode?: string;
1175
- };
1176
- };
1177
- lines: {
1178
- description?: string;
1179
- quantity?: number;
1180
- unitCode?: string;
1181
- unitPrice?: number;
1182
- lineTotal?: number;
1183
- vatRate?: number;
1184
- vatCategoryCode?: string;
1185
- }[];
1186
- delivery?: {
1187
- name?: string;
1188
- locationId?: {
1189
- schemeId?: string;
1190
- id: string;
1191
- };
1192
- date?: string;
1193
- address?: {
1194
- street?: string;
1195
- additionalStreet?: string;
1196
- city?: string;
1197
- postalCode?: string;
1198
- countrySubentity?: string;
1199
- countryCode?: string;
1200
- };
1201
- };
1202
- totalNetAmount?: number;
1203
- totalTaxAmount?: number;
1204
- totalGrossAmount?: number;
1205
- };
1206
- warnings: {
1207
- code: "PARSE_NOT_RETURNED" | "PARSE_VALUE_NOT_FOUND";
1208
- message: string;
1209
- field?: string;
1210
- terms?: string[];
1211
- elements?: {
1212
- path: string;
1213
- count: number;
1214
- }[];
1215
- }[];
1216
- };
1217
- error?: {
1218
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1219
- message: string;
1220
- details?: {
1221
- [key: string]: unknown;
1222
- };
1223
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1224
- incidentId?: string;
1225
- };
1226
- };
1227
- };
1228
- };
1229
- /** @description Default Response */
1230
- 400: {
1231
- headers: {
1232
- [name: string]: unknown;
1233
- };
1234
- content: {
1235
- "application/json": {
1236
- /** @enum {boolean} */
1237
- success: false;
1238
- error: {
1239
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1240
- message: string;
1241
- details?: {
1242
- [key: string]: unknown;
1243
- };
1244
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1245
- incidentId?: string;
1246
- };
1247
- };
1248
- };
1249
- };
1250
- /** @description Default Response */
1251
- 401: {
1252
- headers: {
1253
- [name: string]: unknown;
1254
- };
1255
- content: {
1256
- "application/json": {
1257
- /** @enum {boolean} */
1258
- success: false;
1259
- error: {
1260
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1261
- message: string;
1262
- details?: {
1263
- [key: string]: unknown;
1264
- };
1265
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1266
- incidentId?: string;
1267
- };
1268
- };
1269
- };
1270
- };
1271
- /** @description Default Response */
1272
- 403: {
1273
- headers: {
1274
- [name: string]: unknown;
1275
- };
1276
- content: {
1277
- "application/json": {
1278
- /** @enum {boolean} */
1279
- success: false;
1280
- error: {
1281
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1282
- message: string;
1283
- details?: {
1284
- [key: string]: unknown;
1285
- };
1286
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1287
- incidentId?: string;
1288
- };
1289
- };
1290
- };
1291
- };
1292
- /** @description Default Response */
1293
- 413: {
1294
- headers: {
1295
- [name: string]: unknown;
1296
- };
1297
- content: {
1298
- "application/json": {
1299
- /** @enum {boolean} */
1300
- success: false;
1301
- error: {
1302
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1303
- message: string;
1304
- details?: {
1305
- [key: string]: unknown;
1306
- };
1307
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1308
- incidentId?: string;
1309
- };
1310
- };
1311
- };
1312
- };
1313
- /** @description Default Response */
1314
- 415: {
1315
- headers: {
1316
- [name: string]: unknown;
1317
- };
1318
- content: {
1319
- "application/json": {
1320
- /** @enum {boolean} */
1321
- success: false;
1322
- error: {
1323
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1324
- message: string;
1325
- details?: {
1326
- [key: string]: unknown;
1327
- };
1328
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1329
- incidentId?: string;
1330
- };
1331
- };
1332
- };
1333
- };
1334
- /** @description Default Response */
1335
- 422: {
1336
- headers: {
1337
- [name: string]: unknown;
1338
- };
1339
- content: {
1340
- "application/json": {
1341
- /** @enum {boolean} */
1342
- success: false;
1343
- error: {
1344
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1345
- message: string;
1346
- details?: {
1347
- [key: string]: unknown;
1348
- };
1349
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1350
- incidentId?: string;
1351
- };
1352
- };
1353
- };
1354
- };
1355
- /** @description Default Response */
1356
- 429: {
1357
- headers: {
1358
- [name: string]: unknown;
1359
- };
1360
- content: {
1361
- "application/json": {
1362
- /** @enum {boolean} */
1363
- success: false;
1364
- error: {
1365
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1366
- message: string;
1367
- details?: {
1368
- [key: string]: unknown;
1369
- };
1370
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1371
- incidentId?: string;
1372
- };
1373
- };
1374
- };
1375
- };
1376
- /** @description Default Response */
1377
- 503: {
1378
- headers: {
1379
- [name: string]: unknown;
1380
- };
1381
- content: {
1382
- "application/json": {
1383
- /** @enum {boolean} */
1384
- success: false;
1385
- error: {
1386
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1387
- message: string;
1388
- details?: {
1389
- [key: string]: unknown;
1390
- };
1391
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1392
- incidentId?: string;
1393
- };
1394
- };
1395
- };
1396
- };
1397
- };
1398
- };
1399
- convertInvoice: {
1400
- parameters: {
1401
- query: {
1402
- sourceFormat?: "auto" | "cii" | "ubl" | "zugferd" | "facturx" | "xrechnung" | "peppol-bis";
1403
- targetFormat: "cii" | "ubl" | "zugferd" | "facturx" | "xrechnung" | "peppol-bis";
1404
- targetProfile?: "minimum" | "basicwl" | "basic" | "en16931" | "extended" | "extended-ctc-fr";
1405
- dropFranceCtcOverlay?: boolean;
1406
- };
1407
- header?: never;
1408
- path?: never;
1409
- cookie?: never;
1410
- };
1411
- requestBody: {
1412
- content: {
1413
- "application/xml": unknown;
1414
- "text/xml": unknown;
1415
- "application/octet-stream": unknown;
1416
- "application/pdf": unknown;
1417
- };
1418
- };
1419
- responses: {
1420
- /** @description Default Response */
1421
- 200: {
1422
- headers: {
1423
- /** @description Format the engine read. */
1424
- "x-source-format"?: string;
1425
- /** @description Format the engine produced. */
1426
- "x-target-format"?: string;
1427
- /** @description CIUS/profile the engine matched, e.g. "xrechnung_3.0". */
1428
- "x-profile-detected"?: string;
1429
- /** @description How many source elements the engine recorded as having no target equivalent. "0" means it recorded none. A loss the engine does not detect is not counted: the converters between CII and UBL are not checked field by field. */
1430
- "x-lost-elements-count"?: string;
1431
- /** @description JSON array naming the source elements that had no target equivalent, so a caller can decide whether the loss matters for their use. */
1432
- "x-lost-elements"?: string;
1433
- /** @description Toolchain that performed the conversion, for audit purposes. */
1434
- "x-conversion-tools"?: string;
1435
- /** @description Envelope the produced document is wrapped in, when it has one. */
1436
- "x-output-envelope"?: string;
1437
- /** @description Compact JSON naming the ruleset/artifact versions pinned for the produced format. */
1438
- "x-version-block"?: string;
1439
- /** @description "true" for a live key, "false" for a test key. Test-mode documents are watermarked and do not draw on the live monthly quota. */
1440
- "x-beliq-livemode"?: string;
1441
- /** @description Correlation id for this request. Quote it in a support request; it is the key the API, the engine, and error tracking all record. */
1442
- "x-request-id"?: string;
1443
- [name: string]: unknown;
1444
- };
1445
- content: {
1446
- "application/xml": string;
1447
- "application/pdf": string;
1448
- };
1449
- };
1450
- /** @description Default Response */
1451
- 400: {
1452
- headers: {
1453
- [name: string]: unknown;
1454
- };
1455
- content: {
1456
- "application/json": {
1457
- /** @enum {boolean} */
1458
- success: false;
1459
- error: {
1460
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1461
- message: string;
1462
- details?: {
1463
- [key: string]: unknown;
1464
- };
1465
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1466
- incidentId?: string;
1467
- };
1468
- };
1469
- };
1470
- };
1471
- /** @description Default Response */
1472
- 401: {
1473
- headers: {
1474
- [name: string]: unknown;
1475
- };
1476
- content: {
1477
- "application/json": {
1478
- /** @enum {boolean} */
1479
- success: false;
1480
- error: {
1481
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1482
- message: string;
1483
- details?: {
1484
- [key: string]: unknown;
1485
- };
1486
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1487
- incidentId?: string;
1488
- };
1489
- };
1490
- };
1491
- };
1492
- /** @description Default Response */
1493
- 403: {
1494
- headers: {
1495
- [name: string]: unknown;
1496
- };
1497
- content: {
1498
- "application/json": {
1499
- /** @enum {boolean} */
1500
- success: false;
1501
- error: {
1502
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1503
- message: string;
1504
- details?: {
1505
- [key: string]: unknown;
1506
- };
1507
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1508
- incidentId?: string;
1509
- };
1510
- };
1511
- };
1512
- };
1513
- /** @description Default Response */
1514
- 413: {
1515
- headers: {
1516
- [name: string]: unknown;
1517
- };
1518
- content: {
1519
- "application/json": {
1520
- /** @enum {boolean} */
1521
- success: false;
1522
- error: {
1523
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1524
- message: string;
1525
- details?: {
1526
- [key: string]: unknown;
1527
- };
1528
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1529
- incidentId?: string;
1530
- };
1531
- };
1532
- };
1533
- };
1534
- /** @description Default Response */
1535
- 415: {
1536
- headers: {
1537
- [name: string]: unknown;
1538
- };
1539
- content: {
1540
- "application/json": {
1541
- /** @enum {boolean} */
1542
- success: false;
1543
- error: {
1544
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1545
- message: string;
1546
- details?: {
1547
- [key: string]: unknown;
1548
- };
1549
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1550
- incidentId?: string;
1551
- };
1552
- };
1553
- };
1554
- };
1555
- /** @description Default Response */
1556
- 422: {
1557
- headers: {
1558
- [name: string]: unknown;
1559
- };
1560
- content: {
1561
- "application/json": {
1562
- /** @enum {boolean} */
1563
- success: false;
1564
- error: {
1565
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1566
- message: string;
1567
- details?: {
1568
- [key: string]: unknown;
1569
- };
1570
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1571
- incidentId?: string;
1572
- };
1573
- };
1574
- };
1575
- };
1576
- /** @description Default Response */
1577
- 429: {
1578
- headers: {
1579
- [name: string]: unknown;
1580
- };
1581
- content: {
1582
- "application/json": {
1583
- /** @enum {boolean} */
1584
- success: false;
1585
- error: {
1586
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1587
- message: string;
1588
- details?: {
1589
- [key: string]: unknown;
1590
- };
1591
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1592
- incidentId?: string;
1593
- };
1594
- };
1595
- };
1596
- };
1597
- /** @description Default Response */
1598
- 500: {
1599
- headers: {
1600
- [name: string]: unknown;
1601
- };
1602
- content: {
1603
- "application/json": {
1604
- /** @enum {boolean} */
1605
- success: false;
1606
- error: {
1607
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1608
- message: string;
1609
- details?: {
1610
- [key: string]: unknown;
1611
- };
1612
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1613
- incidentId?: string;
1614
- };
1615
- };
1616
- };
1617
- };
1618
- /** @description Default Response */
1619
- 503: {
1620
- headers: {
1621
- [name: string]: unknown;
1622
- };
1623
- content: {
1624
- "application/json": {
1625
- /** @enum {boolean} */
1626
- success: false;
1627
- error: {
1628
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1629
- message: string;
1630
- details?: {
1631
- [key: string]: unknown;
1632
- };
1633
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1634
- incidentId?: string;
1635
- };
1636
- };
1637
- };
1638
- };
1639
- };
1640
- };
1641
- getRulesets: {
1642
- parameters: {
1643
- query?: never;
1644
- header?: never;
1645
- path?: never;
1646
- cookie?: never;
1647
- };
1648
- requestBody?: never;
1649
- responses: {
1650
- /** @description Default Response */
1651
- 200: {
1652
- headers: {
1653
- /** @description Correlation id for this request. Quote it in a support request; it is the key the API, the engine, and error tracking all record. */
1654
- "x-request-id"?: string;
1655
- [name: string]: unknown;
1656
- };
1657
- content: {
1658
- "application/json": {
1659
- success: boolean;
1660
- data?: {
1661
- rulesets: {
1662
- format: string;
1663
- label: string;
1664
- standard: string;
1665
- authority: string;
1666
- region: string;
1667
- specVersion: string;
1668
- rulesetVersion: string;
1669
- rulesetArtefact: string;
1670
- versionKey: string;
1671
- /** @enum {string|null} */
1672
- verificationTier: "conformance-verified" | "builder-round-trip" | "reconstructed-rules" | "xsd-structural" | null;
1673
- rulesProvenance: "authority-conformance" | "authority-artifact" | "community" | "beliq-authored" | "none";
1674
- verificationBadge: "authority-verified" | "independently-rule-checked" | "structure-checked";
1675
- /** @description English display text for `verificationBadge`: the label the English coverage cards and the docs show for that badge. Print it as it is. Compare `verificationBadge`, not this string. */
1676
- verificationBadgeLabel: string;
1677
- releaseDate: string | null;
1678
- repo: string | null;
1679
- tag: string | null;
1680
- /** @description Versions of this format's artefact still on disk but no longer served, oldest first. Empty for a format whose artefact has never had a breaking bump, and empty for one inside a notice period, where the outgoing release is still what `rulesetVersion` names. */
1681
- retained: {
1682
- version: string;
1683
- /** @description ISO 8601 date (YYYY-MM-DD) the authority released this version, or null when it publishes none. */
1684
- releaseDate: string | null;
1685
- /** @description ISO 8601 date (YYYY-MM-DD) Beliq started serving this version as `latest`. */
1686
- servingFrom: string;
1687
- /** @description ISO 8601 date (YYYY-MM-DD) after which this version is no longer served at all, or null when nothing retires it. The last day an exact pin resolves; after it, the pin returns a 422. */
1688
- retainedUntil: string | null;
1689
- /** @description ISO 8601 date (YYYY-MM-DD) the authority made this version's successor mandatory, or null when it published no date. Once it has passed, `Beliq-Ruleset: previous` no longer resolves to this version and sets `rulesetFellBack: true`, because a document built to it is rejected by the receiving corner. An exact version pin is unaffected and still reaches it until `retainedUntil`. */
1690
- supersededMandatoryOn: string | null;
1691
- }[];
1692
- /** @description What `Beliq-Ruleset: previous` reaches for this format, one row per rule artifact in its run set that retains a version. Empty for a format whose artifacts have never had a breaking bump. A `POST /v1/validate` request on `previous` sets `rulesetFellBack: true` only when EVERY artifact fell back, so this format falls back entirely exactly when no row here has a non-null `previousVersion`. Wider than `retained[]`, which covers only this format's own `versionKey`. */
1693
- previousChannel: {
1694
- /** @description The `versions.json` artefact key this row is about. Often this format's own `versionKey`, but not always: an overlay or a severity table that runs under the format's profiles decides its `previous` too, and names no format of its own. */
1695
- versionKey: string;
1696
- /** @description The version `latest` serves for this artefact today. The other half of the pair to compare against `previousVersion`. */
1697
- servingVersion: string;
1698
- /** @description The version `Beliq-Ruleset: previous` resolves to for this artefact today, or null when the channel falls back to `latest` for it. Pin it exactly as `Beliq-Ruleset: <versionKey>:<previousVersion>` to reach it regardless. */
1699
- previousVersion: string | null;
1700
- /**
1701
- * @description Why `previous` reaches nothing for this artefact; null exactly when `previousVersion` is set. `sunset` = every retained version is past its `retainedUntil`, so not even an exact pin resolves. `notice-period` = the only retained version is the one standing in for `latest` until a scheduled bump takes effect, so there is nothing behind it yet. `superseded` = the authority made the successor mandatory, so Beliq will not choose the older ruleset on your behalf; an exact pin still reaches it until `retainedUntil`.
1702
- * @enum {string|null}
1703
- */
1704
- fallbackReason: "sunset" | "notice-period" | "superseded" | null;
1705
- }[];
1706
- }[];
1707
- channels: {
1708
- id: "latest" | "previous";
1709
- label: string;
1710
- description: string;
1711
- }[];
1712
- scheduledChanges: {
1713
- versionKey: string;
1714
- formats: string[];
1715
- capabilities: string[];
1716
- from: string;
1717
- to: string;
1718
- /** @description ISO 8601 date (YYYY-MM-DD). When `latest` moves from `from` to `to`. */
1719
- effectiveOn: string;
1720
- /** @description ISO 8601 date (YYYY-MM-DD) the change was announced in the public ruleset changelog, or null when it has not been recorded yet. */
1721
- noticePublishedOn: string | null;
1722
- /** @description ISO 8601 date (YYYY-MM-DD) after which `from` is no longer served at all, or null when nothing retires it. Later than `effectiveOn`, and the date to act on: it is when an exact pin on `from` starts returning a 422. It does not bound the `previous` channel, which stops resolving to `from` on this date or on the authority's mandatory date for `to`, whichever comes first. */
1723
- retiredOn: string | null;
1724
- }[];
1725
- artifacts: {
1726
- key: string;
1727
- version: string;
1728
- fileSha256: string;
1729
- }[];
1730
- };
1731
- error?: {
1732
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1733
- message: string;
1734
- details?: {
1735
- [key: string]: unknown;
1736
- };
1737
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1738
- incidentId?: string;
1739
- };
1740
- };
1741
- };
1742
- };
1743
- /** @description Default Response */
1744
- 429: {
1745
- headers: {
1746
- [name: string]: unknown;
1747
- };
1748
- content: {
1749
- "application/json": {
1750
- /** @enum {boolean} */
1751
- success: false;
1752
- error: {
1753
- code: "VALIDATION_ERROR" | "INVALID_INVOICE" | "PROFILE_STANDARD_MISMATCH" | "DOCUMENT_TYPE_STANDARD_MISMATCH" | "PDFA_VIOLATION" | "PARSE_FAILED" | "AUTHENTICATION_REQUIRED" | "INVALID_API_KEY" | "INSUFFICIENT_ROLE" | "QUOTA_EXCEEDED" | "RATE_LIMITED" | "ACCOUNT_THROTTLED" | "ENGINE_UNAVAILABLE" | "INTERNAL_ERROR" | "NOT_FOUND" | "CONVERSION_UNSUPPORTED_PAIR" | "CONVERSION_LOSSY_FAILCLOSED" | "CONVERSION_TOOL_UNAVAILABLE" | "CONVERSION_TOOL_ERROR" | "CONVERSION_OUTPUT_INVALID" | "PDF_TEMPLATE_AUTH_REQUIRED" | "PDF_TEMPLATE_NOT_FOUND" | "PDF_TEMPLATE_INVALID" | "TRANSMISSION_DISABLED" | "TRANSMISSION_NO_PROVIDER" | "IDEMPOTENCY_KEY_REUSED" | "INVALID_IDEMPOTENCY_KEY" | "SENDER_NOT_REGISTERED" | "CONTENT_ALREADY_SENT" | "INBOX_UNKNOWN_PROVIDER" | "INBOX_VERIFICATION_FAILED" | "INBOX_SIGNATURE_EXPIRED" | "ENROLLMENT_MODE_UNSUPPORTED" | "ENROLLMENT_REFUSED" | "RECIPIENT_NOT_ROUTABLE" | "SENDER_COUNTRY_MISSING" | "DOCUMENT_PARTY_MISMATCH" | "FRENCH_DOMESTIC_FLOW" | "FRANCE_CTC_BLOCKING_FINDINGS" | "FRANCE_CTC_NOT_JUDGED" | "FRANCE_INVOICE_NUMBER_BURNED" | "UNSUPPORTED_SYNTAX" | "MALFORMED_DOCUMENT" | "EMPTY_DOCUMENT" | "MISSING_CUSTOMIZATION_ID" | "MISSING_PROCESS_ID";
1754
- message: string;
1755
- details?: {
1756
- [key: string]: unknown;
1757
- };
1758
- /** @description Support correlation ID, present on 5xx responses only. Quote it when contacting support. */
1759
- incidentId?: string;
1760
- };
1761
- };
1762
- };
1763
- };
1764
- };
1765
- };
1766
- }
1767
-
1768
- type Json200Data<Op extends keyof operations> = operations[Op] extends {
1769
- responses: {
1770
- 200: {
1771
- content: {
1772
- 'application/json': {
1773
- data?: infer D;
1774
- };
1775
- };
1776
- };
1777
- };
1778
- } ? NonNullable<D> : never;
1779
- type Error400<Op extends keyof operations> = operations[Op] extends {
1780
- responses: {
1781
- 400: {
1782
- content: {
1783
- 'application/json': {
1784
- error: infer E;
1785
- };
1786
- };
1787
- };
1788
- };
1789
- } ? E : never;
1790
- type RequestJson<Op extends keyof operations> = operations[Op] extends {
1791
- requestBody?: {
1792
- content: {
1793
- 'application/json': infer B;
1794
- };
1795
- };
1796
- } ? B : never;
1797
- type Query<Op extends keyof operations> = NonNullable<operations[Op]['parameters']['query']>;
1798
- /** Account, plan, and quota context for the calling key (GET /v1/me). */
1799
- type AccountInfo = Json200Data<'getAccount'>;
1800
- /** Validation verdict plus the authority versions it was checked against. */
1801
- type ValidationResult = Json200Data<'validateInvoice'>;
1802
- type ValidationIssue = ValidationResult['errors'][number];
1803
- type Severity = ValidationIssue['severity'];
1804
- type ValidationFormat = ValidationResult['format'];
1805
- /**
1806
- * What POST /v1/parse read from a document. Of `invoice`, only `lines` is
1807
- * always present. Every other field is left out when the answer holds no value
1808
- * for it, so check for a field before reading it.
1809
- * https://docs.beliq.eu/api-reference/parse/ says what an absent field means.
1810
- */
1811
- type ParseResult = Json200Data<'parseInvoice'>;
1812
- /** One warning about what the document holds and the parsed invoice does not. */
1813
- type ParseWarning = ParseResult['warnings'][number];
1814
- type ParseWarningCode = ParseWarning['code'];
1815
- /** The JSON-mode generate envelope (Accept: application/json): the seal. */
1816
- type GenerateResponse = Json200Data<'generateInvoice'>;
1817
- /** One row of the ruleset fingerprint (key, version, file hash). */
1818
- type RulesetArtifact = NonNullable<ValidationResult['rulesetArtifacts']>[number];
1819
- /** The EN 16931 invoice generate accepts, and every option it carries. */
1820
- type GenerateBody = RequestJson<'generateInvoice'>;
1821
- type Invoice = GenerateBody['invoice'];
1822
- type Standard = GenerateBody['standard'];
1823
- type GenerateProfile = NonNullable<GenerateBody['profile']>;
1824
- type FacturxProfile = NonNullable<GenerateBody['facturxProfile']>;
1825
- /** The uniform error envelope and its closed code set. */
1826
- type ApiError = Error400<'validateInvoice'>;
1827
- type ApiErrorCode = ApiError['code'];
1828
- /** Query enums, faithful to what each endpoint accepts. */
1829
- type ValidateFormat = NonNullable<Query<'validateInvoice'>['format']>;
1830
- type ParseFormat = NonNullable<Query<'parseInvoice'>['format']>;
1831
- type ConvertSourceFormat = NonNullable<Query<'convertInvoice'>['sourceFormat']>;
1832
- type ConvertTargetFormat = Query<'convertInvoice'>['targetFormat'];
1
+ import { A as AccountInfo, S as Standard, I as Invoice, n as GenerateProfile, F as FacturxProfile, V as ValidationResult, R as RulesetArtifact, a as DocumentInput, o as ValidateFormat, q as ParseFormat, r as ParseResult, C as ConvertTargetFormat, u as ConvertSourceFormat, v as ApiErrorCode } from './types-Bc3c79Ss.js';
2
+ import { PlainObject } from './helpers.js';
3
+ export { w as ApiError, D as DEFAULT_BASE_URL, x as DEFAULT_MAX_RETRIES, y as DEFAULT_TIMEOUT_MS, z as GenerateBody, G as GeneratePreset, B as GenerateResponse, L as LIVE_CONVERT_SOURCE_FORMATS, b as LIVE_CONVERT_TARGET_FORMATS, c as LIVE_GENERATE_PRESETS, d as LIVE_GENERATE_STANDARDS, e as LIVE_PARSE_FORMATS, f as LIVE_PROFILES, g as LIVE_PROFILES_BY_STANDARD, h as LIVE_VALIDATE_FORMATS, E as ParseWarning, H as ParseWarningCode, J as Severity, K as ValidationFormat, M as ValidationIssue, l as isProfileAllowedForStandard, p as profilesForStandard } from './types-Bc3c79Ss.js';
1833
4
 
1834
5
  interface BeliqOptions {
1835
6
  /** API key from the beliq dashboard (API Keys). */
@@ -1881,7 +52,11 @@ interface GenerateInput {
1881
52
  interface DocumentOptions {
1882
53
  /** Override the sniffed request content type (application/xml | application/pdf). */
1883
54
  contentType?: string;
1884
- /** Raw JSON deep-merged into the query. */
55
+ /**
56
+ * Raw JSON deep-merged into the query; its values win over the named options.
57
+ * The API answers 400 `VALIDATION_ERROR` to a query key the operation does not
58
+ * declare, and `details.fields` names it.
59
+ */
1885
60
  advanced?: PlainObject;
1886
61
  }
1887
62
  interface ValidateOptions extends DocumentOptions {
@@ -1921,13 +96,29 @@ interface GenerateResult {
1921
96
  validationResult?: ValidationResult;
1922
97
  meta: GenerateMeta;
1923
98
  }
99
+ /** One loss a conversion recorded: https://docs.beliq.eu/api-reference/convert/#lostelement-schema */
100
+ interface LostElement {
101
+ path: string;
102
+ value: string | null;
103
+ reason: string;
104
+ severity: 'info' | 'warning';
105
+ acceptableLoss: boolean;
106
+ }
107
+ /**
108
+ * The one entry `lostElements` holds in place of the list when the list would pass
109
+ * the API's 6 KB header cap. `lostElementsCount` stays the exact count.
110
+ */
111
+ interface LostElementsTruncated {
112
+ truncated: true;
113
+ reason?: string;
114
+ }
1924
115
  /** Header metadata returned alongside a converted document. */
1925
116
  interface ConvertMeta {
1926
117
  sourceFormat?: string;
1927
118
  targetFormat?: string;
1928
119
  profileDetected?: string;
1929
120
  lostElementsCount?: number;
1930
- lostElements?: string[];
121
+ lostElements?: Array<LostElement | LostElementsTruncated>;
1931
122
  conversionTools?: string;
1932
123
  /** True for a live key, false for a blq_test_ sandbox key. */
1933
124
  livemode?: boolean;
@@ -1937,7 +128,7 @@ interface ConvertResult {
1937
128
  bytes: Uint8Array;
1938
129
  meta: ConvertMeta;
1939
130
  }
1940
- /** Typed client for the beliq e-invoicing compliance API. */
131
+ /** Typed client for the beliq e-invoice API. */
1941
132
  declare class Beliq {
1942
133
  #private;
1943
134
  /**
@@ -1949,9 +140,9 @@ declare class Beliq {
1949
140
  constructor(options: BeliqOptions);
1950
141
  /** Account, plan, and quota context for the key. Does not consume quota. */
1951
142
  me(): Promise<AccountInfo>;
1952
- /** Generate a compliant e-invoice from an EN 16931 object. */
143
+ /** Generate an e-invoice from an EN 16931 object. */
1953
144
  generate(input: GenerateInput): Promise<GenerateResult>;
1954
- /** Validate a document against authority-pinned rules. */
145
+ /** Validate a document. The result names the rules that ran and, in `verificationBadgeLabel` when the API states one, the check depth. */
1955
146
  validate(document: DocumentInput, options?: ValidateOptions): Promise<ValidationResult>;
1956
147
  /** Parse a document into a structured EN 16931 invoice. */
1957
148
  parse(document: DocumentInput, options?: ParseOptions): Promise<ParseResult>;
@@ -1975,4 +166,5 @@ declare class BeliqApiError extends Error {
1975
166
  });
1976
167
  }
1977
168
 
1978
- export { type AccountInfo, type ApiError, type ApiErrorCode, Beliq, BeliqApiError, type BeliqOptions, type ConvertMeta, type ConvertOptions, type ConvertResult, type ConvertSourceFormat, type ConvertTargetFormat, DocumentInput, type DocumentOptions, type FacturxProfile, type GenerateBody, type GenerateInput, type GenerateMeta, type GenerateProfile, type GenerateResponse, type GenerateResult, type Invoice, type ParseFormat, type ParseOptions, type ParseResult, type ParseWarning, type ParseWarningCode, type RulesetArtifact, type Severity, type Standard, type ValidateFormat, type ValidateOptions, type ValidationFormat, type ValidationIssue, type ValidationResult };
169
+ export { AccountInfo, ApiErrorCode, Beliq, BeliqApiError, ConvertSourceFormat, ConvertTargetFormat, DocumentInput, FacturxProfile, GenerateProfile, Invoice, ParseFormat, ParseResult, RulesetArtifact, Standard, ValidateFormat, ValidationResult };
170
+ export type { BeliqOptions, ConvertMeta, ConvertOptions, ConvertResult, DocumentOptions, GenerateInput, GenerateMeta, GenerateResult, LostElement, LostElementsTruncated, ParseOptions, ValidateOptions };