@celigo/api-specs 0.2.25 → 0.2.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editransaction.yml +10 -3
- package/dist/enduser.yml +151 -2
- package/dist/filedefinitionrules.yml +722 -0
- package/dist/mcp-server.yml +284 -12
- package/dist/tradingpartnerconnector.yml +10 -0
- package/dist/user.yml +114 -21
- package/package.json +1 -1
- package/schemas.json +108 -48
|
@@ -0,0 +1,722 @@
|
|
|
1
|
+
openapi: 3.2.0
|
|
2
|
+
info:
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
title: File Definition Rules
|
|
5
|
+
description: |-
|
|
6
|
+
Async AI generation of EDI File Definition Rules (FDR) from specification PDFs.
|
|
7
|
+
Produces parsing and generation rules JSON; persists nothing.
|
|
8
|
+
servers:
|
|
9
|
+
- url: https://api.integrator.io
|
|
10
|
+
description: Production (US / default region)
|
|
11
|
+
- url: https://api.eu.integrator.io
|
|
12
|
+
description: Production (EU region)
|
|
13
|
+
- url: https://api.au.integrator.io
|
|
14
|
+
description: Production (AU region)
|
|
15
|
+
- url: https://api.ca.integrator.io
|
|
16
|
+
description: Production (CA region)
|
|
17
|
+
security:
|
|
18
|
+
- bearerAuth: []
|
|
19
|
+
tags:
|
|
20
|
+
- name: File Definition Rules
|
|
21
|
+
description: |-
|
|
22
|
+
Submit an EDI specification PDF (X12 or EDIFACT) and receive parsing
|
|
23
|
+
and/or generation File Definition Rules JSON, generated asynchronously.
|
|
24
|
+
Submit endpoints return a `requestId` immediately (202); poll the
|
|
25
|
+
matching GET endpoint until the job reaches `completed` or `failed`.
|
|
26
|
+
Job records expire 24 hours after submission. Submissions are
|
|
27
|
+
rate-limited per caller (10 per hour, with an administrator bypass);
|
|
28
|
+
the document-types catalog allows 100 per hour and 10 per 60 seconds.
|
|
29
|
+
The API only produces rules — it persists nothing. The Ora agent in
|
|
30
|
+
integrator.io drives these endpoints for interactive onboarding; call
|
|
31
|
+
them directly to script partner onboarding in bulk.
|
|
32
|
+
|
|
33
|
+
## File definition rules schemas
|
|
34
|
+
|
|
35
|
+
{% openapi-schemas spec="filedefinitionrules" schemas="FdrSubmitRequest,FileDefinitionGenerationJob,FileDefinitionParsingJob" grouped="true" %}
|
|
36
|
+
paths:
|
|
37
|
+
/v1/filedefinitionrules/generate:
|
|
38
|
+
post:
|
|
39
|
+
x-internal: false
|
|
40
|
+
operationId: submitFdrGeneration
|
|
41
|
+
tags:
|
|
42
|
+
- File Definition Rules
|
|
43
|
+
summary: Submit an FDR generation job
|
|
44
|
+
description: |-
|
|
45
|
+
Submits an async job that produces both parsing and generation FDR
|
|
46
|
+
artifacts from the supplied EDI specification PDF. Returns a
|
|
47
|
+
`requestId` immediately; poll
|
|
48
|
+
`GET /v1/filedefinitionrules/generate/{requestId}` for status and
|
|
49
|
+
results. Rate-limited to 10 submissions per caller per hour
|
|
50
|
+
(administrators bypass the limit).
|
|
51
|
+
requestBody:
|
|
52
|
+
required: true
|
|
53
|
+
content:
|
|
54
|
+
application/json:
|
|
55
|
+
schema:
|
|
56
|
+
$ref: '#/components/schemas/FdrSubmitRequest'
|
|
57
|
+
examples:
|
|
58
|
+
x12:
|
|
59
|
+
summary: X12 850 specification
|
|
60
|
+
value:
|
|
61
|
+
pdf: <base64-encoded PDF>
|
|
62
|
+
documentType: 850
|
|
63
|
+
responses:
|
|
64
|
+
'202':
|
|
65
|
+
description: Job accepted.
|
|
66
|
+
content:
|
|
67
|
+
application/json:
|
|
68
|
+
schema:
|
|
69
|
+
type: object
|
|
70
|
+
required:
|
|
71
|
+
- fileDefinitionGenerationJob
|
|
72
|
+
properties:
|
|
73
|
+
fileDefinitionGenerationJob:
|
|
74
|
+
type: object
|
|
75
|
+
required:
|
|
76
|
+
- requestId
|
|
77
|
+
properties:
|
|
78
|
+
requestId:
|
|
79
|
+
type: string
|
|
80
|
+
format: uuid
|
|
81
|
+
description: Poll handle for the job.
|
|
82
|
+
examples:
|
|
83
|
+
accepted:
|
|
84
|
+
value:
|
|
85
|
+
fileDefinitionGenerationJob:
|
|
86
|
+
requestId: 550e8400-e29b-41d4-a716-446655440000
|
|
87
|
+
'400':
|
|
88
|
+
$ref: '#/components/responses/400-bad-request'
|
|
89
|
+
'401':
|
|
90
|
+
$ref: '#/components/responses/401-unauthorized'
|
|
91
|
+
'403':
|
|
92
|
+
$ref: '#/components/responses/403-forbidden'
|
|
93
|
+
'413':
|
|
94
|
+
$ref: '#/components/responses/413-payload-too-large'
|
|
95
|
+
'422':
|
|
96
|
+
$ref: '#/components/responses/422-unprocessable-entity'
|
|
97
|
+
'429':
|
|
98
|
+
$ref: '#/components/responses/429-rate-limit'
|
|
99
|
+
'500':
|
|
100
|
+
$ref: '#/components/responses/500-internal'
|
|
101
|
+
'503':
|
|
102
|
+
$ref: '#/components/responses/503-unavailable'
|
|
103
|
+
/v1/filedefinitionrules/generate/{requestId}:
|
|
104
|
+
get:
|
|
105
|
+
x-internal: false
|
|
106
|
+
operationId: pollFdrGeneration
|
|
107
|
+
tags:
|
|
108
|
+
- File Definition Rules
|
|
109
|
+
summary: Poll an FDR generation job
|
|
110
|
+
description: |-
|
|
111
|
+
Returns the job's current state. When `status` is `completed`,
|
|
112
|
+
`result` carries `parsingFdr` and `generationFdr`; when `failed`,
|
|
113
|
+
`error` carries the code and message. Non-administrators can only
|
|
114
|
+
poll their own jobs. Job records expire after 24 hours
|
|
115
|
+
(`404 REQUEST_NOT_FOUND`).
|
|
116
|
+
parameters:
|
|
117
|
+
- name: requestId
|
|
118
|
+
in: path
|
|
119
|
+
required: true
|
|
120
|
+
description: Request id returned by the submit endpoint.
|
|
121
|
+
schema:
|
|
122
|
+
type: string
|
|
123
|
+
format: uuid
|
|
124
|
+
examples:
|
|
125
|
+
- 550e8400-e29b-41d4-a716-446655440000
|
|
126
|
+
responses:
|
|
127
|
+
'200':
|
|
128
|
+
description: Current job state.
|
|
129
|
+
content:
|
|
130
|
+
application/json:
|
|
131
|
+
schema:
|
|
132
|
+
type: object
|
|
133
|
+
required:
|
|
134
|
+
- fileDefinitionGenerationJob
|
|
135
|
+
properties:
|
|
136
|
+
fileDefinitionGenerationJob:
|
|
137
|
+
$ref: '#/components/schemas/FileDefinitionGenerationJob'
|
|
138
|
+
examples:
|
|
139
|
+
completed:
|
|
140
|
+
summary: Job completed
|
|
141
|
+
value:
|
|
142
|
+
fileDefinitionGenerationJob:
|
|
143
|
+
requestId: 550e8400-e29b-41d4-a716-446655440000
|
|
144
|
+
status: completed
|
|
145
|
+
createdAt: '2026-06-24T10:30:00Z'
|
|
146
|
+
startedAt: '2026-06-24T10:30:05Z'
|
|
147
|
+
completedAt: '2026-06-24T10:31:45Z'
|
|
148
|
+
result:
|
|
149
|
+
parsingFdr: {}
|
|
150
|
+
generationFdr: {}
|
|
151
|
+
failed:
|
|
152
|
+
summary: Job failed
|
|
153
|
+
value:
|
|
154
|
+
fileDefinitionGenerationJob:
|
|
155
|
+
requestId: 550e8400-e29b-41d4-a716-446655440000
|
|
156
|
+
status: failed
|
|
157
|
+
createdAt: '2026-06-24T10:30:00Z'
|
|
158
|
+
completedAt: '2026-06-24T10:30:15Z'
|
|
159
|
+
error:
|
|
160
|
+
code: UNSUPPORTED_TYPE
|
|
161
|
+
message: X12 transaction set 999 is not supported
|
|
162
|
+
'401':
|
|
163
|
+
$ref: '#/components/responses/401-unauthorized'
|
|
164
|
+
'403':
|
|
165
|
+
$ref: '#/components/responses/403-forbidden'
|
|
166
|
+
'404':
|
|
167
|
+
$ref: '#/components/responses/404-not-found'
|
|
168
|
+
'500':
|
|
169
|
+
$ref: '#/components/responses/500-internal'
|
|
170
|
+
/v1/filedefinitionrules/parse:
|
|
171
|
+
post:
|
|
172
|
+
x-internal: false
|
|
173
|
+
operationId: submitFdrParsing
|
|
174
|
+
tags:
|
|
175
|
+
- File Definition Rules
|
|
176
|
+
summary: Submit an FDR parsing job
|
|
177
|
+
description: |-
|
|
178
|
+
Submits an async job that produces a parsing FDR only (no generation
|
|
179
|
+
artifact) from the supplied EDI specification PDF. Returns a
|
|
180
|
+
`requestId` immediately; poll
|
|
181
|
+
`GET /v1/filedefinitionrules/parse/{requestId}` for status and
|
|
182
|
+
results. Rate-limited to 10 submissions per caller per hour
|
|
183
|
+
(administrators bypass the limit).
|
|
184
|
+
requestBody:
|
|
185
|
+
required: true
|
|
186
|
+
content:
|
|
187
|
+
application/json:
|
|
188
|
+
schema:
|
|
189
|
+
$ref: '#/components/schemas/FdrSubmitRequest'
|
|
190
|
+
examples:
|
|
191
|
+
x12:
|
|
192
|
+
summary: X12 850 specification
|
|
193
|
+
value:
|
|
194
|
+
pdf: <base64-encoded PDF>
|
|
195
|
+
documentType: 850
|
|
196
|
+
responses:
|
|
197
|
+
'202':
|
|
198
|
+
description: Job accepted.
|
|
199
|
+
content:
|
|
200
|
+
application/json:
|
|
201
|
+
schema:
|
|
202
|
+
type: object
|
|
203
|
+
required:
|
|
204
|
+
- fileDefinitionParsingJob
|
|
205
|
+
properties:
|
|
206
|
+
fileDefinitionParsingJob:
|
|
207
|
+
type: object
|
|
208
|
+
required:
|
|
209
|
+
- requestId
|
|
210
|
+
properties:
|
|
211
|
+
requestId:
|
|
212
|
+
type: string
|
|
213
|
+
format: uuid
|
|
214
|
+
description: Poll handle for the job.
|
|
215
|
+
examples:
|
|
216
|
+
accepted:
|
|
217
|
+
value:
|
|
218
|
+
fileDefinitionParsingJob:
|
|
219
|
+
requestId: 550e8400-e29b-41d4-a716-446655440000
|
|
220
|
+
'400':
|
|
221
|
+
$ref: '#/components/responses/400-bad-request'
|
|
222
|
+
'401':
|
|
223
|
+
$ref: '#/components/responses/401-unauthorized'
|
|
224
|
+
'403':
|
|
225
|
+
$ref: '#/components/responses/403-forbidden'
|
|
226
|
+
'413':
|
|
227
|
+
$ref: '#/components/responses/413-payload-too-large'
|
|
228
|
+
'422':
|
|
229
|
+
$ref: '#/components/responses/422-unprocessable-entity'
|
|
230
|
+
'429':
|
|
231
|
+
$ref: '#/components/responses/429-rate-limit'
|
|
232
|
+
'500':
|
|
233
|
+
$ref: '#/components/responses/500-internal'
|
|
234
|
+
'503':
|
|
235
|
+
$ref: '#/components/responses/503-unavailable'
|
|
236
|
+
/v1/filedefinitionrules/parse/{requestId}:
|
|
237
|
+
get:
|
|
238
|
+
x-internal: false
|
|
239
|
+
operationId: pollFdrParsing
|
|
240
|
+
tags:
|
|
241
|
+
- File Definition Rules
|
|
242
|
+
summary: Poll an FDR parsing job
|
|
243
|
+
description: |-
|
|
244
|
+
Returns the job's current state. When `status` is `completed`,
|
|
245
|
+
`result` carries `parsingFdr` only; when `failed`, `error` carries
|
|
246
|
+
the code and message. Non-administrators can only poll their own
|
|
247
|
+
jobs. Job records expire after 24 hours (`404 REQUEST_NOT_FOUND`).
|
|
248
|
+
parameters:
|
|
249
|
+
- name: requestId
|
|
250
|
+
in: path
|
|
251
|
+
required: true
|
|
252
|
+
description: Request id returned by the submit endpoint.
|
|
253
|
+
schema:
|
|
254
|
+
type: string
|
|
255
|
+
format: uuid
|
|
256
|
+
examples:
|
|
257
|
+
- 550e8400-e29b-41d4-a716-446655440000
|
|
258
|
+
responses:
|
|
259
|
+
'200':
|
|
260
|
+
description: Current job state.
|
|
261
|
+
content:
|
|
262
|
+
application/json:
|
|
263
|
+
schema:
|
|
264
|
+
type: object
|
|
265
|
+
required:
|
|
266
|
+
- fileDefinitionParsingJob
|
|
267
|
+
properties:
|
|
268
|
+
fileDefinitionParsingJob:
|
|
269
|
+
$ref: '#/components/schemas/FileDefinitionParsingJob'
|
|
270
|
+
examples:
|
|
271
|
+
completed:
|
|
272
|
+
summary: Job completed
|
|
273
|
+
value:
|
|
274
|
+
fileDefinitionParsingJob:
|
|
275
|
+
requestId: 550e8400-e29b-41d4-a716-446655440000
|
|
276
|
+
status: completed
|
|
277
|
+
createdAt: '2026-06-24T10:30:00Z'
|
|
278
|
+
completedAt: '2026-06-24T10:31:45Z'
|
|
279
|
+
result:
|
|
280
|
+
parsingFdr: {}
|
|
281
|
+
'401':
|
|
282
|
+
$ref: '#/components/responses/401-unauthorized'
|
|
283
|
+
'403':
|
|
284
|
+
$ref: '#/components/responses/403-forbidden'
|
|
285
|
+
'404':
|
|
286
|
+
$ref: '#/components/responses/404-not-found'
|
|
287
|
+
'500':
|
|
288
|
+
$ref: '#/components/responses/500-internal'
|
|
289
|
+
/v1/filedefinitionrules/document-types:
|
|
290
|
+
get:
|
|
291
|
+
x-internal: false
|
|
292
|
+
operationId: listFdrDocumentTypes
|
|
293
|
+
tags:
|
|
294
|
+
- File Definition Rules
|
|
295
|
+
summary: List supported document types
|
|
296
|
+
description: |-
|
|
297
|
+
Returns the X12 transaction set numbers the generator supports (24 sets
|
|
298
|
+
as of v1.2.0) and whether EDIFACT auto-detection is available
|
|
299
|
+
(`documentType: 0`). Rate-limited to 100 requests per hour and 10 per
|
|
300
|
+
60 seconds per caller.
|
|
301
|
+
responses:
|
|
302
|
+
'200':
|
|
303
|
+
description: Supported document types.
|
|
304
|
+
content:
|
|
305
|
+
application/json:
|
|
306
|
+
schema:
|
|
307
|
+
$ref: '#/components/schemas/DocumentTypesResponse'
|
|
308
|
+
examples:
|
|
309
|
+
default:
|
|
310
|
+
value:
|
|
311
|
+
fileDefinitionDocumentTypes:
|
|
312
|
+
supportedTypes:
|
|
313
|
+
- 180
|
|
314
|
+
- 204
|
|
315
|
+
- 210
|
|
316
|
+
- 214
|
|
317
|
+
- 810
|
|
318
|
+
- 812
|
|
319
|
+
- 820
|
|
320
|
+
- 824
|
|
321
|
+
- 832
|
|
322
|
+
- 835
|
|
323
|
+
- 846
|
|
324
|
+
- 850
|
|
325
|
+
- 852
|
|
326
|
+
- 855
|
|
327
|
+
- 856
|
|
328
|
+
- 860
|
|
329
|
+
- 864
|
|
330
|
+
- 870
|
|
331
|
+
- 875
|
|
332
|
+
- 880
|
|
333
|
+
- 940
|
|
334
|
+
- 943
|
|
335
|
+
- 944
|
|
336
|
+
- 945
|
|
337
|
+
edifactSupported: true
|
|
338
|
+
'401':
|
|
339
|
+
$ref: '#/components/responses/401-unauthorized'
|
|
340
|
+
'403':
|
|
341
|
+
$ref: '#/components/responses/403-forbidden'
|
|
342
|
+
'429':
|
|
343
|
+
$ref: '#/components/responses/429-rate-limit'
|
|
344
|
+
'500':
|
|
345
|
+
$ref: '#/components/responses/500-internal'
|
|
346
|
+
components:
|
|
347
|
+
securitySchemes:
|
|
348
|
+
bearerAuth:
|
|
349
|
+
type: http
|
|
350
|
+
scheme: bearer
|
|
351
|
+
schemas:
|
|
352
|
+
FdrSubmitRequest:
|
|
353
|
+
type: object
|
|
354
|
+
required:
|
|
355
|
+
- pdf
|
|
356
|
+
- documentType
|
|
357
|
+
properties:
|
|
358
|
+
pdf:
|
|
359
|
+
type: string
|
|
360
|
+
description: |-
|
|
361
|
+
Base64-encoded EDI specification PDF. Must decode to a text-bearing
|
|
362
|
+
PDF — scanned/image-only documents fail the job with
|
|
363
|
+
`PDF_EXTRACTION_FAILED`. Encoded payloads over 50 MB are rejected
|
|
364
|
+
with `413 PAYLOAD_TOO_LARGE`.
|
|
365
|
+
documentType:
|
|
366
|
+
type: integer
|
|
367
|
+
description: |-
|
|
368
|
+
X12 transaction set number (e.g. 850), or 0 to auto-detect an
|
|
369
|
+
EDIFACT specification from the PDF contents. Values outside the
|
|
370
|
+
supported set fail with `400 INVALID_DOCUMENT_TYPE`; discover the
|
|
371
|
+
supported set via `GET /v1/filedefinitionrules/document-types`.
|
|
372
|
+
examples:
|
|
373
|
+
- 850
|
|
374
|
+
ErrorCode:
|
|
375
|
+
type: string
|
|
376
|
+
description: Machine-readable failure code returned by the FDR service.
|
|
377
|
+
enum:
|
|
378
|
+
- INVALID_DOCUMENT_TYPE
|
|
379
|
+
- INVALID_REQUEST
|
|
380
|
+
- UNAUTHORIZED
|
|
381
|
+
- FORBIDDEN
|
|
382
|
+
- REQUEST_NOT_FOUND
|
|
383
|
+
- PAYLOAD_TOO_LARGE
|
|
384
|
+
- RATE_LIMIT_EXCEEDED
|
|
385
|
+
- PDF_EXTRACTION_FAILED
|
|
386
|
+
- UNSUPPORTED_TYPE
|
|
387
|
+
- DETECTION_FAILED
|
|
388
|
+
- GENERATION_FAILED
|
|
389
|
+
- SERVICE_UNAVAILABLE
|
|
390
|
+
x-enumDescriptions:
|
|
391
|
+
INVALID_DOCUMENT_TYPE: documentType is not 0 and not a supported X12 set
|
|
392
|
+
INVALID_REQUEST: Request body failed schema validation
|
|
393
|
+
UNAUTHORIZED: Missing or non-Bearer Authorization header
|
|
394
|
+
FORBIDDEN: Invalid, expired, or insufficient token or AShare
|
|
395
|
+
REQUEST_NOT_FOUND: Job id missing, wrong operation, or expired
|
|
396
|
+
PAYLOAD_TOO_LARGE: Encoded pdf exceeds the size limit
|
|
397
|
+
RATE_LIMIT_EXCEEDED: Caller exceeded the endpoint token bucket
|
|
398
|
+
PDF_EXTRACTION_FAILED: pdf is not valid base64 or not a PDF
|
|
399
|
+
UNSUPPORTED_TYPE: Worker could not generate an FDR for the detected type
|
|
400
|
+
DETECTION_FAILED: Worker could not classify the PDF as X12 or EDIFACT
|
|
401
|
+
GENERATION_FAILED: Unexpected pipeline or server failure
|
|
402
|
+
SERVICE_UNAVAILABLE: Job store or PDF storage is unavailable
|
|
403
|
+
ErrorItem:
|
|
404
|
+
type: object
|
|
405
|
+
additionalProperties: false
|
|
406
|
+
required:
|
|
407
|
+
- code
|
|
408
|
+
- message
|
|
409
|
+
- source
|
|
410
|
+
properties:
|
|
411
|
+
code:
|
|
412
|
+
$ref: '#/components/schemas/ErrorCode'
|
|
413
|
+
message:
|
|
414
|
+
type: string
|
|
415
|
+
description: Human-readable description of this error.
|
|
416
|
+
source:
|
|
417
|
+
type: string
|
|
418
|
+
description: Field or component that produced the error (`pdf`, `documentType`, `Authorization`, `requestId`, `rate_limiter`, `generation`).
|
|
419
|
+
Error:
|
|
420
|
+
type: object
|
|
421
|
+
additionalProperties: false
|
|
422
|
+
required:
|
|
423
|
+
- errors
|
|
424
|
+
properties:
|
|
425
|
+
errors:
|
|
426
|
+
type: array
|
|
427
|
+
description: One or more errors from this request.
|
|
428
|
+
items:
|
|
429
|
+
$ref: '#/components/schemas/ErrorItem'
|
|
430
|
+
correlationId:
|
|
431
|
+
type: string
|
|
432
|
+
description: Matches the X-Correlation-ID response header when the service set one.
|
|
433
|
+
examples:
|
|
434
|
+
- 550e8400-e29b-41d4-a716-446655440000
|
|
435
|
+
FileDefinitionGenerationJob:
|
|
436
|
+
type: object
|
|
437
|
+
required:
|
|
438
|
+
- requestId
|
|
439
|
+
description: |-
|
|
440
|
+
State of an async FDR generation job. `startedAt` appears once
|
|
441
|
+
processing begins; `completedAt`, and either `result` or `error`,
|
|
442
|
+
appear when the job finishes. Job records expire 24 hours after
|
|
443
|
+
submission — polling after that returns `404 REQUEST_NOT_FOUND`.
|
|
444
|
+
properties:
|
|
445
|
+
requestId:
|
|
446
|
+
type: string
|
|
447
|
+
format: uuid
|
|
448
|
+
description: Identifier returned by the submit endpoint; use it to poll.
|
|
449
|
+
examples:
|
|
450
|
+
- 550e8400-e29b-41d4-a716-446655440000
|
|
451
|
+
status:
|
|
452
|
+
type: string
|
|
453
|
+
enum:
|
|
454
|
+
- queued
|
|
455
|
+
- processing
|
|
456
|
+
- completed
|
|
457
|
+
- failed
|
|
458
|
+
x-enumDescriptions:
|
|
459
|
+
queued: Accepted, waiting for a worker.
|
|
460
|
+
processing: A worker is generating the FDR artifacts.
|
|
461
|
+
completed: Finished — `result` carries the artifacts.
|
|
462
|
+
failed: Finished with an error — see `error`.
|
|
463
|
+
description: Job lifecycle state. Keep polling until `completed` or `failed`.
|
|
464
|
+
createdAt:
|
|
465
|
+
type: string
|
|
466
|
+
format: date-time
|
|
467
|
+
description: When the job was submitted.
|
|
468
|
+
startedAt:
|
|
469
|
+
type: string
|
|
470
|
+
format: date-time
|
|
471
|
+
description: When processing began. Absent while queued.
|
|
472
|
+
completedAt:
|
|
473
|
+
type: string
|
|
474
|
+
format: date-time
|
|
475
|
+
description: When the job finished (either outcome). Absent until then.
|
|
476
|
+
result:
|
|
477
|
+
type: object
|
|
478
|
+
description: Present when `status` is `completed`.
|
|
479
|
+
properties:
|
|
480
|
+
parsingFdr:
|
|
481
|
+
type:
|
|
482
|
+
- object
|
|
483
|
+
- 'null'
|
|
484
|
+
additionalProperties: true
|
|
485
|
+
description: Opaque parsing FDR JSON artifact.
|
|
486
|
+
generationFdr:
|
|
487
|
+
type:
|
|
488
|
+
- object
|
|
489
|
+
- 'null'
|
|
490
|
+
additionalProperties: true
|
|
491
|
+
description: Opaque generation FDR JSON artifact.
|
|
492
|
+
error:
|
|
493
|
+
type: object
|
|
494
|
+
description: Present when `status` is `failed`.
|
|
495
|
+
required:
|
|
496
|
+
- code
|
|
497
|
+
- message
|
|
498
|
+
properties:
|
|
499
|
+
code:
|
|
500
|
+
type: string
|
|
501
|
+
description: |-
|
|
502
|
+
Failure code — typically UNSUPPORTED_TYPE, DETECTION_FAILED,
|
|
503
|
+
PDF_EXTRACTION_FAILED, or GENERATION_FAILED.
|
|
504
|
+
examples:
|
|
505
|
+
- UNSUPPORTED_TYPE
|
|
506
|
+
message:
|
|
507
|
+
type: string
|
|
508
|
+
description: Human-readable failure reason.
|
|
509
|
+
examples:
|
|
510
|
+
- X12 transaction set 999 is not supported
|
|
511
|
+
FileDefinitionParsingJob:
|
|
512
|
+
type: object
|
|
513
|
+
required:
|
|
514
|
+
- requestId
|
|
515
|
+
description: |-
|
|
516
|
+
State of an async FDR parsing job — identical lifecycle to the
|
|
517
|
+
generation job, but `result` carries only `parsingFdr`.
|
|
518
|
+
properties:
|
|
519
|
+
requestId:
|
|
520
|
+
type: string
|
|
521
|
+
format: uuid
|
|
522
|
+
description: Identifier returned by the submit endpoint; use it to poll.
|
|
523
|
+
examples:
|
|
524
|
+
- 550e8400-e29b-41d4-a716-446655440000
|
|
525
|
+
status:
|
|
526
|
+
type: string
|
|
527
|
+
enum:
|
|
528
|
+
- queued
|
|
529
|
+
- processing
|
|
530
|
+
- completed
|
|
531
|
+
- failed
|
|
532
|
+
x-enumDescriptions:
|
|
533
|
+
queued: Accepted, waiting for a worker.
|
|
534
|
+
processing: A worker is generating the parsing FDR.
|
|
535
|
+
completed: Finished — `result` carries the artifact.
|
|
536
|
+
failed: Finished with an error — see `error`.
|
|
537
|
+
description: Job lifecycle state. Keep polling until `completed` or `failed`.
|
|
538
|
+
createdAt:
|
|
539
|
+
type: string
|
|
540
|
+
format: date-time
|
|
541
|
+
description: When the job was submitted.
|
|
542
|
+
startedAt:
|
|
543
|
+
type: string
|
|
544
|
+
format: date-time
|
|
545
|
+
description: When processing began. Absent while queued.
|
|
546
|
+
completedAt:
|
|
547
|
+
type: string
|
|
548
|
+
format: date-time
|
|
549
|
+
description: When the job finished (either outcome). Absent until then.
|
|
550
|
+
result:
|
|
551
|
+
type: object
|
|
552
|
+
description: Present when `status` is `completed`.
|
|
553
|
+
properties:
|
|
554
|
+
parsingFdr:
|
|
555
|
+
type:
|
|
556
|
+
- object
|
|
557
|
+
- 'null'
|
|
558
|
+
additionalProperties: true
|
|
559
|
+
description: Opaque parsing FDR JSON artifact.
|
|
560
|
+
error:
|
|
561
|
+
type: object
|
|
562
|
+
description: Present when `status` is `failed`.
|
|
563
|
+
required:
|
|
564
|
+
- code
|
|
565
|
+
- message
|
|
566
|
+
properties:
|
|
567
|
+
code:
|
|
568
|
+
type: string
|
|
569
|
+
description: |-
|
|
570
|
+
Failure code — typically UNSUPPORTED_TYPE, DETECTION_FAILED,
|
|
571
|
+
PDF_EXTRACTION_FAILED, or GENERATION_FAILED.
|
|
572
|
+
message:
|
|
573
|
+
type: string
|
|
574
|
+
description: Human-readable failure reason.
|
|
575
|
+
FileDefinitionDocumentTypes:
|
|
576
|
+
type: object
|
|
577
|
+
additionalProperties: false
|
|
578
|
+
required:
|
|
579
|
+
- supportedTypes
|
|
580
|
+
- edifactSupported
|
|
581
|
+
properties:
|
|
582
|
+
supportedTypes:
|
|
583
|
+
type: array
|
|
584
|
+
description: Sorted X12 transaction set numbers this service can generate.
|
|
585
|
+
items:
|
|
586
|
+
type: integer
|
|
587
|
+
edifactSupported:
|
|
588
|
+
type: boolean
|
|
589
|
+
description: When true, submit documentType 0 to auto-detect EDIFACT from the PDF.
|
|
590
|
+
DocumentTypesResponse:
|
|
591
|
+
type: object
|
|
592
|
+
additionalProperties: false
|
|
593
|
+
required:
|
|
594
|
+
- fileDefinitionDocumentTypes
|
|
595
|
+
properties:
|
|
596
|
+
fileDefinitionDocumentTypes:
|
|
597
|
+
$ref: '#/components/schemas/FileDefinitionDocumentTypes'
|
|
598
|
+
responses:
|
|
599
|
+
400-bad-request:
|
|
600
|
+
description: Invalid documentType or request body failed validation.
|
|
601
|
+
content:
|
|
602
|
+
application/json:
|
|
603
|
+
schema:
|
|
604
|
+
$ref: '#/components/schemas/Error'
|
|
605
|
+
examples:
|
|
606
|
+
invalidDocumentType:
|
|
607
|
+
value:
|
|
608
|
+
errors:
|
|
609
|
+
- code: INVALID_DOCUMENT_TYPE
|
|
610
|
+
message: Document type must be a valid X12 transaction set number (e.g. 850) or 0 for EDIFACT; got 999
|
|
611
|
+
source: documentType
|
|
612
|
+
401-unauthorized:
|
|
613
|
+
description: Missing Authorization header or scheme is not Bearer JWT.
|
|
614
|
+
content:
|
|
615
|
+
application/json:
|
|
616
|
+
schema:
|
|
617
|
+
$ref: '#/components/schemas/Error'
|
|
618
|
+
examples:
|
|
619
|
+
missing:
|
|
620
|
+
value:
|
|
621
|
+
errors:
|
|
622
|
+
- code: UNAUTHORIZED
|
|
623
|
+
message: Missing bearer token
|
|
624
|
+
source: Authorization
|
|
625
|
+
403-forbidden:
|
|
626
|
+
description: Token is invalid or expired, or the caller lacks permission or a valid AShare.
|
|
627
|
+
content:
|
|
628
|
+
application/json:
|
|
629
|
+
schema:
|
|
630
|
+
$ref: '#/components/schemas/Error'
|
|
631
|
+
examples:
|
|
632
|
+
expired:
|
|
633
|
+
value:
|
|
634
|
+
errors:
|
|
635
|
+
- code: FORBIDDEN
|
|
636
|
+
message: Bearer token has expired
|
|
637
|
+
source: Authorization
|
|
638
|
+
413-payload-too-large:
|
|
639
|
+
description: Encoded pdf exceeds the 50 MB limit.
|
|
640
|
+
content:
|
|
641
|
+
application/json:
|
|
642
|
+
schema:
|
|
643
|
+
$ref: '#/components/schemas/Error'
|
|
644
|
+
examples:
|
|
645
|
+
tooLarge:
|
|
646
|
+
value:
|
|
647
|
+
errors:
|
|
648
|
+
- code: PAYLOAD_TOO_LARGE
|
|
649
|
+
message: Base64-encoded PDF exceeds 50 MB limit
|
|
650
|
+
source: pdf
|
|
651
|
+
422-unprocessable-entity:
|
|
652
|
+
description: pdf is not valid base64 or decoded bytes do not start with %PDF.
|
|
653
|
+
content:
|
|
654
|
+
application/json:
|
|
655
|
+
schema:
|
|
656
|
+
$ref: '#/components/schemas/Error'
|
|
657
|
+
examples:
|
|
658
|
+
notPdf:
|
|
659
|
+
value:
|
|
660
|
+
errors:
|
|
661
|
+
- code: PDF_EXTRACTION_FAILED
|
|
662
|
+
message: Decoded content is not a PDF
|
|
663
|
+
source: pdf
|
|
664
|
+
429-rate-limit:
|
|
665
|
+
description: Caller exceeded the endpoint's rate limit.
|
|
666
|
+
headers:
|
|
667
|
+
Retry-After:
|
|
668
|
+
description: Seconds to wait before retrying.
|
|
669
|
+
schema:
|
|
670
|
+
type: integer
|
|
671
|
+
content:
|
|
672
|
+
application/json:
|
|
673
|
+
schema:
|
|
674
|
+
$ref: '#/components/schemas/Error'
|
|
675
|
+
examples:
|
|
676
|
+
exceeded:
|
|
677
|
+
value:
|
|
678
|
+
errors:
|
|
679
|
+
- code: RATE_LIMIT_EXCEEDED
|
|
680
|
+
message: Rate limit exceeded. Retry after 1200 seconds.
|
|
681
|
+
source: rate_limiter
|
|
682
|
+
500-internal:
|
|
683
|
+
description: Unexpected FDR service failure.
|
|
684
|
+
content:
|
|
685
|
+
application/json:
|
|
686
|
+
schema:
|
|
687
|
+
$ref: '#/components/schemas/Error'
|
|
688
|
+
examples:
|
|
689
|
+
failed:
|
|
690
|
+
value:
|
|
691
|
+
errors:
|
|
692
|
+
- code: GENERATION_FAILED
|
|
693
|
+
message: 'FDR generation failed. Reference: 550e8400-e29b-41d4-a716-446655440000'
|
|
694
|
+
source: generation
|
|
695
|
+
503-unavailable:
|
|
696
|
+
description: Job store or PDF storage is unavailable.
|
|
697
|
+
content:
|
|
698
|
+
application/json:
|
|
699
|
+
schema:
|
|
700
|
+
$ref: '#/components/schemas/Error'
|
|
701
|
+
examples:
|
|
702
|
+
store:
|
|
703
|
+
value:
|
|
704
|
+
errors:
|
|
705
|
+
- code: SERVICE_UNAVAILABLE
|
|
706
|
+
message: Unable to persist job. Retry later.
|
|
707
|
+
source: ''
|
|
708
|
+
404-not-found:
|
|
709
|
+
description: Job id is unknown, belongs to the other operation, is not visible to the caller, or expired after 24 hours.
|
|
710
|
+
content:
|
|
711
|
+
application/json:
|
|
712
|
+
schema:
|
|
713
|
+
$ref: '#/components/schemas/Error'
|
|
714
|
+
examples:
|
|
715
|
+
expired:
|
|
716
|
+
value:
|
|
717
|
+
errors:
|
|
718
|
+
- code: REQUEST_NOT_FOUND
|
|
719
|
+
message: Request ID not found or expired (24h TTL)
|
|
720
|
+
source: requestId
|
|
721
|
+
x-internal: false
|
|
722
|
+
x-enable-proxy: true
|