@celigo/api-specs 0.2.1

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.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +119 -0
  3. package/dist/account.yml +592 -0
  4. package/dist/agent.yml +908 -0
  5. package/dist/ai-agent.yml +5471 -0
  6. package/dist/api.yml +4140 -0
  7. package/dist/apim.yml +1286 -0
  8. package/dist/asynchelper.yml +3391 -0
  9. package/dist/audit.yml +2006 -0
  10. package/dist/connection.yml +8665 -0
  11. package/dist/connector.yml +1406 -0
  12. package/dist/ediprofile.yml +911 -0
  13. package/dist/editransaction.yml +1210 -0
  14. package/dist/enduser.yml +1724 -0
  15. package/dist/environment.yml +568 -0
  16. package/dist/eventreport.yml +692 -0
  17. package/dist/export.yml +17610 -0
  18. package/dist/filedefinition.yml +1396 -0
  19. package/dist/filestorage.yml +3102 -0
  20. package/dist/flow.yml +7928 -0
  21. package/dist/guardrail.yml +2763 -0
  22. package/dist/httpconnector.yml +2277 -0
  23. package/dist/httpconnectorendpoint.yml +722 -0
  24. package/dist/httpconnectorresource.yml +396 -0
  25. package/dist/iclient.yml +4452 -0
  26. package/dist/import.yml +15381 -0
  27. package/dist/integration.yml +4406 -0
  28. package/dist/job.yml +2014 -0
  29. package/dist/lookupcache.yml +1325 -0
  30. package/dist/marketplace.yml +685 -0
  31. package/dist/mcp-oauth-provider.yml +590 -0
  32. package/dist/mcp-server.yml +2656 -0
  33. package/dist/notification.yml +488 -0
  34. package/dist/processor.yml +1253 -0
  35. package/dist/profile.yml +455 -0
  36. package/dist/recyclebin.yml +768 -0
  37. package/dist/script.yml +1128 -0
  38. package/dist/stack.yml +1291 -0
  39. package/dist/state.yml +894 -0
  40. package/dist/subscription.yml +1405 -0
  41. package/dist/sync.yml +4857 -0
  42. package/dist/tag.yml +553 -0
  43. package/dist/template.yml +897 -0
  44. package/dist/tool.yml +33656 -0
  45. package/dist/tradingpartnerconnector.yml +1490 -0
  46. package/dist/user.yml +831 -0
  47. package/package.json +41 -0
  48. package/schemas.json +8420 -0
