@celigo/api-specs 0.2.26 → 0.2.28

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.
@@ -0,0 +1,508 @@
1
+ openapi: 3.2.0
2
+ info:
3
+ version: 1.0.0
4
+ title: BarTender Templates
5
+ description: API for listing and downloading Celigo-published BarTender label templates used by EDI label-printing flows.
6
+ x-celigo-ai-guidance:
7
+ - |-
8
+ Call `GET /v1/bartenderTemplates` first — that returns unique published
9
+ `names` only. Then call `GET /v1/bartenderTemplates?name=<selected>` to
10
+ load `s3Key` values and `fieldMappings` for the chosen templates. Download
11
+ a `.btw` with `GET /v1/bartenderTemplates/{name}/download`. Requires EDI
12
+ and EDI label-printing entitlements; returns 422
13
+ `edi_subscription_required` when either is missing and a bare 404 (empty
14
+ body) when the global label-printing kill switch is active.
15
+ servers:
16
+ - url: https://api.integrator.io
17
+ description: Production (US / default region)
18
+ - url: https://api.eu.integrator.io
19
+ description: Production (EU region)
20
+ - url: https://api.au.integrator.io
21
+ description: Production (AU region)
22
+ - url: https://api.ca.integrator.io
23
+ description: Production (CA region)
24
+ security:
25
+ - bearerAuth: []
26
+ tags:
27
+ - name: BarTender Templates
28
+ description: |-
29
+ Celigo-published BarTender (`.btw`) label templates synced daily from
30
+ BarTender Cloud. List unique names, load selected template details and
31
+ lookup-cache field mappings, or download a published `.btw`.
32
+
33
+ Requires a standard integrator.io JWT with manage or monitor role, plus
34
+ EDI and EDI label-printing entitlements on the account.
35
+
36
+ ## BarTender template schemas
37
+
38
+ {% openapi-schemas spec="bartendertemplate" schemas="BarTenderTemplateCatalog,BarTenderTemplate,BarTenderFieldMapping" grouped="true" %}
39
+ paths:
40
+ /v1/bartenderTemplates:
41
+ get:
42
+ x-internal: false
43
+ operationId: listBarTenderTemplates
44
+ tags:
45
+ - BarTender Templates
46
+ summary: List BarTender label templates
47
+ description: |-
48
+ Returns Celigo-published BarTender catalog data. The catalog is read from
49
+ S3 (`catalog.json`, written by the daily sync cron) and cached in-process.
50
+
51
+ Omit `name` to get unique published template names (sorted). Pass one or
52
+ more `name` values to get matching templates and lookup-cache field
53
+ mappings plus the catalog `syncedAt`.
54
+
55
+ `name` accepts a comma-separated list or repeated query parameters.
56
+ Matching is case-sensitive and also treats pipe-separated tokens as
57
+ aliases (`amazon | 133` matches `amazon` or `133`). Unknown names return
58
+ empty `templates` and `fieldMappings` — not 404. `limit`, `page`, and
59
+ `search` are ignored.
60
+ parameters:
61
+ - name: name
62
+ in: query
63
+ required: false
64
+ description: |-
65
+ Filter to these published template names. Comma-separated or
66
+ repeated (`?name=amazon&name=walmart`). When omitted or empty, the
67
+ response is `{ names }` only.
68
+ schema:
69
+ type: string
70
+ examples:
71
+ - amazon
72
+ - amazon,walmart
73
+ responses:
74
+ '200':
75
+ description: |-
76
+ Unique names when `name` is omitted; filtered catalog details when
77
+ `name` is provided.
78
+ content:
79
+ application/json:
80
+ schema:
81
+ $ref: '#/components/schemas/BarTenderTemplateCatalog'
82
+ examples:
83
+ names:
84
+ summary: Unique published names (no name query)
85
+ value:
86
+ names:
87
+ - amazon
88
+ - walmart
89
+ details:
90
+ summary: Filtered templates and field mappings
91
+ value:
92
+ syncedAt: '2026-07-10T02:15:00.000Z'
93
+ templates:
94
+ - name: amazon
95
+ s3Key: EDI_BarTender_Templates/templates/FI!1.0!1!0f1c545d-1b36-49af-8e1f-5ce7e8ba43ec.btw
96
+ fieldMappings:
97
+ - key: amazon
98
+ value:
99
+ configurations:
100
+ PACK|*:
101
+ templateName: AMAZON_US_RETAIL_CARTON
102
+ - key: amazon | 133
103
+ value:
104
+ configurations:
105
+ PALLET|*:
106
+ templateName: AMAZON_US_RETAIL_PALLET
107
+ empty_names:
108
+ summary: Catalog has no published templates
109
+ value:
110
+ names: []
111
+ '401':
112
+ $ref: '#/components/responses/401-unauthorized'
113
+ '404':
114
+ description: |-
115
+ The global BarTender label-printing kill switch
116
+ (`BARTENDER_LABEL_PRINTING_DISABLED`) is active. The route responds
117
+ with a bare `404` and an empty body so the feature appears unavailable.
118
+ '422':
119
+ description: |-
120
+ The account lacks a required EDI entitlement. Missing `edi.enabled` or
121
+ `edi.labelPrinting.enabled` both return the same
122
+ `edi_subscription_required` error — the route reuses the standard EDI
123
+ license gate used by other B2B Manager endpoints.
124
+ content:
125
+ application/json:
126
+ schema:
127
+ $ref: '#/components/schemas/Error'
128
+ examples:
129
+ edi_not_enabled:
130
+ summary: EDI is not enabled on the account
131
+ value:
132
+ errors:
133
+ - code: edi_subscription_required
134
+ message: EDI is a premium feature that is not included in your account's current subscription plan. Please upgrade your account to get access to B2B Manager.
135
+ label_printing_not_enabled:
136
+ summary: EDI label printing is not enabled on the account
137
+ value:
138
+ errors:
139
+ - code: edi_subscription_required
140
+ message: EDI is a premium feature that is not included in your account's current subscription plan. Please upgrade your account to get access to B2B Manager.
141
+ '502':
142
+ description: |-
143
+ The catalog could not be read from S3 or the stored `catalog.json` is
144
+ malformed.
145
+ content:
146
+ application/json:
147
+ schema:
148
+ $ref: '#/components/schemas/Error'
149
+ examples:
150
+ catalog_unavailable:
151
+ summary: S3 read or parse failure
152
+ value:
153
+ errors:
154
+ - code: BARTENDER_CATALOG_UNAVAILABLE
155
+ message: The BarTender template catalog is temporarily unavailable. Please try again later.
156
+ '503':
157
+ description: |-
158
+ The catalog has never been published for this environment, or the
159
+ EDI license check could not be completed.
160
+ content:
161
+ application/json:
162
+ schema:
163
+ $ref: '#/components/schemas/Error'
164
+ examples:
165
+ catalog_not_initialized:
166
+ summary: Catalog not yet synced
167
+ value:
168
+ errors:
169
+ - code: BARTENDER_CATALOG_NOT_INITIALIZED
170
+ message: The BarTender template catalog has not been published yet. Please try again later.
171
+ license_check_failed:
172
+ summary: EDI license lookup failed
173
+ value:
174
+ errors:
175
+ - code: edi_license_check_failed
176
+ message: We're unable to verify your EDI license at the moment. Please contact support if the issue persists.
177
+ /v1/bartenderTemplates/{name}/download:
178
+ get:
179
+ x-internal: false
180
+ operationId: downloadBarTenderTemplate
181
+ tags:
182
+ - BarTender Templates
183
+ summary: Download a BarTender label template
184
+ description: |-
185
+ Returns the published `.btw` binary for the named template.
186
+
187
+ `name` must match a published catalog entry exactly — pipe-token alias
188
+ matching from the list route is not applied here. The file is streamed
189
+ as `application/octet-stream` with `Content-Disposition: attachment`.
190
+ x-celigo-ai-guidance:
191
+ - |-
192
+ The name check runs before the catalog lookup, so a published name that
193
+ contains characters outside `[A-Za-z0-9._ -]` (parentheses, for example)
194
+ appears in the list response but answers 400
195
+ BARTENDER_TEMPLATE_INVALID_NAME here and cannot be downloaded through this
196
+ route. Live-verified 2026-09-18.
197
+ parameters:
198
+ - name: name
199
+ in: path
200
+ required: true
201
+ description: |-
202
+ Published template name from `GET /v1/bartenderTemplates`. Allowed
203
+ characters are letters, digits, period, underscore, space, and
204
+ hyphen; `..` is rejected.
205
+ schema:
206
+ type: string
207
+ pattern: ^[A-Za-z0-9._ -]+$
208
+ examples:
209
+ - amazon
210
+ responses:
211
+ '200':
212
+ description: Published `.btw` binary.
213
+ headers:
214
+ Content-Disposition:
215
+ description: |-
216
+ Attachment filename taken from the template object's basename
217
+ (the `.btw` file name).
218
+ schema:
219
+ type: string
220
+ examples:
221
+ - attachment; filename="FI!1.0!1!0f1c545d-1b36-49af-8e1f-5ce7e8ba43ec.btw"
222
+ content:
223
+ application/octet-stream:
224
+ schema:
225
+ type: string
226
+ format: binary
227
+ '400':
228
+ description: |-
229
+ `name` is empty or contains characters outside
230
+ `[A-Za-z0-9._ -]`, or includes `..`.
231
+ content:
232
+ application/json:
233
+ schema:
234
+ $ref: '#/components/schemas/Error'
235
+ examples:
236
+ invalid_name:
237
+ value:
238
+ errors:
239
+ - code: BARTENDER_TEMPLATE_INVALID_NAME
240
+ message: The BarTender template name is invalid.
241
+ '401':
242
+ $ref: '#/components/responses/401-unauthorized'
243
+ '404':
244
+ description: |-
245
+ The template is not in the published catalog, or the global
246
+ label-printing kill switch is active (bare `404`, empty body).
247
+ content:
248
+ application/json:
249
+ schema:
250
+ $ref: '#/components/schemas/Error'
251
+ examples:
252
+ not_found:
253
+ summary: Name is not a published template
254
+ value:
255
+ errors:
256
+ - code: BARTENDER_TEMPLATE_NOT_FOUND
257
+ message: The requested BarTender template was not found in the published catalog.
258
+ '422':
259
+ description: |-
260
+ The account lacks a required EDI entitlement. Missing `edi.enabled` or
261
+ `edi.labelPrinting.enabled` both return `edi_subscription_required`.
262
+ content:
263
+ application/json:
264
+ schema:
265
+ $ref: '#/components/schemas/Error'
266
+ examples:
267
+ edi_subscription_required:
268
+ value:
269
+ errors:
270
+ - code: edi_subscription_required
271
+ message: EDI is a premium feature that is not included in your account's current subscription plan. Please upgrade your account to get access to B2B Manager.
272
+ '502':
273
+ description: |-
274
+ The catalog could not be read, or the `.btw` object could not be
275
+ fetched from S3.
276
+ content:
277
+ application/json:
278
+ schema:
279
+ $ref: '#/components/schemas/Error'
280
+ examples:
281
+ catalog_unavailable:
282
+ summary: Catalog read or parse failure
283
+ value:
284
+ errors:
285
+ - code: BARTENDER_CATALOG_UNAVAILABLE
286
+ message: The BarTender template catalog is temporarily unavailable. Please try again later.
287
+ download_failed:
288
+ summary: Template object read failure
289
+ value:
290
+ errors:
291
+ - code: BARTENDER_TEMPLATE_DOWNLOAD_FAILED
292
+ message: The BarTender template file is temporarily unavailable. Please try again later.
293
+ '503':
294
+ description: |-
295
+ The catalog has never been published for this environment, or the
296
+ EDI license check could not be completed.
297
+ content:
298
+ application/json:
299
+ schema:
300
+ $ref: '#/components/schemas/Error'
301
+ examples:
302
+ catalog_not_initialized:
303
+ summary: Catalog not yet synced
304
+ value:
305
+ errors:
306
+ - code: BARTENDER_CATALOG_NOT_INITIALIZED
307
+ message: The BarTender template catalog has not been published yet. Please try again later.
308
+ license_check_failed:
309
+ summary: EDI license lookup failed
310
+ value:
311
+ errors:
312
+ - code: edi_license_check_failed
313
+ message: We're unable to verify your EDI license at the moment. Please contact support if the issue persists.
314
+ components:
315
+ securitySchemes:
316
+ bearerAuth:
317
+ type: http
318
+ scheme: bearer
319
+ schemas:
320
+ BarTenderTemplate:
321
+ type: object
322
+ description: |-
323
+ One published BarTender label template. Internal catalog fields (`id`,
324
+ `btChecksum`, `modifiedDateTime`, `version`) are not exposed — only `name`
325
+ and `s3Key` are returned.
326
+ required:
327
+ - name
328
+ - s3Key
329
+ properties:
330
+ name:
331
+ type: string
332
+ description: |-
333
+ Published display name, derived from the `.btw` file stem
334
+ (`amazon.btw` → `"amazon"`). Use this value in the `name` query
335
+ parameter and in `GET /v1/bartenderTemplates/{name}/download`.
336
+ examples:
337
+ - amazon
338
+ s3Key:
339
+ type: string
340
+ description: |-
341
+ Object key for the `.btw` binary in the UI-resources bucket. Pass this
342
+ to the downstream S3 export step that pushes the template to the
343
+ customer's BarTender environment.
344
+ examples:
345
+ - EDI_BarTender_Templates/templates/FI!1.0!1!0f1c545d-1b36-49af-8e1f-5ce7e8ba43ec.btw
346
+ BarTenderFieldMapping:
347
+ type: object
348
+ description: |-
349
+ One lookup-cache field mapping from the published catalog. Keys often
350
+ name a template (or a pipe-separated alias such as `amazon | 133`);
351
+ values keep whatever JSON shape the master cache stored.
352
+ required:
353
+ - key
354
+ - value
355
+ properties:
356
+ key:
357
+ type: string
358
+ description: |-
359
+ Mapping key. Filtered with the same case-sensitive exact / pipe-token
360
+ match as template `name` when `name` is supplied on the list route.
361
+ examples:
362
+ - amazon
363
+ - amazon | 133
364
+ - carrier
365
+ value:
366
+ description: |-
367
+ Mapping value from the master lookup cache. May be a string or an
368
+ object; consumers should check the runtime type before use.
369
+ oneOf:
370
+ - title: String value
371
+ type: string
372
+ - title: Object value
373
+ type: object
374
+ additionalProperties: true
375
+ examples:
376
+ - UPS
377
+ - configurations:
378
+ PACK|*:
379
+ templateName: AMAZON_US_RETAIL_CARTON
380
+ BarTenderTemplateCatalog:
381
+ type: object
382
+ description: |-
383
+ Response from `GET /v1/bartenderTemplates`. When `name` is omitted the
384
+ body is `{ names }`. When `name` is provided the body is
385
+ `{ syncedAt, templates, fieldMappings }` for the matching entries.
386
+ properties:
387
+ names:
388
+ type: array
389
+ description: |-
390
+ Unique published template names, sorted. Present when `name` is
391
+ omitted. An empty catalog returns `[]`.
392
+ items:
393
+ type: string
394
+ examples:
395
+ - - amazon
396
+ - walmart
397
+ syncedAt:
398
+ type: string
399
+ format: date-time
400
+ description: |-
401
+ UTC timestamp of the last successful catalog sync. Present when
402
+ `name` is provided.
403
+ examples:
404
+ - '2026-07-10T02:15:00.000Z'
405
+ templates:
406
+ type: array
407
+ description: |-
408
+ Published templates whose `name` matches any requested `name` value.
409
+ Present when `name` is provided. Unknown names yield an empty array,
410
+ not a 404.
411
+ items:
412
+ $ref: '#/components/schemas/BarTenderTemplate'
413
+ fieldMappings:
414
+ type: array
415
+ description: |-
416
+ Published lookup-cache mappings whose `key` matches any requested
417
+ `name` value. Present when `name` is provided. A catalog that predates
418
+ field-mapping sync returns `[]`.
419
+ items:
420
+ $ref: '#/components/schemas/BarTenderFieldMapping'
421
+ if:
422
+ required:
423
+ - names
424
+ then:
425
+ required:
426
+ - names
427
+ else:
428
+ required:
429
+ - syncedAt
430
+ - templates
431
+ - fieldMappings
432
+ Error:
433
+ type: object
434
+ description: Standard error response envelope returned by integrator.io APIs.
435
+ properties:
436
+ errors:
437
+ type: array
438
+ description: List of errors that occurred while processing the request.
439
+ items:
440
+ type: object
441
+ properties:
442
+ code:
443
+ oneOf:
444
+ - type: string
445
+ - type: integer
446
+ description: |-
447
+ Machine-readable error code. Usually a string like
448
+ `invalid_ref`, `missing_required_field`, or `unauthorized`;
449
+ may be an **integer** when the error mirrors an upstream HTTP
450
+ status (e.g. `500`) — most commonly returned by connection-ping
451
+ and adaptor-proxy responses.
452
+ message:
453
+ type: string
454
+ description: Human-readable description of the error.
455
+ field:
456
+ type: string
457
+ description: |-
458
+ Optional pointer to the document field that caused the error.
459
+ Used by structural validation errors (`missing_required_field`,
460
+ `invalid_ref`) to indicate which field is at fault
461
+ (e.g. `_id`, `type`, `http.baseURI`).
462
+ source:
463
+ type: string
464
+ description: |-
465
+ Optional origin layer for the error — e.g. `application` when
466
+ the error came from the remote system the adaptor called,
467
+ `connector` when the adaptor itself rejected the request.
468
+ required:
469
+ - message
470
+ required:
471
+ - errors
472
+ responses:
473
+ 401-unauthorized:
474
+ description: |-
475
+ Unauthorized. The request lacks a valid bearer token, or the provided token
476
+ failed to authenticate.
477
+
478
+ Note: the 401 response is produced by the auth middleware **before** the
479
+ request reaches the endpoint handler, so it does **not** follow the
480
+ standard `{errors: [...]}` envelope. Instead the body is a bare
481
+ `{message: string}` object with no `code`, no `errors` array. Callers
482
+ handling 401s should key off the HTTP status and the `message` string,
483
+ not try to destructure an `errors[]`.
484
+ content:
485
+ application/json:
486
+ schema:
487
+ type: object
488
+ properties:
489
+ message:
490
+ type: string
491
+ description: |-
492
+ Human-readable description of the auth failure. Known values:
493
+ - `"Unauthorized"` — no `Authorization` header on the request.
494
+ - `"Bearer Authentication Failed"` — header present but token
495
+ is invalid, revoked, or expired.
496
+ required:
497
+ - message
498
+ examples:
499
+ missing_token:
500
+ summary: No Authorization header sent
501
+ value:
502
+ message: Unauthorized
503
+ invalid_token:
504
+ summary: Bearer token invalid or revoked
505
+ value:
506
+ message: Bearer Authentication Failed
507
+ x-enable-proxy: true
508
+ x-internal: false
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celigo/api-specs",
3
- "version": "0.2.26",
3
+ "version": "0.2.28",
4
4
  "private": false,
5
5
  "description": "Public OpenAPI bundles (dist/) and the celigo-cli lint schema pack (schemas.json).",
6
6
  "keywords": [
package/schemas.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "provenance": {
3
3
  "repo": "celigo/integrator-api-specs",
4
- "iasCommit": "641fc30",
4
+ "iasCommit": "dd3c0db",
5
5
  "generatedAt": "2026-09-18"
6
6
  },
7
7
  "roots": {