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