@@ -0,0 +1,1396 @@
1
+ openapi: 3.2.0
2
+ info:
3
+ version: 1.0.0
4
+ title: File Definitions
5
+ description: API for managing Celigo file definitions — structure and parsing rules for CSV, fixed-width, and EDI files.
6
+ x-celigo-ai-guidance:
7
+ - |-
8
+ API for managing file definitions in Celigo. File definitions describe the structure
9
+ and parsing rules for structured files such as CSV, fixed-width, EDI X12, and
10
+ EDI EDIFACT formats.
11
+
12
+ File definitions are referenced by exports and imports that process file-based data.
13
+ They define how rows, columns, segments, and elements are parsed or generated,
14
+ including delimiters, padding, and hierarchical rule structures.
15
+
16
+ EDI file definitions (X12 and EDIFACT formats) require a valid `globalId` that
17
+ maps to a known standard document definition, and may require an EDI license.
18
+ servers:
19
+ - url: https://api.integrator.io
20
+ description: Production (US / default region)
21
+ - url: https://api.eu.integrator.io
22
+ description: Production (EU region)
23
+ - url: https://api.au.integrator.io
24
+ description: Production (AU region)
25
+ - url: https://api.ca.integrator.io
26
+ description: Production (CA region)
27
+ security:
28
+ - bearerAuth: []
29
+ tags:
30
+ - name: File Definitions
31
+ description: |-
32
+ File definitions describe the structure and parsing rules for structured files
33
+ (CSV, fixed-width, EDI X12, EDI EDIFACT). Exports and imports that process
34
+ file-based data reference a file definition to control how rows, columns,
35
+ segments, and elements are parsed or generated.
36
+
37
+ Four formats are supported: `delimited` (CSV/TSV), `delimited/x12` (EDI X12),
38
+ `delimited/edifact` (EDI EDIFACT), and `fixed` (fixed-width). EDI formats
39
+ require a `globalId` linking to a standard document definition.
40
+
41
+ ## File definition schema
42
+
43
+ {% openapi-schemas spec="filedefinition" schemas="FileDefinition" grouped="true" %}
44
+ paths:
45
+ /v1/filedefinitions:
46
+ get:
47
+ x-internal: false
48
+ summary: List file definitions
49
+ description: Returns file definitions configured in the account.
50
+ operationId: listFileDefinitions
51
+ tags:
52
+ - File Definitions
53
+ parameters:
54
+ - $ref: '#/components/parameters/Include'
55
+ - $ref: '#/components/parameters/Exclude'
56
+ - name: externalId
57
+ in: query
58
+ description: Filter to file definitions matching this exact external identifier.
59
+ schema:
60
+ type: string
61
+ examples:
62
+ - ext-filedef-12345
63
+ - name: limit
64
+ in: query
65
+ required: false
66
+ description: Maximum number of file definitions to return per page.
67
+ schema:
68
+ type: integer
69
+ minimum: 1
70
+ maximum: 1000
71
+ examples:
72
+ - 100
73
+ responses:
74
+ '200':
75
+ description: List of file definitions.
76
+ headers:
77
+ Link:
78
+ description: RFC 5988 pagination links. Includes `<...>; rel="next"` when more pages remain.
79
+ schema:
80
+ type: string
81
+ content:
82
+ application/json:
83
+ schema:
84
+ type: array
85
+ items:
86
+ $ref: '#/components/schemas/FileDefinition'
87
+ examples:
88
+ default:
89
+ value:
90
+ - _id: 69150aa2578417f9fa410317
91
+ name: Costco 850
92
+ version: '2'
93
+ format: delimited/x12
94
+ globalId: 525b2a50-b8e5-4d01-b0ae-bf7fa4228ea2
95
+ skipEmptyEndColDelimiter: true
96
+ skipEDIValidation: true
97
+ skipEDIProfileValidation: true
98
+ delimited:
99
+ rowSuffix: '~'
100
+ rowDelimiter: |+
101
+
102
+ colDelimiter: '*'
103
+ rules:
104
+ - required: true
105
+ maxOccurrence: 1
106
+ elements:
107
+ - name: ISA
108
+ value: ISA
109
+ lastModified: '2025-11-12T22:30:58.442Z'
110
+ sandbox: false
111
+ '204':
112
+ description: No file definitions exist in the account.
113
+ '401':
114
+ $ref: '#/components/responses/401-unauthorized'
115
+ x-celigo-ai-guidance:
116
+ - |-
117
+ Returns a list of all file definitions configured in the account.
118
+ If no file definitions exist, a 204 response with no body will be returned.
119
+ post:
120
+ x-internal: false
121
+ summary: Create a file definition
122
+ description: Creates a new file definition.
123
+ operationId: createFileDefinition
124
+ tags:
125
+ - File Definitions
126
+ requestBody:
127
+ required: true
128
+ content:
129
+ application/json:
130
+ schema:
131
+ $ref: '#/components/schemas/Request'
132
+ examples:
133
+ delimited:
134
+ summary: Delimited (CSV)
135
+ value:
136
+ name: Customer CSV Import
137
+ version: '1'
138
+ format: delimited
139
+ delimited:
140
+ rowDelimiter: |+
141
+
142
+ colDelimiter: ','
143
+ rules:
144
+ - required: true
145
+ maxOccurrence: 1
146
+ elements:
147
+ - name: customer_id
148
+ - name: customer_name
149
+ - name: email
150
+ fixed:
151
+ summary: Fixed-width
152
+ value:
153
+ name: Fixed-Width Payment File
154
+ version: '1'
155
+ format: fixed
156
+ fixed:
157
+ rowDelimiter: |+
158
+
159
+ paddingChar: ' '
160
+ rules:
161
+ - required: true
162
+ maxOccurrence: 1
163
+ elements:
164
+ - name: record_type
165
+ length: 2
166
+ value: '01'
167
+ - name: account_number
168
+ length: 15
169
+ - name: amount
170
+ length: 10
171
+ responses:
172
+ '201':
173
+ description: File definition created.
174
+ content:
175
+ application/json:
176
+ schema:
177
+ $ref: '#/components/schemas/FileDefinition'
178
+ examples:
179
+ delimited:
180
+ summary: Created delimited (CSV) definition
181
+ value:
182
+ _id: 5f8d43a1b9e5a80011a35f2c
183
+ name: Customer CSV Import
184
+ version: '1'
185
+ format: delimited
186
+ delimited:
187
+ rowDelimiter: |+
188
+
189
+ colDelimiter: ','
190
+ rules:
191
+ - required: true
192
+ maxOccurrence: 1
193
+ elements:
194
+ - name: customer_id
195
+ - name: customer_name
196
+ - name: email
197
+ lastModified: '2026-06-09T18:05:33.612Z'
198
+ sandbox: false
199
+ '400':
200
+ $ref: '#/components/responses/400-bad-request'
201
+ '401':
202
+ $ref: '#/components/responses/401-unauthorized'
203
+ '422':
204
+ $ref: '#/components/responses/422-unprocessable-entity'
205
+ x-celigo-ai-guidance:
206
+ - |-
207
+ For EDI formats (`delimited/x12` or `delimited/edifact`), a valid `globalId`
208
+ is required when the account has an EDI license enabled. The `globalId` must
209
+ reference a known standard document definition.
210
+ /v1/filedefinitions/{_id}:
211
+ get:
212
+ x-internal: false
213
+ summary: Get a file definition
214
+ description: Returns the complete configuration including parsing rules.
215
+ operationId: getFileDefinitionById
216
+ tags:
217
+ - File Definitions
218
+ parameters:
219
+ - name: _id
220
+ in: path
221
+ description: File definition ID.
222
+ required: true
223
+ schema:
224
+ type: string
225
+ format: objectId
226
+ x-celigo-refModel: filedefinitions
227
+ examples:
228
+ - 69150aa2578417f9fa410317
229
+ responses:
230
+ '200':
231
+ description: File definition.
232
+ content:
233
+ application/json:
234
+ schema:
235
+ $ref: '#/components/schemas/FileDefinition'
236
+ examples:
237
+ delimited-x12:
238
+ value:
239
+ _id: 69150aa2578417f9fa410317
240
+ name: Costco 850
241
+ version: '2'
242
+ format: delimited/x12
243
+ description: Purchase Order
244
+ globalId: 525b2a50-b8e5-4d01-b0ae-bf7fa4228ea2
245
+ skipEmptyEndColDelimiter: true
246
+ skipEDIValidation: true
247
+ skipEDIProfileValidation: true
248
+ delimited:
249
+ rowSuffix: '~'
250
+ rowDelimiter: |+
251
+
252
+ colDelimiter: '*'
253
+ rules:
254
+ - required: true
255
+ maxOccurrence: 1
256
+ elements:
257
+ - name: ISA
258
+ value: ISA
259
+ lastModified: '2025-11-12T22:30:58.442Z'
260
+ sandbox: false
261
+ '401':
262
+ $ref: '#/components/responses/401-unauthorized'
263
+ '404':
264
+ $ref: '#/components/responses/404-not-found'
265
+ put:
266
+ x-internal: false
267
+ summary: Update a file definition
268
+ description: |-
269
+ Replaces the file definition with the provided configuration. This
270
+ is a full replace -- include all fields you want to keep. `format`
271
+ cannot be changed between `fixed` and `delimited` families after
272
+ creation, and `globalId` is immutable for EDI formats.
273
+ operationId: updateFileDefinition
274
+ tags:
275
+ - File Definitions
276
+ parameters:
277
+ - name: _id
278
+ in: path
279
+ description: File definition ID.
280
+ required: true
281
+ schema:
282
+ type: string
283
+ format: objectId
284
+ x-celigo-refModel: filedefinitions
285
+ examples:
286
+ - 69150aa2578417f9fa410317
287
+ requestBody:
288
+ required: true
289
+ content:
290
+ application/json:
291
+ schema:
292
+ $ref: '#/components/schemas/Request'
293
+ examples:
294
+ delimited-x12:
295
+ summary: Full replace re-enabling EDI validation
296
+ value:
297
+ name: Costco 850
298
+ version: '2'
299
+ format: delimited/x12
300
+ description: Purchase Order
301
+ globalId: 525b2a50-b8e5-4d01-b0ae-bf7fa4228ea2
302
+ skipEmptyEndColDelimiter: true
303
+ skipEDIValidation: false
304
+ skipEDIProfileValidation: true
305
+ delimited:
306
+ rowSuffix: '~'
307
+ rowDelimiter: |+
308
+
309
+ colDelimiter: '*'
310
+ rules:
311
+ - required: true
312
+ maxOccurrence: 1
313
+ elements:
314
+ - name: ISA
315
+ value: ISA
316
+ responses:
317
+ '200':
318
+ description: Updated file definition.
319
+ content:
320
+ application/json:
321
+ schema:
322
+ $ref: '#/components/schemas/FileDefinition'
323
+ examples:
324
+ delimited-x12:
325
+ summary: Updated file definition
326
+ value:
327
+ _id: 69150aa2578417f9fa410317
328
+ name: Costco 850
329
+ version: '2'
330
+ format: delimited/x12
331
+ description: Purchase Order
332
+ globalId: 525b2a50-b8e5-4d01-b0ae-bf7fa4228ea2
333
+ skipEmptyEndColDelimiter: true
334
+ skipEDIValidation: false
335
+ skipEDIProfileValidation: true
336
+ delimited:
337
+ rowSuffix: '~'
338
+ rowDelimiter: |+
339
+
340
+ colDelimiter: '*'
341
+ rules:
342
+ - required: true
343
+ maxOccurrence: 1
344
+ elements:
345
+ - name: ISA
346
+ value: ISA
347
+ lastModified: '2025-11-20T08:14:27.310Z'
348
+ sandbox: false
349
+ '400':
350
+ $ref: '#/components/responses/400-bad-request'
351
+ '401':
352
+ $ref: '#/components/responses/401-unauthorized'
353
+ '404':
354
+ $ref: '#/components/responses/404-not-found'
355
+ delete:
356
+ x-internal: false
357
+ summary: Delete a file definition
358
+ description: Soft-deletes a file definition. Retained in the recycle bin for 30 days.
359
+ operationId: deleteFileDefinition
360
+ tags:
361
+ - File Definitions
362
+ parameters:
363
+ - name: _id
364
+ in: path
365
+ description: File definition ID.
366
+ required: true
367
+ schema:
368
+ type: string
369
+ format: objectId
370
+ x-celigo-refModel: filedefinitions
371
+ examples:
372
+ - 69150aa2578417f9fa410317
373
+ responses:
374
+ '204':
375
+ description: File definition deleted.
376
+ '401':
377
+ $ref: '#/components/responses/401-unauthorized'
378
+ '404':
379
+ $ref: '#/components/responses/404-not-found'
380
+ /v1/filedefinitions/{_id}/dependencies:
381
+ get:
382
+ x-internal: false
383
+ operationId: listFileDefinitionDependencies
384
+ tags:
385
+ - File Definitions
386
+ summary: List dependencies of a file definition
387
+ description: |-
388
+ Returns the set of resources that depend on the specified resource.
389
+ The response is an object whose keys are dependent-resource types
390
+ (e.g. `flows`, `imports`) and whose values are arrays of dependency
391
+ entries. Returns `{}` when no dependents exist, including for
392
+ well-formatted but nonexistent IDs.
393
+ parameters:
394
+ - name: _id
395
+ in: path
396
+ required: true
397
+ description: Resource ID.
398
+ schema:
399
+ type: string
400
+ format: objectId
401
+ x-celigo-refModel: filedefinitions
402
+ examples:
403
+ - 69150aa2578417f9fa410317
404
+ responses:
405
+ '200':
406
+ description: |
407
+ Dependency map. Keys are resource-type strings; values are arrays
408
+ of dependency entries. Returns `{}` when no dependents exist.
409
+ content:
410
+ application/json:
411
+ schema:
412
+ $ref: '#/components/schemas/DependencyResponse'
413
+ examples:
414
+ none:
415
+ summary: No dependents (also returned for a nonexistent ID)
416
+ value: {}
417
+ '401':
418
+ $ref: '#/components/responses/401-unauthorized'
419
+ components:
420
+ securitySchemes:
421
+ bearerAuth:
422
+ type: http
423
+ scheme: bearer
424
+ parameters:
425
+ Include:
426
+ name: include
427
+ in: query
428
+ required: false
429
+ description: |-
430
+ Comma-separated list of fields to project into each returned record.
431
+ Triggers summary projection: the response contains a minimal identity
432
+ set (`_id`, `name`, plus resource-specific fields) with the requested
433
+ fields added on top. Supports dot notation for nested fields.
434
+ Mutually exclusive with `exclude`.
435
+ schema:
436
+ type: string
437
+ example: _integrationId,disabled,lastModified
438
+ Exclude:
439
+ name: exclude
440
+ in: query
441
+ required: false
442
+ description: |-
443
+ Comma-separated list of fields to strip from the default response.
444
+ Unlike `include`, does not trigger summary projection — returns the
445
+ full record with the named fields removed. Protected identity fields
446
+ (e.g. `name`) cannot be stripped. Mutually exclusive with `include`.
447
+ schema:
448
+ type: string
449
+ example: createdAt,lastModified
450
+ schemas:
451
+ Element:
452
+ type: object
453
+ additionalProperties: true
454
+ description: |
455
+ A single field / segment-element entry inside a `Rule.elements`
456
+ list.
457
+
458
+ **Format-specific usage**
459
+
460
+ - **Delimited (CSV / TSV)** — one element per column. `name` is
461
+ the human label; `value` is the column id used to address the
462
+ field downstream (e.g. `orderId`, `customerName`).
463
+ - **Fixed-width** — adds `startPosition` + `length` (or the
464
+ legacy `start` / `end` pair) to describe the column's offset
465
+ within each row.
466
+ - **EDI X12 / EDIFACT** — element values follow the segmentNN
467
+ convention (`ISA01`, `BEG03`, `UNB02`). Segment-element
468
+ definitions whose value comes from the trading-partner profile
469
+ use `referenceValue` to bind a Handlebars template such as
470
+ `{{{ediProfile.isa01}}}` — the runtime fills the value from
471
+ the profile at parse / generate time.
472
+
473
+ **Required fields**
474
+
475
+ `name` is required on every element. `value` is optional: in
476
+ the canonical delimited row pattern, only the first element of a
477
+ rule (the row-type marker) carries `value`; subsequent data
478
+ columns use `name` only and are read by position. When
479
+ `value` is set it must be non-empty — the parser uses it as a
480
+ literal match requirement (`ISA01`, `BEG03`, or the marker
481
+ string).
482
+ required:
483
+ - name
484
+ properties:
485
+ name:
486
+ type: string
487
+ description: |
488
+ Human-readable label or segment-element identifier. For EDI,
489
+ descriptive text such as `Authorization Information
490
+ Qualifier`; for delimited data columns, the output key (the
491
+ parser uses `name` as the field key in each parsed
492
+ record); for the row-type marker, equals `value`.
493
+ examples:
494
+ - Order ID
495
+ - Authorization Information Qualifier
496
+ - orderId
497
+ value:
498
+ description: |
499
+ Machine identifier, row-type matcher, or composite-element
500
+ definition. Accepts either:
501
+
502
+ - A **string** — EDI elements use it as the segment-element
503
+ identifier (`ISA01`, `BEG03`). In the canonical
504
+ delimited row pattern, only the first element of the row's
505
+ rule carries `value` — acting as the literal row-type
506
+ marker the parser matches against column 0 of every row
507
+ (e.g. `A`, `HDR`, `02`). Subsequent data columns omit
508
+ `value` entirely. When present must be non-empty.
509
+ - A **composite object** — EDI composite elements (an element
510
+ whose value is itself a delimited list of sub-elements,
511
+ e.g. EDIFACT `UNH02` = `S009` or X12 composites split by
512
+ the component separator) set `value` to an object with a
513
+ `delimiter` and nested `elements`. See `CompositeValue`.
514
+ oneOf:
515
+ - title: literal
516
+ type: string
517
+ - title: composite
518
+ $ref: '#/components/schemas/CompositeValue'
519
+ examples:
520
+ - ISA01
521
+ - BEG03
522
+ - A
523
+ - HDR
524
+ type:
525
+ type: string
526
+ enum:
527
+ - string
528
+ - number
529
+ - decimal
530
+ - boolean
531
+ x-enumDescriptions:
532
+ string: Keeps the parsed value as text; the default when type is omitted.
533
+ number: Coerces the parsed value to a number, used for EDI control numbers, dates, and numeric fields.
534
+ decimal: Coerces the parsed value to a decimal number; written for EDI R-type (decimal) elements such as monetary amounts and quantities.
535
+ boolean: Coerces the parsed value to a boolean.
536
+ description: |
537
+ Type coercion applied to the parsed value before it reaches
538
+ downstream mapping / output. Defaults to string when omitted.
539
+ EDI numeric segments (control numbers, dates) typically set
540
+ `type: number`; decimal-valued EDI elements (monetary
541
+ amounts, quantities) use `type: decimal`.
542
+ examples:
543
+ - string
544
+ - number
545
+ - decimal
546
+ - boolean
547
+ required:
548
+ type: boolean
549
+ default: false
550
+ description: |
551
+ Whether the parser should fail when this element is missing
552
+ or blank. Defaults to false. EDI envelope qualifiers and
553
+ transaction header fields (ISA/GS/ST elements) are
554
+ conventionally marked required.
555
+ examples:
556
+ - true
557
+ - false
558
+ minLength:
559
+ type: integer
560
+ minimum: 0
561
+ description: |
562
+ Inclusive minimum string length. Used heavily on EDI
563
+ elements where the X12 / EDIFACT standard fixes the length
564
+ of envelope qualifiers (e.g. `ISA05` is exactly 2 chars,
565
+ `ISA13` is exactly 9 chars).
566
+ maxLength:
567
+ type: integer
568
+ minimum: 0
569
+ description: |
570
+ Inclusive maximum string length. See `minLength` for
571
+ usage notes.
572
+ referenceValue:
573
+ type: string
574
+ description: |
575
+ Handlebars template that resolves to the element's value at
576
+ runtime instead of being read from the file. Most common use
577
+ is binding EDI envelope fields to the trading-partner
578
+ profile, e.g. `{{{ediProfile.isa01}}}` or
579
+ `{{{ediProfile.tpInterchangeId}}}`.
580
+
581
+ Use triple-stash (`{{{...}}}`) to avoid HTML escaping for
582
+ EDI control characters.
583
+ examples:
584
+ - '{{{ediProfile.isa01}}}'
585
+ - '{{{ediProfile.tpInterchangeId}}}'
586
+ enum:
587
+ type: array
588
+ items:
589
+ type: string
590
+ description: |
591
+ Enumerated set of allowed values. Used to enforce EDI code
592
+ lists (e.g. BEG01 purpose codes `["00", "06", "22"]`,
593
+ BEG02 type codes `["PR", "RL", "SA", "ZZ"]`). When set,
594
+ the parser rejects values outside the list.
595
+ examples:
596
+ - - '00'
597
+ - '06'
598
+ - '22'
599
+ - - PR
600
+ - RL
601
+ - SA
602
+ - ZZ
603
+ description:
604
+ type: string
605
+ description: |
606
+ Free-text annotation surfaced in the file-definition editor.
607
+ No functional impact on parsing.
608
+ tally:
609
+ type: boolean
610
+ description: |
611
+ Marks this element's parsed value as a running tally that the
612
+ generator accumulates across loop iterations. The
613
+ accumulated total is referenced from trailer segments via the
614
+ `{{_tally.[Element Name]}}` Handlebars helper (e.g. W04
615
+ "Number of Units Shipped" tallied into the W03 total).
616
+ examples:
617
+ - true
618
+ counter:
619
+ type: boolean
620
+ description: |
621
+ Marks this element as an auto-incrementing counter the
622
+ generator fills per emitted row / iteration (e.g. LX
623
+ assigned numbers, HL hierarchical ids).
624
+ examples:
625
+ - true
626
+ startPosition:
627
+ type: integer
628
+ minimum: 1
629
+ description: |
630
+ Fixed-width: 1-based start column (inclusive). Pair with
631
+ `length` to describe the column extent. Mutually exclusive
632
+ with the legacy `start` / `end` pair — pick one
633
+ convention per element.
634
+ length:
635
+ type: integer
636
+ minimum: 1
637
+ description: |
638
+ Fixed-width: column width in characters. Pair with
639
+ `startPosition`.
640
+ start:
641
+ type: integer
642
+ description: |
643
+ Legacy fixed-width start offset (kept for backward
644
+ compatibility). Pair with `end`. Prefer
645
+ `startPosition` + `length` on new definitions.
646
+ end:
647
+ type: integer
648
+ description: |
649
+ Legacy fixed-width end offset (kept for backward
650
+ compatibility). Pair with `start`. Prefer
651
+ `startPosition` + `length` on new definitions.
652
+ CompositeValue:
653
+ type: object
654
+ additionalProperties: true
655
+ required:
656
+ - elements
657
+ description: |
658
+ Composite-element value: an EDI element whose value is itself a
659
+ delimited list of sub-elements. Used for EDIFACT composites
660
+ (e.g. `UNH02` = message identifier `S009`, `DTM01` =
661
+ date/time/period `C507`) and X12 composites split by the
662
+ component element separator.
663
+
664
+ The parser joins / splits the nested `elements` using
665
+ `delimiter` (falling back to the file-level
666
+ `delimited.compositeDelimiter` when omitted). Sub-elements
667
+ follow the same `Element` shape as top-level segment elements —
668
+ typically just `name` + `value` pairs.
669
+ properties:
670
+ delimiter:
671
+ type: string
672
+ description: |
673
+ Component separator used between the composite's
674
+ sub-elements, e.g. `":"` (EDIFACT default) or `">"` /
675
+ `"="` (X12 component separators). Optional; when omitted
676
+ the file-level composite delimiter applies.
677
+ examples:
678
+ - ':'
679
+ - '>'
680
+ - '='
681
+ elements:
682
+ type: array
683
+ description: |
684
+ Ordered sub-elements of the composite. Each entry is an
685
+ `Element` (recursively — composites may nest), though in
686
+ practice sub-elements carry only `name` and a literal or
687
+ Handlebars `value`.
688
+ items:
689
+ $ref: '#/components/schemas/Element'
690
+ Rule:
691
+ type: object
692
+ additionalProperties: true
693
+ description: |
694
+ A single node in the recursive rules tree.
695
+
696
+ A rule may carry any combination of the following — none are
697
+ required individually, but every rule needs at least one of
698
+ `elements` (to extract fields) or `children` (to nest deeper
699
+ rules) to do anything useful.
700
+
701
+ **Node roles**
702
+
703
+ - **Leaf rule** — has `elements` (and usually no `children`).
704
+ Describes a single row / segment by enumerating its fields.
705
+ - **Branch rule** — has `children` (and optionally `elements`).
706
+ Used to nest loops / sub-segments. EDI envelopes always nest
707
+ their inner segments under `children`.
708
+ - **Container rule** — sets `container: true`. Acts as a loop
709
+ wrapper without producing an output row of its own. When
710
+ `container` is true, `maxOccurrence` MUST be greater than
711
+ `1` (the parser rejects `container: true` with `maxOccurrence
712
+ <= 1`).
713
+
714
+ **Envelopes and `closeRule`**
715
+
716
+ EDI envelopes (ISA/IEA, GS/GE, ST/SE, UNB/UNZ, UNG/UNE, UNH/UNT)
717
+ pair an opening rule with a trailing rule:
718
+
719
+ - The opening rule lives in `Rules` / `children`.
720
+ - The matching trailer lives on the opening rule's `closeRule`.
721
+
722
+ `closeRule` accepts both an object (single trailer rule) and a
723
+ one-element array of trailer rules; the parser treats them
724
+ equivalently. In practice the **root** envelope (e.g. IEA / UNZ)
725
+ is written as an object, and **inner** envelopes (e.g. GE / SE /
726
+ UNE) are written as a one-element array — both shapes are valid
727
+ against this schema.
728
+
729
+ **Additional properties**
730
+
731
+ Vendor / runtime extensions (`description`, Celigo-internal
732
+ flags) flow through unchanged. Consumers should pass unknown
733
+ keys back on round-trip rather than dropping them.
734
+ properties:
735
+ name:
736
+ type: string
737
+ description: |
738
+ Optional human-readable identifier for the node. EDI rules use
739
+ the segment name (`ST`, `GS`); delimited rules typically
740
+ omit `name` on the root rule.
741
+ examples:
742
+ - ST
743
+ - ISA
744
+ - OrderHeader
745
+ elements:
746
+ type: array
747
+ description: |
748
+ Field-level definitions extracted from this rule's row /
749
+ segment. See `Element` for the per-field shape.
750
+
751
+ EDI segment rules conventionally include a "self" element with
752
+ `name` and `value` set to the segment id (e.g.
753
+ `{"name": "ISA", "value": "ISA"}`) followed by one element
754
+ per segment-element (`ISA01`, `ISA02`, ...). Delimited
755
+ rules use one element per column.
756
+ items:
757
+ $ref: '#/components/schemas/Element'
758
+ children:
759
+ type: array
760
+ description: |
761
+ Nested rules. Used to build EDI envelope → group →
762
+ transaction → segment trees, or to model repeating
763
+ sub-segments / loops on any format.
764
+
765
+ Recursive: every child is itself a `Rule` (with the same
766
+ `elements` / `children` / `closeRule` capabilities).
767
+ items:
768
+ $ref: '#/components/schemas/Rule'
769
+ closeRule:
770
+ description: |
771
+ Trailer rule that closes the loop / envelope this rule opens.
772
+
773
+ Accepts either:
774
+ - A single `Rule` object (typical at the file root, e.g.
775
+ IEA / UNZ).
776
+ - A one-element array of `Rule` objects (typical for inner
777
+ envelopes, e.g. GE / SE / UNE).
778
+
779
+ Both shapes are accepted by the parser; tooling that
780
+ round-trips file definitions should preserve whichever shape
781
+ the source document uses.
782
+
783
+ For non-EDI / non-loop rules `closeRule` is omitted.
784
+ oneOf:
785
+ - title: rule
786
+ $ref: '#/components/schemas/Rule'
787
+ - title: array
788
+ type: array
789
+ items:
790
+ $ref: '#/components/schemas/Rule'
791
+ container:
792
+ type: boolean
793
+ description: |
794
+ Marks this rule as a pure loop wrapper that does not emit a
795
+ row of its own. Used on EDI `ST` / `UNH` containers so
796
+ the parser knows to iterate the inner transaction body up to
797
+ `maxOccurrence` times without recording the wrapper itself.
798
+
799
+ When `container: true` is set, `maxOccurrence` MUST be
800
+ greater than `1`. The parser rejects
801
+ `container: true` paired with `maxOccurrence <= 1` with
802
+ `Invalid rules: maxOccurences should be greater than '1',
803
+ when the container is 'true'`.
804
+ default: false
805
+ examples:
806
+ - true
807
+ - false
808
+ maxOccurrence:
809
+ type: integer
810
+ minimum: 1
811
+ description: |
812
+ Upper bound on how many times this rule may repeat at its
813
+ current position. EDI envelopes typically use `1` (one
814
+ ISA per file, one GS per group), while transaction-set
815
+ loops (`ST` containers, line-item loops) use larger
816
+ values such as `1000`.
817
+
818
+ Required to be greater than `1` when `container` is
819
+ `true`.
820
+ examples:
821
+ - 1
822
+ - 1000
823
+ required:
824
+ type: boolean
825
+ description: |
826
+ Whether this rule must be present in the parsed file. When
827
+ true and the rule does not match, the parser raises a
828
+ validation error. EDI envelope segments (ISA/GS/ST) are
829
+ always required; optional summary segments are not.
830
+ examples:
831
+ - true
832
+ - false
833
+ skipRowSuffix:
834
+ type: boolean
835
+ description: |
836
+ Suppresses emission of `delimited.rowSuffix` after this
837
+ rule's row during generation. Used on EDI envelope segments
838
+ (ISA / GS / ST) where the segment terminator is part of the
839
+ following row's prefix rather than this row's suffix.
840
+ default: false
841
+ description:
842
+ type: string
843
+ description: |
844
+ Free-text annotation surfaced in the file-definition editor.
845
+ No functional impact on parsing.
846
+ relativeDataPath:
847
+ type: string
848
+ description: |
849
+ JSON path (relative to the parent rule's record context) that
850
+ this rule's loop iterates over during generation, or that
851
+ parsed rows are written to during parsing. Set on repeating
852
+ rules — line-item loops, N1 address loops, ST transaction
853
+ containers (e.g. `"Items"`, `"N1"`, `"ST"`). Omitted on
854
+ single-occurrence rules.
855
+ examples:
856
+ - Items
857
+ - N1
858
+ - ST
859
+ relationship:
860
+ type: array
861
+ items:
862
+ type: string
863
+ description: |
864
+ X12 / EDIFACT syntax-note (element relationship) codes for
865
+ this rule's segment. Each entry is a condition code followed
866
+ by the element positions it binds, comma-separated:
867
+
868
+ - `C` — conditional: if the first listed element is present,
869
+ the rest are required (`"C,06,07"`).
870
+ - `P` — paired: all listed elements must appear together or
871
+ not at all (`"P,04,05"`).
872
+ - `R` — required: at least one of the listed elements must be
873
+ present (`"R,02,03"`).
874
+ - `E` — exclusion: at most one of the listed elements may be
875
+ present (`"E,02,07"`).
876
+ - `L` — list conditional: if the first element is present, at
877
+ least one of the rest is required (`"L,03,04,05"`).
878
+
879
+ Always an array of these code strings (never a plain string).
880
+ Pass through unchanged when round-tripping; the parser applies
881
+ the conditions during EDI validation.
882
+ examples:
883
+ - - C,06,07
884
+ - P,04,05
885
+ - - L,03,04,05,13
886
+ - R,02,03
887
+ FileDefinitionBase:
888
+ type: object
889
+ description: Writable file definition fields shared by the request and response schemas.
890
+ properties:
891
+ name:
892
+ type: string
893
+ minLength: 1
894
+ maxLength: 100
895
+ description: |
896
+ Human-readable name for the file definition.
897
+ examples:
898
+ - Invoice EDI 810
899
+ - Customer CSV Import
900
+ - Fixed-Width Payment File
901
+ description:
902
+ type: string
903
+ maxLength: 10240
904
+ description: |
905
+ Optional detailed description of the file definition's purpose and format.
906
+ examples:
907
+ - Defines the structure for parsing incoming EDI 810 invoice documents
908
+ version:
909
+ type: string
910
+ enum:
911
+ - '1'
912
+ - '2'
913
+ x-enumDescriptions:
914
+ '1': Original file definition schema version.
915
+ '2': Updated file definition schema version with breaking changes.
916
+ description: |
917
+ Schema version of the file definition. Only incremented for breaking changes.
918
+ examples:
919
+ - '1'
920
+ - '2'
921
+ format:
922
+ type: string
923
+ description: The file format this definition describes.
924
+ enum:
925
+ - delimited
926
+ - delimited/x12
927
+ - delimited/edifact
928
+ - fixed
929
+ x-enumDescriptions:
930
+ delimited: Standard delimited files (CSV, TSV, etc.).
931
+ delimited/x12: EDI X12 format. Requires `globalId` when EDI license is enabled.
932
+ delimited/edifact: EDI EDIFACT format. Requires `globalId` when EDI license is enabled.
933
+ fixed: Fixed-width positional format.
934
+ documentType:
935
+ type: string
936
+ enum:
937
+ - '997'
938
+ - CONTRL
939
+ x-enumDescriptions:
940
+ '997': X12 functional acknowledgement document type.
941
+ CONTRL: EDIFACT functional acknowledgement document type.
942
+ description: EDI document type for acknowledgement documents.
943
+ globalId:
944
+ type: string
945
+ description: |
946
+ Global identifier mapping to a known EDI standard document definition.
947
+
948
+ Required for EDI formats (`delimited/x12` or `delimited/edifact`) when the
949
+ account has an EDI license enabled. Must reference a valid entry in the
950
+ standard file definitions metadata. Immutable after creation.
951
+ examples:
952
+ - 3c7a8f2e-1234-5678-9abc-def012345678
953
+ rules:
954
+ type: array
955
+ description: |
956
+ Ordered array of recursive parsing/generation `Rule` nodes that
957
+ describe the file's structure — segments, elements, loops, and
958
+ their relationships. The array shape is the same for every
959
+ `format` (delimited, EDI X12/EDIFACT, and fixed-width): the first
960
+ element is the file's root rule, EDI envelopes nest through
961
+ `Rule.children`, and openers pair with trailers via
962
+ `Rule.closeRule`. Fixed-width rules carry the column offsets on
963
+ each element (`startPosition`/`length`).
964
+
965
+ The cleared / "no rules configured" form is an empty array `[]`.
966
+ The serialized rules tree must not exceed 20 KB once attached to
967
+ the parent file definition document.
968
+ items:
969
+ $ref: '#/components/schemas/Rule'
970
+ fixed:
971
+ type: object
972
+ description: |
973
+ Configuration specific to fixed-width format files.
974
+
975
+ Used when `format` is "fixed".
976
+ properties:
977
+ rowSuffix:
978
+ type: string
979
+ description: |
980
+ Character(s) appended after each row during generation.
981
+ examples:
982
+ - \n
983
+ - \r\n
984
+ rowDelimiter:
985
+ type: string
986
+ description: |
987
+ Character(s) used to delimit rows during parsing.
988
+ examples:
989
+ - \n
990
+ - \r\n
991
+ paddingChar:
992
+ type: string
993
+ description: |
994
+ Character used to pad fixed-width fields to their required length.
995
+ examples:
996
+ - ' '
997
+ - '0'
998
+ delimited:
999
+ type: object
1000
+ description: |
1001
+ Configuration specific to delimited format files (CSV, EDI, etc.).
1002
+
1003
+ Used when `format` starts with "delimited".
1004
+ properties:
1005
+ rowSuffix:
1006
+ type: string
1007
+ description: |
1008
+ Character(s) appended after each row during generation.
1009
+ examples:
1010
+ - \n
1011
+ - \r\n
1012
+ rowDelimiter:
1013
+ type: string
1014
+ description: |
1015
+ Character(s) used to delimit rows during parsing.
1016
+ examples:
1017
+ - \n
1018
+ - ~\n
1019
+ colDelimiter:
1020
+ type: string
1021
+ description: |
1022
+ Character(s) used to delimit columns/fields within a row.
1023
+ examples:
1024
+ - ','
1025
+ - \t
1026
+ - '*'
1027
+ - '|'
1028
+ compositeDelimiter:
1029
+ type: string
1030
+ description: |
1031
+ Character(s) used to delimit composite elements within a field.
1032
+ Primarily used in EDI formats.
1033
+ examples:
1034
+ - ':'
1035
+ - '>'
1036
+ strict:
1037
+ type: boolean
1038
+ description: |
1039
+ Whether to fail on all validation errors.
1040
+
1041
+ Reserved for future use.
1042
+ skipEmptyEndColDelimiter:
1043
+ type: boolean
1044
+ description: |
1045
+ Whether to skip trailing empty column delimiters at the end of rows.
1046
+ skipIntermittentEmptyLines:
1047
+ type: boolean
1048
+ description: |
1049
+ Whether to remove empty rows found in the file content during parsing.
1050
+ escapeReleaseChar:
1051
+ type: boolean
1052
+ description: |
1053
+ Whether to handle escape/release characters in delimited data.
1054
+ Primarily relevant for EDI EDIFACT format.
1055
+ skipEDIValidation:
1056
+ type: boolean
1057
+ description: |
1058
+ Whether to skip EDI structural validation during parsing.
1059
+ skipEDIProfileValidation:
1060
+ type: boolean
1061
+ default: false
1062
+ description: |
1063
+ Whether to skip EDI profile-level validation during parsing.
1064
+ externalId:
1065
+ type: string
1066
+ description: |
1067
+ External identifier for correlating this file definition with an external system.
1068
+ examples:
1069
+ - ext-filedef-12345
1070
+ x-celigo-ai-guidance:
1071
+ - |-
1072
+ Delimited / EDI shape: an ordered list of root ``Rule`` nodes.
1073
+ For non-EDI delimited files this is typically a single-element
1074
+ array carrying one rule whose ``elements`` describe the
1075
+ columns. For EDI (X12 / EDIFACT) the array still has one root
1076
+ rule, but that rule's ``children`` build the
1077
+ envelope → group → transaction → segment hierarchy.
1078
+ - |-
1079
+ The rules tree describes how the structuredFileParser walks a file
1080
+ row-by-row (delimited / EDI) or by fixed offsets (fixed-width) and
1081
+ extracts named fields and nested loops/segments.
1082
+
1083
+ ## SHAPE — VARIES BY ``format``
1084
+
1085
+ Two valid top-level shapes, selected by the parent file definition's
1086
+ ``format``:
1087
+
1088
+ - **Array of ``Rule``** — used by every delimited variant
1089
+ (``delimited``, ``delimited/x12``, ``delimited/edifact``, etc.).
1090
+ The first element is the file's root rule; for EDI, deeper
1091
+ envelopes nest through ``Rule.children``.
1092
+
1093
+ - **Single ``Rule`` object** — used by ``format: "fixed"`` (fixed-
1094
+ width). The whole file is described by one rule whose
1095
+ ``elements`` enumerate the columns by ``startPosition`` /
1096
+ ``length``.
1097
+
1098
+ The ``oneOf`` below documents both shapes. Tooling that consumes
1099
+ this spec to drive UI rendering or generation should branch on
1100
+ ``format`` to decide which arm applies — there is no
1101
+ discriminator field on the rules tree itself.
1102
+
1103
+ ## EMPTY / CLEARED FORM
1104
+
1105
+ A cleared rules tree is ``[]`` for delimited / EDI and ``{}`` for
1106
+ fixed-width. Both empty forms are accepted by the parser as
1107
+ "no rules configured" and round-trip cleanly through the
1108
+ structuredFileParser.
1109
+ ResourceResponse:
1110
+ type: object
1111
+ description: Response
1112
+ x-celigo-ai-guidance:
1113
+ - Core response fields shared by all Celigo resources
1114
+ properties:
1115
+ _id:
1116
+ type: string
1117
+ format: objectId
1118
+ readOnly: true
1119
+ description: Unique identifier for the resource. Format is a 24-character hexadecimal string.
1120
+ x-celigo-ai-guidance:
1121
+ - |-
1122
+ The _id is used in:
1123
+ - API endpoints that operate on a specific resource (e.g., GET, PUT, DELETE)
1124
+ - References from other resources (e.g., flows that use this resource)
1125
+ - Job history and error tracking
1126
+ examples:
1127
+ - 5f8d43a1b9e5a80011a35f2c
1128
+ createdAt:
1129
+ type: string
1130
+ format: date-time
1131
+ readOnly: true
1132
+ description: Timestamp when the resource was created. Set automatically and cannot be modified.
1133
+ x-celigo-ai-guidance:
1134
+ - Recorded in ISO 8601 with a UTC timezone (Z suffix).
1135
+ examples:
1136
+ - '2023-04-01T09:15:32Z'
1137
+ lastModified:
1138
+ type: string
1139
+ format: date-time
1140
+ readOnly: true
1141
+ description: Timestamp when the resource was last updated. Changes whenever any property is modified.
1142
+ x-celigo-ai-guidance:
1143
+ - Recorded in ISO 8601 with a UTC timezone (Z suffix); always equal to or later than `createdAt`.
1144
+ examples:
1145
+ - '2023-04-15T14:30:15Z'
1146
+ deletedAt:
1147
+ type:
1148
+ - string
1149
+ - 'null'
1150
+ format: date-time
1151
+ readOnly: true
1152
+ description: Timestamp when the resource was soft-deleted. When null or absent, the resource is active.
1153
+ x-celigo-ai-guidance:
1154
+ - Non-null means the resource is soft-deleted (in the recycle bin) — recoverable within the retention period before permanent removal.
1155
+ examples:
1156
+ - '2023-05-20T11:45:32Z'
1157
+ required:
1158
+ - _id
1159
+ FileDefinition:
1160
+ type: object
1161
+ required:
1162
+ - _id
1163
+ - name
1164
+ - version
1165
+ - format
1166
+ - rules
1167
+ - lastModified
1168
+ description: File definition object as returned by the API.
1169
+ allOf:
1170
+ - $ref: '#/components/schemas/FileDefinitionBase'
1171
+ - $ref: '#/components/schemas/ResourceResponse'
1172
+ - type: object
1173
+ properties:
1174
+ _templateId:
1175
+ type: string
1176
+ format: objectId
1177
+ readOnly: true
1178
+ x-celigo-refModel: templates
1179
+ description: Template this file definition was created from.
1180
+ examples:
1181
+ - 5f8d43a1b9e5a80011a35f2c
1182
+ _sourceId:
1183
+ type: string
1184
+ format: objectId
1185
+ readOnly: true
1186
+ description: Source identifier for tracking the definition's origin.
1187
+ examples:
1188
+ - 5f8d43a1b9e5a80011a35f2c
1189
+ Request:
1190
+ type: object
1191
+ description: |
1192
+ Request schema for creating or updating a file definition.
1193
+ required:
1194
+ - name
1195
+ - version
1196
+ - format
1197
+ - rules
1198
+ allOf:
1199
+ - $ref: '#/components/schemas/FileDefinitionBase'
1200
+ x-celigo-ai-guidance:
1201
+ - |-
1202
+ File definitions describe the structure and parsing/generation rules for
1203
+ structured file formats including delimited (CSV), fixed-width, EDI X12,
1204
+ and EDI EDIFACT.
1205
+ Error:
1206
+ type: object
1207
+ description: Standard error response envelope returned by integrator.io APIs.
1208
+ properties:
1209
+ errors:
1210
+ type: array
1211
+ description: List of errors that occurred while processing the request.
1212
+ items:
1213
+ type: object
1214
+ properties:
1215
+ code:
1216
+ oneOf:
1217
+ - type: string
1218
+ - type: integer
1219
+ description: |-
1220
+ Machine-readable error code. Usually a string like
1221
+ `invalid_ref`, `missing_required_field`, or `unauthorized`;
1222
+ may be an **integer** when the error mirrors an upstream HTTP
1223
+ status (e.g. `500`) — most commonly returned by connection-ping
1224
+ and adaptor-proxy responses.
1225
+ message:
1226
+ type: string
1227
+ description: Human-readable description of the error.
1228
+ field:
1229
+ type: string
1230
+ description: |-
1231
+ Optional pointer to the document field that caused the error.
1232
+ Used by structural validation errors (`missing_required_field`,
1233
+ `invalid_ref`) to indicate which field is at fault
1234
+ (e.g. `_id`, `type`, `http.baseURI`).
1235
+ source:
1236
+ type: string
1237
+ description: |-
1238
+ Optional origin layer for the error — e.g. `application` when
1239
+ the error came from the remote system the adaptor called,
1240
+ `connector` when the adaptor itself rejected the request.
1241
+ required:
1242
+ - message
1243
+ required:
1244
+ - errors
1245
+ DependencyEntry:
1246
+ type: object
1247
+ description: A single resource that depends on the queried resource.
1248
+ properties:
1249
+ id:
1250
+ type: string
1251
+ description: Unique identifier of the dependent resource.
1252
+ examples:
1253
+ - 61f92026dd053843b5d72350
1254
+ name:
1255
+ type: string
1256
+ description: Display name of the dependent resource.
1257
+ examples:
1258
+ - Import Orders to NetSuite
1259
+ paths:
1260
+ type: array
1261
+ description: |-
1262
+ Dot-notation paths within the dependent resource that reference
1263
+ the target resource. `[*]` denotes array elements.
1264
+ items:
1265
+ type: string
1266
+ examples:
1267
+ - - hooks.preSavePage._scriptId
1268
+ accessLevel:
1269
+ type: string
1270
+ description: The caller's access level on the dependent resource.
1271
+ examples:
1272
+ - manage
1273
+ dependencyIds:
1274
+ type: object
1275
+ description: |-
1276
+ Map of resource types to arrays of IDs that this dependent
1277
+ resource references on the target. Keys are singular or plural
1278
+ resource type strings; values are arrays of ID strings.
1279
+ additionalProperties:
1280
+ type: array
1281
+ items:
1282
+ type: string
1283
+ example:
1284
+ script:
1285
+ - 64ff4b21612a134bd2f45531
1286
+ required:
1287
+ - id
1288
+ - name
1289
+ - paths
1290
+ - accessLevel
1291
+ - dependencyIds
1292
+ DependencyResponse:
1293
+ type: object
1294
+ description: |
1295
+ Map of dependent-resource types to arrays of dependency entries.
1296
+ Keys are plural resource type strings (e.g. `flows`, `imports`,
1297
+ `connections`). An empty object `{}` means no dependents.
1298
+ additionalProperties:
1299
+ type: array
1300
+ items:
1301
+ $ref: '#/components/schemas/DependencyEntry'
1302
+ example:
1303
+ exports:
1304
+ - id: 64ff4b21612a134bd2f45534
1305
+ name: Bank FTP Export
1306
+ paths:
1307
+ - hooks.preSavePage._scriptId
1308
+ accessLevel: manage
1309
+ dependencyIds:
1310
+ script:
1311
+ - 64ff4b21612a134bd2f45531
1312
+ flows:
1313
+ - id: 64ff4b22612a134bd2f45538
1314
+ name: CAMT-053 to Celigo CAM Format
1315
+ paths:
1316
+ - pageGenerators[*]._exportId
1317
+ accessLevel: manage
1318
+ dependencyIds:
1319
+ export:
1320
+ - 64ff4b21612a134bd2f45534
1321
+ responses:
1322
+ 401-unauthorized:
1323
+ description: |-
1324
+ Unauthorized. The request lacks a valid bearer token, or the provided token
1325
+ failed to authenticate.
1326
+
1327
+ Note: the 401 response is produced by the auth middleware **before** the
1328
+ request reaches the endpoint handler, so it does **not** follow the
1329
+ standard `{errors: [...]}` envelope. Instead the body is a bare
1330
+ `{message: string}` object with no `code`, no `errors` array. Callers
1331
+ handling 401s should key off the HTTP status and the `message` string,
1332
+ not try to destructure an `errors[]`.
1333
+ content:
1334
+ application/json:
1335
+ schema:
1336
+ type: object
1337
+ properties:
1338
+ message:
1339
+ type: string
1340
+ description: |-
1341
+ Human-readable description of the auth failure. Known values:
1342
+ - `"Unauthorized"` — no `Authorization` header on the request.
1343
+ - `"Bearer Authentication Failed"` — header present but token
1344
+ is invalid, revoked, or expired.
1345
+ required:
1346
+ - message
1347
+ examples:
1348
+ missing_token:
1349
+ summary: No Authorization header sent
1350
+ value:
1351
+ message: Unauthorized
1352
+ invalid_token:
1353
+ summary: Bearer token invalid or revoked
1354
+ value:
1355
+ message: Bearer Authentication Failed
1356
+ 400-bad-request:
1357
+ description: |
1358
+ Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
1359
+ content:
1360
+ application/json:
1361
+ schema:
1362
+ $ref: '#/components/schemas/Error'
1363
+ examples:
1364
+ default:
1365
+ value:
1366
+ errors:
1367
+ - code: invalid_request
1368
+ message: The request body failed validation.
1369
+ 422-unprocessable-entity:
1370
+ description: |
1371
+ Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.
1372
+ content:
1373
+ application/json:
1374
+ schema:
1375
+ $ref: '#/components/schemas/Error'
1376
+ examples:
1377
+ default:
1378
+ value:
1379
+ errors:
1380
+ - code: unprocessable_entity
1381
+ message: The request could not be processed due to a semantic error.
1382
+ 404-not-found:
1383
+ description: |
1384
+ Not found. The requested resource does not exist or is not visible to the caller.
1385
+ content:
1386
+ application/json:
1387
+ schema:
1388
+ $ref: '#/components/schemas/Error'
1389
+ examples:
1390
+ default:
1391
+ value:
1392
+ errors:
1393
+ - code: not_found
1394
+ message: The requested resource was not found.
1395
+ x-enable-proxy: true
1396
+ x-internal: false