@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,1490 @@
1
+ openapi: 3.2.0
2
+ info:
3
+ version: 1.0.0
4
+ title: Trading Partner Connectors
5
+ description: API for managing Celigo trading partner connectors — reusable templates for onboarding EDI trading partners.
6
+ x-celigo-ai-guidance:
7
+ - |-
8
+ Trading partner connectors define reusable templates for onboarding EDI trading partners.
9
+ They specify pre-configured field values and fields the user must set for connections,
10
+ exports, imports, and EDI profiles when creating a trading partner.
11
+ - |-
12
+ Each connector can define conditions (expression-based filters) that control
13
+ when certain field configurations apply.
14
+ Connectors can be published to make them available across the platform,
15
+ but publishing requires special user permissions.
16
+ servers:
17
+ - url: https://api.integrator.io
18
+ description: Production (US / default region)
19
+ - url: https://api.eu.integrator.io
20
+ description: Production (EU region)
21
+ - url: https://api.au.integrator.io
22
+ description: Production (AU region)
23
+ - url: https://api.ca.integrator.io
24
+ description: Production (CA region)
25
+ security:
26
+ - bearerAuth: []
27
+ tags:
28
+ - name: Trading Partner Connectors
29
+ description: |-
30
+ Trading partner connectors are reusable templates for onboarding EDI
31
+ trading partners. Each connector defines pre-configured field values
32
+ and fields the user must set for connections, exports, imports, and
33
+ EDI profiles.
34
+
35
+ Connectors support expression-based conditions that control when
36
+ certain field configurations apply. Publishing a connector makes it
37
+ available to all accounts but requires the
38
+ `allowedToPublishTPConnectors` permission.
39
+
40
+ ## Trading partner connector schema
41
+
42
+ {% openapi-schemas spec="tradingpartnerconnector" schemas="TradingPartnerConnector" grouped="true" %}
43
+ paths:
44
+ /v1/tpconnectors:
45
+ get:
46
+ x-internal: false
47
+ summary: List trading partner connectors
48
+ description: |-
49
+ Returns all trading partner connectors visible to the caller. Published
50
+ connectors are visible to everyone; unpublished connectors are visible
51
+ only to their owner.
52
+
53
+ The list response is a summary shape — it includes `_id`, `name`,
54
+ `_userId`, `helpURL`, timestamps, and the categorization fields (`type`,
55
+ `region`, `model`, `baseName`) when set, but omits `published` and
56
+ `supportedBy`. Use GET by ID to retrieve the full configuration.
57
+ operationId: listTradingPartnerConnectors
58
+ tags:
59
+ - Trading Partner Connectors
60
+ parameters:
61
+ - name: publishedOnly
62
+ in: query
63
+ description: When set to `true`, only published connectors are returned.
64
+ required: false
65
+ schema:
66
+ type: string
67
+ enum:
68
+ - 'true'
69
+ - 'false'
70
+ x-enumDescriptions:
71
+ 'true': Return only published connectors.
72
+ 'false': Return all connectors including unpublished ones.
73
+ examples:
74
+ - 'true'
75
+ - name: baseName
76
+ in: query
77
+ required: false
78
+ description: |-
79
+ Filter to connectors whose `baseName` exactly matches this value —
80
+ typically one trading partner's group of connector variants. Must be
81
+ supplied once; repeating the parameter returns `422
82
+ invalid_query_param`. Returns `204` when nothing matches.
83
+ schema:
84
+ type: string
85
+ examples:
86
+ - Acme Corp
87
+ - name: distinct
88
+ in: query
89
+ required: false
90
+ description: |-
91
+ Changes the response shape: instead of connector objects, returns a
92
+ sorted array of the distinct `baseName` values across **published**
93
+ connectors (unpublished connectors are excluded even for their
94
+ owner). Combine with other filters to scope the set. Returns `204`
95
+ when no published connector has a `baseName`. Any value other than
96
+ `baseName` fails with `422 invalid_query_param`
97
+ ("distinct must be 'baseName'.").
98
+ schema:
99
+ type: string
100
+ enum:
101
+ - baseName
102
+ x-enumDescriptions:
103
+ baseName: Return the distinct `baseName` values as a sorted string array.
104
+ responses:
105
+ '200':
106
+ description: |-
107
+ Successfully retrieved list of trading partner connectors. With
108
+ `?distinct=baseName` the body is instead a sorted array of strings
109
+ (the distinct `baseName` values), e.g. `["Acme Corp", "Bravo Inc"]`.
110
+ content:
111
+ application/json:
112
+ schema:
113
+ type: array
114
+ items:
115
+ $ref: '#/components/schemas/TradingPartnerConnector'
116
+ examples:
117
+ default:
118
+ value:
119
+ - _id: 66a8da952ae7e03e6e4c21ed
120
+ name: AAFES AS2
121
+ createdAt: '2024-07-30T12:20:37.904Z'
122
+ lastModified: '2026-05-04T12:21:47.361Z'
123
+ _userId: 6316f2b1e37e79778a43391c
124
+ helpURL: https://docs.celigo.com/hc/en-us/articles/39875657389595
125
+ - _id: 66a8da972a54be163b5610a5
126
+ name: AAFES FTP
127
+ createdAt: '2024-07-30T12:20:39.110Z'
128
+ lastModified: '2026-05-04T12:21:47.542Z'
129
+ _userId: 6316f2b1e37e79778a43391c
130
+ helpURL: https://docs.celigo.com/hc/en-us/articles/39875657389595
131
+ - _id: 6a55bd1004eae44075e8250e
132
+ name: Acme Corp FTP
133
+ createdAt: '2026-07-14T04:37:36.576Z'
134
+ lastModified: '2026-07-14T04:37:36.576Z'
135
+ _userId: 6316f2b1e37e79778a43391c
136
+ type: FTP
137
+ region: North America
138
+ model: Dropship
139
+ baseName: Acme Corp
140
+ '204':
141
+ description: No trading partner connectors exist, or none matches the supplied filter.
142
+ '401':
143
+ $ref: '#/components/responses/401-unauthorized'
144
+ '422':
145
+ description: |-
146
+ The `baseName` query parameter was supplied more than once (or is
147
+ otherwise not a single string), or `distinct` was set to a value
148
+ other than `baseName`.
149
+ content:
150
+ application/json:
151
+ schema:
152
+ $ref: '#/components/schemas/Error'
153
+ examples:
154
+ baseNameNotAString:
155
+ summary: Repeated baseName parameter
156
+ value:
157
+ errors:
158
+ - code: invalid_query_param
159
+ message: baseName must be a string.
160
+ post:
161
+ x-internal: false
162
+ summary: Create a trading partner connector
163
+ description: |-
164
+ Creates a new trading partner connector. Only `name` is required.
165
+ Setting `published: true` requires the
166
+ `allowedToPublishTPConnectors` permission; without it the field is
167
+ silently ignored.
168
+ x-celigo-ai-guidance:
169
+ - |-
170
+ Creates a new trading partner connector that defines reusable templates for
171
+ onboarding EDI trading partners.
172
+ - |-
173
+ The `published` flag can only be set by users with the
174
+ `allowedToPublishTPConnectors` permission.
175
+ Published connector names must be unique across all published connectors.
176
+ operationId: createTradingPartnerConnector
177
+ tags:
178
+ - Trading Partner Connectors
179
+ requestBody:
180
+ required: true
181
+ content:
182
+ application/json:
183
+ schema:
184
+ $ref: '#/components/schemas/Request'
185
+ examples:
186
+ minimal:
187
+ summary: Minimal create
188
+ value:
189
+ name: Acme Corp FTP
190
+ categorized:
191
+ summary: Create with categorization fields
192
+ value:
193
+ name: Acme Corp FTP
194
+ type: FTP
195
+ region: North America
196
+ model: Dropship
197
+ baseName: Acme Corp
198
+ with-supportedBy:
199
+ summary: With connection template
200
+ value:
201
+ name: Acme Corp FTP
202
+ helpURL: https://docs.celigo.com/hc/en-us/articles/12345
203
+ supportedBy:
204
+ connection:
205
+ preConfiguredFields:
206
+ - path: type
207
+ values:
208
+ - ftp
209
+ - path: ftp.type
210
+ values:
211
+ - sftp
212
+ fieldsUserMustSet:
213
+ - path: name
214
+ - path: ftp.username
215
+ - path: ftp.password
216
+ - path: ftp.hostURI
217
+ inputType: uri
218
+ export:
219
+ preConfiguredFields:
220
+ - path: file.type
221
+ values:
222
+ - filedefinition
223
+ fieldsUserMustSet:
224
+ - path: name
225
+ import:
226
+ preConfiguredFields:
227
+ - path: file.type
228
+ values:
229
+ - filedefinition
230
+ fieldsUserMustSet:
231
+ - path: name
232
+ ediProfile:
233
+ preConfiguredFields:
234
+ - path: fileType
235
+ values:
236
+ - edix12
237
+ fieldsUserMustSet:
238
+ - path: myInterchangeId
239
+ - path: myGroupId
240
+ responses:
241
+ '201':
242
+ description: Trading partner connector created successfully.
243
+ content:
244
+ application/json:
245
+ schema:
246
+ $ref: '#/components/schemas/TradingPartnerConnector'
247
+ examples:
248
+ default:
249
+ value:
250
+ _id: 6a07d850f8b91b72d73fd4ab
251
+ _userId: 5c9d42dad46d11272527e301
252
+ name: Acme Corp FTP
253
+ published: false
254
+ region: North America
255
+ model: none
256
+ createdAt: '2026-05-16T02:37:04.403Z'
257
+ lastModified: '2026-05-16T02:37:04.403Z'
258
+ '400':
259
+ $ref: '#/components/responses/400-bad-request'
260
+ '401':
261
+ $ref: '#/components/responses/401-unauthorized'
262
+ '422':
263
+ $ref: '#/components/responses/422-unprocessable-entity'
264
+ /v1/tpconnectors/{_id}:
265
+ get:
266
+ x-internal: false
267
+ summary: Get a trading partner connector
268
+ description: |-
269
+ Returns the complete configuration of a trading partner connector,
270
+ including all `supportedBy` sections. Unpublished connectors are
271
+ only visible to their owner. The list endpoint returns a summary
272
+ that omits `published` and `supportedBy`.
273
+ x-celigo-ai-guidance:
274
+ - |-
275
+ Returns the complete configuration of a specific trading partner connector,
276
+ including all supportedBy sections with conditions, pre-configured fields,
277
+ and fields the user must set.
278
+ - |-
279
+ For the dedicated list/get endpoints,
280
+ only published connectors are returned unless the requesting user owns the connector.
281
+ operationId: getTradingPartnerConnectorById
282
+ tags:
283
+ - Trading Partner Connectors
284
+ parameters:
285
+ - name: _id
286
+ in: path
287
+ description: The unique identifier of the trading partner connector.
288
+ required: true
289
+ schema:
290
+ type: string
291
+ format: objectId
292
+ x-celigo-refModel: tradingpartnerconnectors
293
+ examples:
294
+ - 5f8d43a1b9e5a80011a35f2c
295
+ responses:
296
+ '200':
297
+ description: Trading partner connector retrieved successfully.
298
+ content:
299
+ application/json:
300
+ schema:
301
+ $ref: '#/components/schemas/TradingPartnerConnector'
302
+ examples:
303
+ default:
304
+ value:
305
+ _id: 66a8da972a54be163b5610a5
306
+ _userId: 6316f2b1e37e79778a43391c
307
+ name: AAFES FTP
308
+ published: true
309
+ helpURL: https://docs.celigo.com/hc/en-us/articles/39875657389595
310
+ createdAt: '2024-07-30T12:20:39.110Z'
311
+ lastModified: '2026-05-04T12:21:47.542Z'
312
+ supportedBy:
313
+ connection:
314
+ preConfiguredFields:
315
+ - path: type
316
+ values:
317
+ - ftp
318
+ - path: ftp.type
319
+ values:
320
+ - sftp
321
+ fieldsUserMustSet:
322
+ - path: name
323
+ - path: ftp.username
324
+ - path: ftp.password
325
+ - path: ftp.hostURI
326
+ values:
327
+ - ' '
328
+ export:
329
+ preConfiguredFields:
330
+ - path: file.type
331
+ values:
332
+ - filedefinition
333
+ fieldsUserMustSet:
334
+ - path: name
335
+ - path: ftp.directoryPath
336
+ import:
337
+ preConfiguredFields:
338
+ - path: file.type
339
+ values:
340
+ - filedefinition
341
+ fieldsUserMustSet:
342
+ - path: name
343
+ - path: ftp.directoryPath
344
+ ediProfile:
345
+ preConfiguredFields:
346
+ - path: fileType
347
+ values:
348
+ - edix12
349
+ - path: tpInterchangeId
350
+ values:
351
+ - 001695568GP
352
+ - path: tpGroupId
353
+ values:
354
+ - 001695568GP
355
+ fieldsUserMustSet:
356
+ - path: myInterchangeId
357
+ - path: myGroupId
358
+ '401':
359
+ $ref: '#/components/responses/401-unauthorized'
360
+ '404':
361
+ $ref: '#/components/responses/404-not-found'
362
+ put:
363
+ x-internal: false
364
+ summary: Update a trading partner connector
365
+ description: |-
366
+ Replaces a trading partner connector. This is a full replace and an
367
+ upsert -- if no connector exists for the given ID, one is created.
368
+ When `published` is set to `true`, the `supportedBy` sections are
369
+ validated for required fields.
370
+ x-celigo-ai-guidance:
371
+ - |-
372
+ Updates an existing trading partner connector with the provided configuration.
373
+ This endpoint can also create a connector if no document exists for the given ID.
374
+ - |-
375
+ When `published` is set to true,
376
+ validation is enforced on the `supportedBy` sections to ensure all required
377
+ fields are present for connection,
378
+ export, import, and EDI profile configurations.
379
+ operationId: updateTradingPartnerConnector
380
+ tags:
381
+ - Trading Partner Connectors
382
+ parameters:
383
+ - name: _id
384
+ in: path
385
+ description: The unique identifier of the trading partner connector.
386
+ required: true
387
+ schema:
388
+ type: string
389
+ format: objectId
390
+ x-celigo-refModel: tradingpartnerconnectors
391
+ examples:
392
+ - 5f8d43a1b9e5a80011a35f2c
393
+ requestBody:
394
+ required: true
395
+ content:
396
+ application/json:
397
+ schema:
398
+ $ref: '#/components/schemas/Request'
399
+ examples:
400
+ update-name:
401
+ summary: Rename connector
402
+ value:
403
+ name: Acme Corp SFTP (updated)
404
+ helpURL: https://docs.celigo.com/hc/en-us/articles/12345
405
+ add-connection-template:
406
+ summary: Add connection template
407
+ value:
408
+ name: Acme Corp SFTP
409
+ supportedBy:
410
+ connection:
411
+ preConfiguredFields:
412
+ - path: type
413
+ values:
414
+ - ftp
415
+ - path: ftp.type
416
+ values:
417
+ - sftp
418
+ fieldsUserMustSet:
419
+ - path: name
420
+ - path: ftp.username
421
+ - path: ftp.password
422
+ - path: ftp.hostURI
423
+ inputType: uri
424
+ responses:
425
+ '200':
426
+ description: Trading partner connector updated successfully.
427
+ content:
428
+ application/json:
429
+ schema:
430
+ $ref: '#/components/schemas/TradingPartnerConnector'
431
+ examples:
432
+ default:
433
+ value:
434
+ _id: 6a07d850f8b91b72d73fd4ab
435
+ _userId: 5c9d42dad46d11272527e301
436
+ name: Acme Corp SFTP (updated)
437
+ published: false
438
+ helpURL: https://docs.celigo.com/hc/en-us/articles/12345
439
+ createdAt: '2026-05-16T02:37:04.403Z'
440
+ lastModified: '2026-05-16T02:40:31.064Z'
441
+ '400':
442
+ $ref: '#/components/responses/400-bad-request'
443
+ '401':
444
+ $ref: '#/components/responses/401-unauthorized'
445
+ '422':
446
+ $ref: '#/components/responses/422-unprocessable-entity'
447
+ delete:
448
+ x-internal: false
449
+ summary: Delete a trading partner connector
450
+ description: Soft-deletes a trading partner connector.
451
+ operationId: deleteTradingPartnerConnector
452
+ tags:
453
+ - Trading Partner Connectors
454
+ parameters:
455
+ - name: _id
456
+ in: path
457
+ description: The unique identifier of the trading partner connector.
458
+ required: true
459
+ schema:
460
+ type: string
461
+ format: objectId
462
+ x-celigo-refModel: tradingpartnerconnectors
463
+ examples:
464
+ - 5f8d43a1b9e5a80011a35f2c
465
+ responses:
466
+ '204':
467
+ description: Trading partner connector deleted successfully.
468
+ '401':
469
+ $ref: '#/components/responses/401-unauthorized'
470
+ '404':
471
+ $ref: '#/components/responses/404-not-found'
472
+ components:
473
+ securitySchemes:
474
+ bearerAuth:
475
+ type: http
476
+ scheme: bearer
477
+ schemas:
478
+ Filter:
479
+ type: object
480
+ description: |
481
+ Configuration for selectively processing records based on specified criteria. This object enables
482
+ precise control over which items are included or excluded from processing operations.
483
+
484
+ **Filter behavior**
485
+
486
+ When configured, the filter is applied before processing begins:
487
+ - Items that match the filter criteria are processed
488
+ - Items that don't match are completely skipped
489
+ - No partial processing is performed
490
+
491
+ **Implementation approaches**
492
+
493
+ There are two distinct filtering mechanisms available:
494
+
495
+ **Rule-Based Filtering (`type: "expression"`)**
496
+ - **Best For**: Common filtering patterns based on standard attributes
497
+ - **Capabilities**: Filter by names, values, dates, numerical ranges, text patterns
498
+ - **Advantages**: Declarative, no coding required, consistent performance
499
+ - **Configuration**: Define rules in the `expression` object
500
+ - **Use When**: You have clear, static criteria for selection
501
+
502
+ **Script-Based Filtering (`type: "script"`)**
503
+ - **Best For**: Complex logic, dynamic criteria, or business rules
504
+ - **Capabilities**: Full programmatic control, access to complete metadata
505
+ - **Advantages**: Maximum flexibility, can implement any filtering logic
506
+ - **Configuration**: Reference a script in the `script` object
507
+ - **Use When**: Simple rules aren't sufficient or logic needs to be dynamic
508
+ properties:
509
+ type:
510
+ type: string
511
+ description: |
512
+ Determines which filtering mechanism to use. This choice affects which properties
513
+ must be configured and how filtering logic is implemented.
514
+
515
+ **Available types**
516
+
517
+ **Rule-Based Filtering (`"expression"`)**
518
+ - **Required Config**: The `expression` object with rule definitions
519
+ - **Behavior**: Evaluates declarative rules against item attributes
520
+ - **Best For**: Common patterns like name matching, date ranges, value limits
521
+ - **Advantages**: Simpler to configure, no custom code required
522
+
523
+ **Script-Based Filtering (`"script"`)**
524
+ - **Required Config**: The `script` object with _scriptId and function
525
+ - **Behavior**: Executes custom JavaScript to determine which items to process
526
+ - **Best For**: Complex conditions, business logic, dynamic criteria
527
+ - **Advantages**: Maximum flexibility, can implement any logic
528
+
529
+ **Implementation guidance**
530
+
531
+ 1. For standard filtering needs (name, size, date), use `"expression"`
532
+ 2. For complex logic or conditions not covered by expressions, use `"script"`
533
+ 3. When selecting a type, you must configure the corresponding object:
534
+ - `type: "expression"` requires the `expression` object
535
+ - `type: "script"` requires the `script` object
536
+ enum:
537
+ - expression
538
+ - script
539
+ x-enumDescriptions:
540
+ expression: Rule-based filtering using declarative conditions.
541
+ script: Script-based filtering using custom JavaScript logic.
542
+ examples:
543
+ - expression
544
+ - script
545
+ expression:
546
+ type: object
547
+ description: |
548
+ Configuration for declarative rule-based filtering. This object enables filtering
549
+ items based on common attributes without requiring custom code.
550
+
551
+ **Usage context**
552
+
553
+ This object is REQUIRED when `filter.type` is set to "expression" and should not be
554
+ configured otherwise. It provides a standardized way to define filtering rules that
555
+ can match against item attributes like name, type, value, date, and other properties.
556
+
557
+ **Implementation guidance**
558
+
559
+ The expression system uses a rule-based approach where:
560
+ - Rules can be combined with AND/OR logic
561
+ - Each rule can check a specific attribute
562
+ - Multiple conditions can be applied (ranges, pattern matching, exact matches)
563
+
564
+ **Common filter patterns**
565
+
566
+ 1. **Pattern matching**: Using wildcards like `*` and `?`
567
+ 2. **Value range filtering**: Numbers between min and max values
568
+ 3. **Date range filtering**: Items created/modified within specific time ranges
569
+ 4. **Status checking**: Items with specific status values or properties
570
+
571
+ For AI agents: Rule-based filtering should be your first choice when the filtering criteria
572
+ can be expressed in terms of standard attributes. Only use script-based filtering when
573
+ more complex logic is required.
574
+ properties:
575
+ version:
576
+ type: string
577
+ description: |
578
+ Version identifier for the expression format. Currently only version "1" is supported.
579
+
580
+ This field ensures future compatibility if the expression format evolves. Always set to "1"
581
+ for current implementations.
582
+ enum:
583
+ - '1'
584
+ x-enumDescriptions:
585
+ '1': Current and only supported filter expression version.
586
+ examples:
587
+ - '1'
588
+ rules:
589
+ type: array
590
+ description: |
591
+ Expression array defining filter conditions using prefix notation. The first element is the operator,
592
+ followed by its operands which may themselves be nested expression arrays.
593
+
594
+ The rule expression follows this pattern:
595
+ - First element: Operator name (string)
596
+ - Remaining elements: Operands for that operator (values or nested expressions)
597
+
598
+ **Expression structure**
599
+
600
+ Filter expressions use a prefix notation where operators appear before their operands:
601
+ ```
602
+ [operator, operand1, operand2, ...]
603
+ ```
604
+
605
+ **Comparison Operators**
606
+ - `"equals"`: Exact match (equals)
607
+ - `"notequals"`: Not equal to value (not equals)
608
+ - `"greaterthan"`: Value is greater than specified value (is greater than)
609
+ - `"greaterthanequals"`: Value is greater than or equal to specified value (is greater than or equals)
610
+ - `"lessthan"`: Value is less than specified value (is less than)
611
+ - `"lessthanequals"`: Value is less than or equal to specified value (is less than or equals)
612
+ - `"startswith"`: String starts with specified prefix (starts with)
613
+ - `"endswith"`: String ends with specified suffix (ends with)
614
+ - `"contains"`: String contains specified substring (contains)
615
+ - `"doesnotcontain"`: String does not contain specified substring (does not contain)
616
+ - `"isempty"`: Field is empty or null (is empty)
617
+ - `"isnotempty"`: Field contains a value (is not empty)
618
+ - `"matches"`: Matches specified pattern (matches)
619
+
620
+ **Logical Operators**
621
+ - `"and"`: All conditions must be true
622
+ - `"or"`: At least one condition must be true
623
+ - `"not"`: Negates the condition
624
+
625
+ **Field Access and Type Conversion**
626
+ - `"extract"`: Access a field from the item by name
627
+ - `"settings"`: Access a custom setting from the flow, flow step, or integration configuration
628
+ - `"boolean"`: Convert value to Boolean type
629
+ - `"epochtime"`: Convert value to Epoch Time (Unix timestamp)
630
+ - `"number"`: Convert value to Number type
631
+ - `"string"`: Convert value to String type
632
+
633
+ **Field Access Details**
634
+
635
+ **Using `extract` to access record fields:**
636
+ - Retrieves values from the current record being processed
637
+ - Can access nested properties using dot notation (e.g., `"customer.email"`)
638
+ - Returns the raw field value which may need type conversion
639
+
640
+ **Using `settings` to access configuration values:**
641
+ - Retrieves values from the integration's configuration settings
642
+ - Supports different scopes with prefix notation:
643
+ - `flow.settingName`: Access flow-level settings
644
+ - `export.settingName`: Access export-level settings
645
+ - `import.settingName`: Access import-level settings
646
+ - `integration.settingName`: Access integration-level settings
647
+ - Useful for dynamic filtering based on configuration
648
+
649
+ **Field Transformations**
650
+ - `"lowercase"`: Convert string to lowercase
651
+ - `"uppercase"`: Convert string to uppercase
652
+ - `"ceiling"`: Round number up to the nearest integer
653
+ - `"floor"`: Round number down to the nearest integer
654
+ - `"abs"`: Get absolute value of a number
655
+
656
+ Type conversion operators are often necessary when comparing extracted field values against literals or when the field type doesn't match the comparison operator's expected type. For example:
657
+
658
+ ```json
659
+ [
660
+ "equals",
661
+ [
662
+ "number", // Convert to number before comparison
663
+ [
664
+ "extract",
665
+ "quantity"
666
+ ]
667
+ ],
668
+ 100
669
+ ]
670
+ ```
671
+
672
+ Example with datetime conversion:
673
+ ```json
674
+ [
675
+ "greaterthan",
676
+ [
677
+ "epochtime", // Convert to Unix timestamp before comparison
678
+ [
679
+ "extract",
680
+ "createdDate"
681
+ ]
682
+ ],
683
+ 1609459200000 // January 1, 2021 as Unix timestamp in milliseconds
684
+ ]
685
+ ```
686
+
687
+ Example with transformations:
688
+ ```json
689
+ [
690
+ "and",
691
+ [
692
+ "matches",
693
+ [
694
+ "lowercase", // Convert to lowercase before matching
695
+ [
696
+ "string",
697
+ [
698
+ "extract",
699
+ "categories"
700
+ ]
701
+ ]
702
+ ],
703
+ "netsuite"
704
+ ],
705
+ [
706
+ "notequals",
707
+ [
708
+ "string",
709
+ [
710
+ "extract",
711
+ "recurrence.pattern.type"
712
+ ]
713
+ ],
714
+ ""
715
+ ]
716
+ ]
717
+ ```
718
+
719
+ Example comparing a record field with a flow setting:
720
+ ```json
721
+ [
722
+ "equals",
723
+ [
724
+ "string",
725
+ [
726
+ "extract",
727
+ "trantype"
728
+ ]
729
+ ],
730
+ [
731
+ "string",
732
+ [
733
+ "settings",
734
+ "flow.trantype"
735
+ ]
736
+ ]
737
+ ]
738
+ ```
739
+
740
+ **Examples**
741
+
742
+ Example 1: Status field is not equal to "cancelled"
743
+ ```json
744
+ [
745
+ "notequals",
746
+ [
747
+ "extract",
748
+ "status"
749
+ ],
750
+ "cancelled"
751
+ ]
752
+ ```
753
+
754
+ Example 2: Filename starts with "HC"
755
+ ```json
756
+ [
757
+ "startswith",
758
+ [
759
+ "extract",
760
+ "filename"
761
+ ],
762
+ "HC"
763
+ ]
764
+ ```
765
+
766
+ Example 3: Amount is greater than 100
767
+ ```json
768
+ [
769
+ "greaterthan",
770
+ [
771
+ "number",
772
+ [
773
+ "extract",
774
+ "amount"
775
+ ]
776
+ ],
777
+ 100
778
+ ]
779
+ ```
780
+
781
+ Example 4: Order date is after January 1, 2023
782
+ ```json
783
+ [
784
+ "greaterthan",
785
+ [
786
+ "extract",
787
+ "orderDate"
788
+ ],
789
+ "2023-01-01T00:00:00Z"
790
+ ]
791
+ ```
792
+
793
+ Example 5: Category contains any of ["Urgent", "High Priority"]
794
+ ```json
795
+ [
796
+ "anyof",
797
+ [
798
+ "extract",
799
+ "category"
800
+ ],
801
+ ["Urgent", "High Priority"]
802
+ ]
803
+ ```
804
+ items:
805
+ oneOf:
806
+ - title: String
807
+ type: string
808
+ - title: Number
809
+ type: number
810
+ - title: Boolean
811
+ type: boolean
812
+ - title: Object
813
+ type: object
814
+ - title: Array
815
+ type: array
816
+ - title: 'Null'
817
+ type: 'null'
818
+ script:
819
+ type: object
820
+ description: |
821
+ Configuration for programmable script-based filtering. This object enables complex, custom
822
+ filtering logic beyond what expression-based filtering can provide.
823
+
824
+ **Usage context**
825
+
826
+ This object is REQUIRED when `filter.type` is set to "script" and should not be configured
827
+ otherwise. It provides a way to execute custom JavaScript code to determine which items
828
+ should be processed.
829
+
830
+ **Implementation approach**
831
+
832
+ Script-based filtering works by:
833
+ 1. Executing the specified function from the referenced script
834
+ 2. Passing item data to the function
835
+ 3. Using the function's return value (true/false) to determine inclusion
836
+
837
+ **Common use cases**
838
+
839
+ Script filtering is ideal for:
840
+ - Complex business logic that can't be expressed as simple rules
841
+ - Dynamic filtering criteria that change based on external factors
842
+ - Content-based filtering that requires deep inspection
843
+ - Advanced pattern matching beyond simple wildcards
844
+ - Multi-stage filtering with intermediate logic
845
+
846
+ For AI agents: Only use script-based filtering when expression-based filtering is insufficient.
847
+ Script filtering requires maintaining custom code, which adds complexity to the integration.
848
+ properties:
849
+ _scriptId:
850
+ type: string
851
+ x-celigo-refModel: scripts
852
+ description: |
853
+ Reference to the Script resource that contains the filtering logic. This must be a valid
854
+ ObjectId of a Script resource that exists in the system.
855
+
856
+ The referenced script must contain the function specified in the `function` field
857
+ and must be written to handle filtering specifically. The script receives
858
+ item data as its input and must return a boolean value indicating whether
859
+ to process the item (true) or skip it (false).
860
+
861
+ Format: 24-character hexadecimal string (MongoDB ObjectId)
862
+ examples:
863
+ - 60a2c4e6f321d800129a1a3c
864
+ - 5f8d43a1b9e5a80011a35f2c
865
+ function:
866
+ type: string
867
+ description: |
868
+ Name of the function within the script to execute for filtering decisions. This function
869
+ must exist in the script referenced by _scriptId.
870
+
871
+ **Function requirements**
872
+
873
+ The specified function must:
874
+ - Accept item data as its first parameter
875
+ - Return a boolean value (true to process the item, false to skip it)
876
+ - Handle errors gracefully
877
+ - Execute efficiently (as it may run for many items)
878
+
879
+ **Function signature**
880
+
881
+ ```javascript
882
+ function filterItems(itemData) {
883
+ // itemData contains properties of the item being evaluated
884
+ // Custom logic here
885
+ return true; // or false to skip the item
886
+ }
887
+ ```
888
+
889
+ For AI agents: Ensure the function name exactly matches a function defined in the
890
+ referenced script, as mismatches will cause the filter to fail.
891
+ examples:
892
+ - filterItems
893
+ - shouldProcess
894
+ - evaluateMatch
895
+ PreConfiguredField:
896
+ type: object
897
+ description: A field automatically set to a predefined value during onboarding.
898
+ x-celigo-ai-guidance:
899
+ - |-
900
+ A field that is automatically set to a predefined value during trading partner onboarding.
901
+ The `path` identifies which field on the target resource to set,
902
+ and `values` provides the value(s) to assign.
903
+ properties:
904
+ _id:
905
+ type: string
906
+ format: objectId
907
+ description: |-
908
+ Server-assigned subdocument ID, present on every stored entry.
909
+ Include it on updates to preserve entry identity.
910
+ examples:
911
+ - 6a2a623c715132b80ae5d066
912
+ path:
913
+ type: string
914
+ description: Dot-notation path of the field on the target resource.
915
+ examples:
916
+ - type
917
+ - ftp.type
918
+ - file.type
919
+ - as2.partnerId
920
+ values:
921
+ type: array
922
+ description: Value(s) to assign. Typically a single-element array.
923
+ items:
924
+ oneOf:
925
+ - title: String
926
+ type: string
927
+ - title: Number
928
+ type: number
929
+ - title: Boolean
930
+ type: boolean
931
+ - title: Object
932
+ type: object
933
+ _conditionIds:
934
+ type: array
935
+ description: Condition IDs that must be satisfied for this field to apply. If absent, always applies.
936
+ items:
937
+ type: string
938
+ format: objectId
939
+ examples:
940
+ - 5f8d43a1b9e5a80011a35f2c
941
+ FieldUserMustSet:
942
+ type: object
943
+ description: A field the user must provide during onboarding.
944
+ x-celigo-ai-guidance:
945
+ - A field that the user must provide a value for during trading partner onboarding.
946
+ properties:
947
+ _id:
948
+ type: string
949
+ format: objectId
950
+ description: |-
951
+ Server-assigned subdocument ID, present on every stored entry.
952
+ Include it on updates to preserve entry identity.
953
+ examples:
954
+ - 6a2a623c715132b80ae5d06c
955
+ path:
956
+ type: string
957
+ description: Dot-notation path of the field on the target resource.
958
+ x-celigo-ai-guidance:
959
+ - Dot-notation path of the field on the target resource that the user must set.
960
+ examples:
961
+ - name
962
+ - ftp.username
963
+ - ftp.hostURI
964
+ - ftp.directoryPath
965
+ values:
966
+ type: array
967
+ description: Optional suggested or constrained values.
968
+ items:
969
+ oneOf:
970
+ - title: String
971
+ type: string
972
+ - title: Number
973
+ type: number
974
+ - title: Boolean
975
+ type: boolean
976
+ - title: Object
977
+ type: object
978
+ _conditionIds:
979
+ type: array
980
+ description: Condition IDs that must be satisfied for this field to apply.
981
+ items:
982
+ type: string
983
+ format: objectId
984
+ examples:
985
+ - 5f8d43a1b9e5a80011a35f2c
986
+ helpURL:
987
+ type: string
988
+ format: uri
989
+ description: URL to documentation for this field.
990
+ examples:
991
+ - https://docs.celigo.com/hc/en-us
992
+ labelOverride:
993
+ type: string
994
+ description: Custom label to display in the UI instead of the default.
995
+ x-celigo-ai-guidance:
996
+ - Custom label to display for this field in the UI instead of the default
997
+ examples:
998
+ - SFTP Host
999
+ SupportedBySection:
1000
+ type: object
1001
+ description: |-
1002
+ Conditions, pre-configured field values, and fields the user must set
1003
+ for a resource type (export, import, or EDI profile) during trading
1004
+ partner onboarding.
1005
+ x-celigo-ai-guidance:
1006
+ - |-
1007
+ A section within `supportedBy` that defines conditions,
1008
+ pre-configured field values,
1009
+ and fields the user must set when creating a trading partner resource (connection,
1010
+ export, import, or EDI profile).
1011
+ - |-
1012
+ Conditions use expression-based filters to control which field configurations
1013
+ apply based on resource attributes.
1014
+ Pre-configured fields are automatically set,
1015
+ while fields the user must set require input during trading partner onboarding.
1016
+ properties:
1017
+ conditions:
1018
+ type: array
1019
+ description: |-
1020
+ Expression-based filters referenced by `_conditionIds` in
1021
+ `preConfiguredFields` and `fieldsUserMustSet`.
1022
+ x-celigo-ai-guidance:
1023
+ - |-
1024
+ Array of condition objects.
1025
+ Each condition contains an expression-based filter that can be referenced by
1026
+ `_conditionIds` in `preConfiguredFields` and `fieldsUserMustSet` to
1027
+ conditionally apply those field configurations.
1028
+ items:
1029
+ type: object
1030
+ properties:
1031
+ _id:
1032
+ type: string
1033
+ format: objectId
1034
+ description: Referenced by `_conditionIds` in field entries.
1035
+ x-celigo-ai-guidance:
1036
+ - |-
1037
+ Unique identifier for this condition,
1038
+ referenced by `_conditionIds` in field entries
1039
+ examples:
1040
+ - 5f8d43a1b9e5a80011a35f2c
1041
+ condition:
1042
+ $ref: '#/components/schemas/Filter'
1043
+ preConfiguredFields:
1044
+ type: array
1045
+ description: Fields automatically set during onboarding. Not editable by the user.
1046
+ x-celigo-ai-guidance:
1047
+ - |-
1048
+ Array of fields that are automatically set to predefined values when creating a
1049
+ trading partner resource using this connector.
1050
+ These fields are not editable by the user during onboarding.
1051
+ items:
1052
+ $ref: '#/components/schemas/PreConfiguredField'
1053
+ fieldsUserMustSet:
1054
+ type: array
1055
+ description: Fields the user must provide values for during onboarding.
1056
+ x-celigo-ai-guidance:
1057
+ - |-
1058
+ Array of fields that the user must provide values for during trading partner onboarding.
1059
+ These fields may have suggested values or constraints.
1060
+ items:
1061
+ $ref: '#/components/schemas/FieldUserMustSet'
1062
+ ConnectionFieldUserMustSet:
1063
+ type: object
1064
+ description: |-
1065
+ Connection field the user must provide during onboarding. Adds
1066
+ `inputType` to control the UI input widget.
1067
+ x-celigo-ai-guidance:
1068
+ - |-
1069
+ A field that the user must provide a value for on the connection during trading
1070
+ partner onboarding.
1071
+ Extends the base field with an `inputType` property to control the UI input widget.
1072
+ properties:
1073
+ _id:
1074
+ type: string
1075
+ format: objectId
1076
+ description: |-
1077
+ Server-assigned subdocument ID, present on every stored entry.
1078
+ Include it on updates to preserve entry identity.
1079
+ examples:
1080
+ - 6a2a623c715132b80ae5d06c
1081
+ inputType:
1082
+ type: string
1083
+ enum:
1084
+ - number
1085
+ - password
1086
+ - uri
1087
+ x-enumDescriptions:
1088
+ number: Renders a numeric input field.
1089
+ password: Renders a masked password input field.
1090
+ uri: Renders a URI input field with URL validation.
1091
+ description: UI input widget type for this field.
1092
+ x-celigo-ai-guidance:
1093
+ - |-
1094
+ The type of input widget to render in the UI for this field.
1095
+ Only applicable to connection fields.
1096
+ examples:
1097
+ - password
1098
+ - uri
1099
+ path:
1100
+ type: string
1101
+ description: Dot-notation path of the field on the connection.
1102
+ x-celigo-ai-guidance:
1103
+ - Dot-notation path of the field on the connection that the user must set.
1104
+ examples:
1105
+ - name
1106
+ - ftp.username
1107
+ - ftp.hostURI
1108
+ - ftp.password
1109
+ values:
1110
+ type: array
1111
+ description: Optional suggested or constrained values.
1112
+ items:
1113
+ oneOf:
1114
+ - title: String
1115
+ type: string
1116
+ - title: Number
1117
+ type: number
1118
+ - title: Boolean
1119
+ type: boolean
1120
+ - title: Object
1121
+ type: object
1122
+ _conditionIds:
1123
+ type: array
1124
+ description: Condition IDs that must be satisfied for this field to apply.
1125
+ items:
1126
+ type: string
1127
+ format: objectId
1128
+ examples:
1129
+ - 5f8d43a1b9e5a80011a35f2c
1130
+ helpURL:
1131
+ type: string
1132
+ format: uri
1133
+ description: URL to documentation for this field.
1134
+ examples:
1135
+ - https://docs.celigo.com/hc/en-us
1136
+ labelOverride:
1137
+ type: string
1138
+ description: Custom label to display in the UI.
1139
+ x-celigo-ai-guidance:
1140
+ - Custom label to display for this field in the UI
1141
+ examples:
1142
+ - SFTP Password
1143
+ ConnectionSupportedBySection:
1144
+ type: object
1145
+ description: |-
1146
+ Connection-specific section. Same as other `supportedBy` sections but
1147
+ `fieldsUserMustSet` entries may include `inputType` to control the UI
1148
+ input widget.
1149
+ properties:
1150
+ conditions:
1151
+ type: array
1152
+ description: Expression-based filters for the connection section.
1153
+ items:
1154
+ type: object
1155
+ properties:
1156
+ _id:
1157
+ type: string
1158
+ format: objectId
1159
+ description: Referenced by `_conditionIds` in field entries.
1160
+ x-celigo-ai-guidance:
1161
+ - Unique identifier for this condition
1162
+ examples:
1163
+ - 5f8d43a1b9e5a80011a35f2c
1164
+ condition:
1165
+ $ref: '#/components/schemas/Filter'
1166
+ preConfiguredFields:
1167
+ type: array
1168
+ description: Fields automatically set on the connection during onboarding.
1169
+ items:
1170
+ $ref: '#/components/schemas/PreConfiguredField'
1171
+ fieldsUserMustSet:
1172
+ type: array
1173
+ description: Fields the user must provide for the connection.
1174
+ x-celigo-ai-guidance:
1175
+ - |-
1176
+ Fields the user must provide for the connection.
1177
+ May include `inputType` to control the UI input widget.
1178
+ items:
1179
+ $ref: '#/components/schemas/ConnectionFieldUserMustSet'
1180
+ TradingPartnerConnectorBase:
1181
+ type: object
1182
+ description: Writable fields shared by the request and response schemas.
1183
+ properties:
1184
+ name:
1185
+ type: string
1186
+ description: Connector name. Must be unique across all published connectors.
1187
+ x-celigo-ai-guidance:
1188
+ - |-
1189
+ Name of the trading partner connector.
1190
+ Must be unique across all published connectors.
1191
+ Used to identify the connector during trading partner onboarding.
1192
+ examples:
1193
+ - AS2 EDI X12 Connector
1194
+ - SFTP EDIFACT Connector
1195
+ published:
1196
+ type: boolean
1197
+ default: false
1198
+ description: |-
1199
+ Whether this connector is published and available platform-wide.
1200
+ Requires the `allowedToPublishTPConnectors` permission — without
1201
+ it, this field is silently ignored.
1202
+ x-celigo-ai-guidance:
1203
+ - |-
1204
+ Only users with the `allowedToPublishTPConnectors` permission can set this to true.
1205
+ When publishing,
1206
+ all `supportedBy` sections are validated to ensure required fields are present.
1207
+ Published connector names must be unique.
1208
+ helpURL:
1209
+ type: string
1210
+ anyOf:
1211
+ - format: uri
1212
+ - const: ''
1213
+ description: |-
1214
+ URL to documentation for this trading partner connector. May be an
1215
+ empty string when no documentation link exists.
1216
+ examples:
1217
+ - https://docs.celigo.com/hc/en-us/articles/trading-partners
1218
+ type:
1219
+ type: string
1220
+ description: |-
1221
+ Categorizes the connector by the transport its templates configure.
1222
+ Allowed values are configured per deployment — `FTP`, `AS2`, and `S3`
1223
+ by default. Absent from responses when never set (connectors created
1224
+ before this field existed omit it).
1225
+ examples:
1226
+ - AS2
1227
+ region:
1228
+ type: string
1229
+ description: |-
1230
+ Geographic region the trading partner operates in, used to group
1231
+ connectors in the catalog. Defaults to `North America` at creation
1232
+ when omitted; allowed values are configured per deployment (`North
1233
+ America`, `European Union`, `Canada`, `USA`, and `Australia` by
1234
+ default). Connectors created before this field existed omit it.
1235
+ examples:
1236
+ - North America
1237
+ model:
1238
+ type: string
1239
+ description: |-
1240
+ Business-model variant of the trading partner relationship, such as
1241
+ `Dropship`, `Warehouse`, or `DVS`. Defaults to `none` at creation when
1242
+ omitted, meaning the connector has no business-model variant; allowed
1243
+ values are configured per deployment. Connectors created before this
1244
+ field existed omit it.
1245
+ examples:
1246
+ - Dropship
1247
+ baseName:
1248
+ type: string
1249
+ description: |-
1250
+ Shared base name that groups related connector variants for the same
1251
+ trading partner — for example, a partner's AS2 and FTP connectors.
1252
+ Only present when set. Filter the list with the `baseName` query
1253
+ parameter to retrieve one group.
1254
+ examples:
1255
+ - Acme Corp
1256
+ supportedBy:
1257
+ type: object
1258
+ description: |-
1259
+ Field configurations for each resource type involved in trading
1260
+ partner onboarding.
1261
+ x-celigo-ai-guidance:
1262
+ - |-
1263
+ Defines the field configurations for each resource type involved in trading partner onboarding.
1264
+ Each section specifies conditions, pre-configured fields,
1265
+ and fields the user must set.
1266
+ properties:
1267
+ ediProfile:
1268
+ $ref: '#/components/schemas/SupportedBySection'
1269
+ export:
1270
+ $ref: '#/components/schemas/SupportedBySection'
1271
+ import:
1272
+ $ref: '#/components/schemas/SupportedBySection'
1273
+ connection:
1274
+ $ref: '#/components/schemas/ConnectionSupportedBySection'
1275
+ ResourceResponse:
1276
+ type: object
1277
+ description: Response
1278
+ x-celigo-ai-guidance:
1279
+ - Core response fields shared by all Celigo resources
1280
+ properties:
1281
+ _id:
1282
+ type: string
1283
+ format: objectId
1284
+ readOnly: true
1285
+ description: Unique identifier for the resource. Format is a 24-character hexadecimal string.
1286
+ x-celigo-ai-guidance:
1287
+ - |-
1288
+ The _id is used in:
1289
+ - API endpoints that operate on a specific resource (e.g., GET, PUT, DELETE)
1290
+ - References from other resources (e.g., flows that use this resource)
1291
+ - Job history and error tracking
1292
+ examples:
1293
+ - 5f8d43a1b9e5a80011a35f2c
1294
+ createdAt:
1295
+ type: string
1296
+ format: date-time
1297
+ readOnly: true
1298
+ description: Timestamp when the resource was created. Set automatically and cannot be modified.
1299
+ x-celigo-ai-guidance:
1300
+ - Recorded in ISO 8601 with a UTC timezone (Z suffix).
1301
+ examples:
1302
+ - '2023-04-01T09:15:32Z'
1303
+ lastModified:
1304
+ type: string
1305
+ format: date-time
1306
+ readOnly: true
1307
+ description: Timestamp when the resource was last updated. Changes whenever any property is modified.
1308
+ x-celigo-ai-guidance:
1309
+ - Recorded in ISO 8601 with a UTC timezone (Z suffix); always equal to or later than `createdAt`.
1310
+ examples:
1311
+ - '2023-04-15T14:30:15Z'
1312
+ deletedAt:
1313
+ type:
1314
+ - string
1315
+ - 'null'
1316
+ format: date-time
1317
+ readOnly: true
1318
+ description: Timestamp when the resource was soft-deleted. When null or absent, the resource is active.
1319
+ x-celigo-ai-guidance:
1320
+ - Non-null means the resource is soft-deleted (in the recycle bin) — recoverable within the retention period before permanent removal.
1321
+ examples:
1322
+ - '2023-05-20T11:45:32Z'
1323
+ required:
1324
+ - _id
1325
+ TradingPartnerConnector:
1326
+ type: object
1327
+ required:
1328
+ - _id
1329
+ - _userId
1330
+ - name
1331
+ - createdAt
1332
+ - lastModified
1333
+ description: |-
1334
+ Trading partner connector with metadata. The list endpoint returns a
1335
+ summary shape (omits `published` and `supportedBy` but includes `type`,
1336
+ `region`, `model`, and `baseName` when set); GET by ID returns the full
1337
+ configuration.
1338
+ allOf:
1339
+ - $ref: '#/components/schemas/TradingPartnerConnectorBase'
1340
+ - $ref: '#/components/schemas/ResourceResponse'
1341
+ - type: object
1342
+ properties:
1343
+ _userId:
1344
+ type: string
1345
+ format: objectId
1346
+ readOnly: true
1347
+ x-celigo-refModel: users
1348
+ description: User who owns or created this trading partner connector.
1349
+ examples:
1350
+ - 6316f2b1e37e79778a43391c
1351
+ Error:
1352
+ type: object
1353
+ description: Standard error response envelope returned by integrator.io APIs.
1354
+ properties:
1355
+ errors:
1356
+ type: array
1357
+ description: List of errors that occurred while processing the request.
1358
+ items:
1359
+ type: object
1360
+ properties:
1361
+ code:
1362
+ oneOf:
1363
+ - type: string
1364
+ - type: integer
1365
+ description: |-
1366
+ Machine-readable error code. Usually a string like
1367
+ `invalid_ref`, `missing_required_field`, or `unauthorized`;
1368
+ may be an **integer** when the error mirrors an upstream HTTP
1369
+ status (e.g. `500`) — most commonly returned by connection-ping
1370
+ and adaptor-proxy responses.
1371
+ message:
1372
+ type: string
1373
+ description: Human-readable description of the error.
1374
+ field:
1375
+ type: string
1376
+ description: |-
1377
+ Optional pointer to the document field that caused the error.
1378
+ Used by structural validation errors (`missing_required_field`,
1379
+ `invalid_ref`) to indicate which field is at fault
1380
+ (e.g. `_id`, `type`, `http.baseURI`).
1381
+ source:
1382
+ type: string
1383
+ description: |-
1384
+ Optional origin layer for the error — e.g. `application` when
1385
+ the error came from the remote system the adaptor called,
1386
+ `connector` when the adaptor itself rejected the request.
1387
+ required:
1388
+ - message
1389
+ required:
1390
+ - errors
1391
+ Request:
1392
+ type: object
1393
+ description: |-
1394
+ Request schema for creating or updating a trading partner connector.
1395
+ Only `name` is required for creation. Connection
1396
+ `preConfiguredFields` must include a `type` path (e.g. `ftp` or
1397
+ `as2`) and export/import must include `file.type` set to
1398
+ `filedefinition` -- these are validated when `published` is `true`.
1399
+ x-celigo-ai-guidance:
1400
+ - |-
1401
+ Trading partner connectors define reusable templates for onboarding EDI trading partners.
1402
+ They specify which fields are pre-configured and which fields the user must
1403
+ provide for connections,
1404
+ exports, imports, and EDI profiles.
1405
+ - |-
1406
+ When `published` is true, the connector's `supportedBy` sections are validated
1407
+ to ensure all required fields are present. For example:
1408
+ - Connection must have a pre-configured `type` field (either "ftp" or "as2")
1409
+ - Export/import must have a pre-configured `file.type` set to "filedefinition"
1410
+ - EDI profile must have the appropriate mandatory fields for x12 or edifact
1411
+ required:
1412
+ - name
1413
+ allOf:
1414
+ - $ref: '#/components/schemas/TradingPartnerConnectorBase'
1415
+ responses:
1416
+ 401-unauthorized:
1417
+ description: |-
1418
+ Unauthorized. The request lacks a valid bearer token, or the provided token
1419
+ failed to authenticate.
1420
+
1421
+ Note: the 401 response is produced by the auth middleware **before** the
1422
+ request reaches the endpoint handler, so it does **not** follow the
1423
+ standard `{errors: [...]}` envelope. Instead the body is a bare
1424
+ `{message: string}` object with no `code`, no `errors` array. Callers
1425
+ handling 401s should key off the HTTP status and the `message` string,
1426
+ not try to destructure an `errors[]`.
1427
+ content:
1428
+ application/json:
1429
+ schema:
1430
+ type: object
1431
+ properties:
1432
+ message:
1433
+ type: string
1434
+ description: |-
1435
+ Human-readable description of the auth failure. Known values:
1436
+ - `"Unauthorized"` — no `Authorization` header on the request.
1437
+ - `"Bearer Authentication Failed"` — header present but token
1438
+ is invalid, revoked, or expired.
1439
+ required:
1440
+ - message
1441
+ examples:
1442
+ missing_token:
1443
+ summary: No Authorization header sent
1444
+ value:
1445
+ message: Unauthorized
1446
+ invalid_token:
1447
+ summary: Bearer token invalid or revoked
1448
+ value:
1449
+ message: Bearer Authentication Failed
1450
+ 400-bad-request:
1451
+ description: |
1452
+ Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
1453
+ content:
1454
+ application/json:
1455
+ schema:
1456
+ $ref: '#/components/schemas/Error'
1457
+ examples:
1458
+ default:
1459
+ value:
1460
+ errors:
1461
+ - code: invalid_request
1462
+ message: The request body failed validation.
1463
+ 422-unprocessable-entity:
1464
+ description: |
1465
+ Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.
1466
+ content:
1467
+ application/json:
1468
+ schema:
1469
+ $ref: '#/components/schemas/Error'
1470
+ examples:
1471
+ default:
1472
+ value:
1473
+ errors:
1474
+ - code: unprocessable_entity
1475
+ message: The request could not be processed due to a semantic error.
1476
+ 404-not-found:
1477
+ description: |
1478
+ Not found. The requested resource does not exist or is not visible to the caller.
1479
+ content:
1480
+ application/json:
1481
+ schema:
1482
+ $ref: '#/components/schemas/Error'
1483
+ examples:
1484
+ default:
1485
+ value:
1486
+ errors:
1487
+ - code: not_found
1488
+ message: The requested resource was not found.
1489
+ x-enable-proxy: true
1490
+ x-internal: false