@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,1210 @@
1
+ openapi: 3.2.0
2
+ info:
3
+ version: 1.0.0
4
+ title: EDI Transactions
5
+ description: API for querying the Celigo EDI transaction log — per-document records surfaced by the B2B Manager dashboard.
6
+ servers:
7
+ - url: https://api.integrator.io
8
+ description: Production (US / default region)
9
+ - url: https://api.eu.integrator.io
10
+ description: Production (EU region)
11
+ - url: https://api.au.integrator.io
12
+ description: Production (AU region)
13
+ - url: https://api.ca.integrator.io
14
+ description: Production (CA region)
15
+ security:
16
+ - bearerAuth: []
17
+ tags:
18
+ - name: EDI Transactions
19
+ description: |-
20
+ Query the EDI transaction log surfaced by the B2B Manager dashboard.
21
+
22
+ Each record represents a single EDI document (one X12 transaction set or
23
+ one EDIFACT message) that was processed through a Celigo flow. The envelope
24
+ metadata (sender/receiver IDs, control numbers, document type, functional
25
+ acknowledgement status) is extracted during flow execution and indexed so
26
+ the B2B dashboard can render filterable activity lists.
27
+
28
+ Requires a B2B / EDI license on the account.
29
+
30
+ ## EDI transaction schema
31
+
32
+ {% openapi-schemas spec="editransaction" schemas="EDITransaction" grouped="true" %}
33
+ paths:
34
+ /v1/ediTransactions:
35
+ patch:
36
+ x-internal: false
37
+ operationId: patchEdiTransactions
38
+ tags:
39
+ - EDI Transactions
40
+ summary: Update part of an EDI transaction
41
+ description: |-
42
+ Partially updates one or more EDI transaction records. Commonly used
43
+ to update the `faStatus` field (functional acknowledgment status).
44
+
45
+ The endpoint is lenient — when the `ediTransactions` array is empty,
46
+ missing, or contains IDs that don't match any existing records, the
47
+ response is `200` with `{"ediTransactions": []}` rather than a 400.
48
+ Callers should always supply `fileType` and a non-empty
49
+ `ediTransactions` array for meaningful results.
50
+ requestBody:
51
+ required: true
52
+ content:
53
+ application/json:
54
+ schema:
55
+ type: object
56
+ required:
57
+ - ediTransactions
58
+ - fileType
59
+ properties:
60
+ ediTransactions:
61
+ type: array
62
+ items:
63
+ type: object
64
+ required:
65
+ - _id
66
+ properties:
67
+ _id:
68
+ type: string
69
+ description: EDI transaction ID to update.
70
+ examples:
71
+ - 69ca6b7a42f275a91eab88bd
72
+ faStatus:
73
+ type: string
74
+ description: |-
75
+ Functional acknowledgment status to set. Only `accepted`
76
+ and `rejected` are valid via PATCH — other values
77
+ (`inProgress`, `notApplicable`, etc.) are system-managed
78
+ and cause the record to be silently skipped.
79
+ enum:
80
+ - accepted
81
+ - rejected
82
+ x-enumDescriptions:
83
+ accepted: Mark the transaction as accepted by the trading partner's FA.
84
+ rejected: Mark the transaction as rejected by the trading partner's FA.
85
+ description: Array of partial transaction updates.
86
+ fileType:
87
+ type: string
88
+ enum:
89
+ - X12
90
+ - EDIFACT
91
+ x-enumDescriptions:
92
+ X12: ANSI X12 EDI standard.
93
+ EDIFACT: UN/EDIFACT EDI standard.
94
+ description: EDI file type.
95
+ examples:
96
+ update_fa_status:
97
+ summary: Mark a transaction as FA received
98
+ value:
99
+ fileType: X12
100
+ ediTransactions:
101
+ - _id: 69ca6b7a42f275a91eab88bd
102
+ faStatus: accepted
103
+ batch_update:
104
+ summary: Update multiple transactions
105
+ value:
106
+ fileType: X12
107
+ ediTransactions:
108
+ - _id: 69ca6b7a42f275a91eab88bd
109
+ faStatus: accepted
110
+ - _id: 69ca6b7a42f275a91eab88be
111
+ faStatus: rejected
112
+ responses:
113
+ '200':
114
+ description: Updated transaction records.
115
+ content:
116
+ application/json:
117
+ schema:
118
+ type: object
119
+ properties:
120
+ ediTransactions:
121
+ type: array
122
+ items:
123
+ $ref: '#/components/schemas/EDITransaction'
124
+ examples:
125
+ no_matches:
126
+ summary: No records matched the supplied ids — empty echo envelope
127
+ value:
128
+ ediTransactions: []
129
+ '400':
130
+ $ref: '#/components/responses/400-bad-request'
131
+ '401':
132
+ $ref: '#/components/responses/401-unauthorized'
133
+ /v1/ediTransactions/query:
134
+ post:
135
+ x-internal: false
136
+ operationId: queryEDITransactions
137
+ tags:
138
+ - EDI Transactions
139
+ summary: Query the EDI transaction log
140
+ description: |-
141
+ Returns EDI documents processed through B2B Manager flows, with envelope
142
+ metadata (sender/receiver IDs, control numbers), document type, direction,
143
+ and functional acknowledgement status. This is the data source behind the
144
+ B2B Manager "Transactions" dashboard.
145
+
146
+ Results are cursor-paginated — when more records exist beyond `limit`,
147
+ the response includes `pageToken.next`. Pass it back as `pageToken` in
148
+ the next request to get the next page. The server caps `limit` at 1000.
149
+
150
+ Use `fileType` with a dated window (`startDate`/`endDate`) to keep
151
+ result sets bounded. `faStatus` must be passed as an array when
152
+ filtering. Unknown filter fields are silently ignored. To fetch the
153
+ raw EDI file for a returned record, use
154
+ `POST /v1/jobs/{_flowJobId}/files/signedURL` with the record's
155
+ `s3Key`.
156
+ requestBody:
157
+ required: false
158
+ content:
159
+ application/json:
160
+ schema:
161
+ $ref: '#/components/schemas/EDITransactionsQueryRequest'
162
+ examples:
163
+ default_last_30d:
164
+ summary: Last 30 days of X12 transactions
165
+ value:
166
+ fileType: X12
167
+ limit: 100
168
+ startDate: 1742774400000
169
+ by_trading_partner:
170
+ summary: X12 transactions from one trading partner (by interchange sender ID)
171
+ value:
172
+ fileType: X12
173
+ interchangeSenderId: '1234567890'
174
+ limit: 100
175
+ startDate: 1742774400000
176
+ rejected_transactions:
177
+ summary: Rejected or failed transactions
178
+ value:
179
+ fileType: X12
180
+ faStatus:
181
+ - rejected
182
+ - failed
183
+ limit: 100
184
+ startDate: 1742774400000
185
+ responses:
186
+ '200':
187
+ description: |-
188
+ One page of EDI transaction records. When more records exist beyond
189
+ `limit`, `pageToken.next` is included for the next page.
190
+ `ediTransactions` is `[]` when no records match — the endpoint does
191
+ **not** return 204 on empty results.
192
+ content:
193
+ application/json:
194
+ schema:
195
+ $ref: '#/components/schemas/EDITransactionsQueryResponse'
196
+ examples:
197
+ empty:
198
+ summary: No matching transactions
199
+ value:
200
+ ediTransactions: []
201
+ x12_record:
202
+ summary: X12 850 inbound
203
+ value:
204
+ ediTransactions:
205
+ - _id: 6a0377fcbfecf34a362e9be2
206
+ _userId: 5e58483b68b52e5827d56a86
207
+ _integrationId: 66cc9b31f2be816bf9377036
208
+ _flowJobId: 6a05fe1675bab7047b42f047
209
+ fileType: X12
210
+ documentType: '850'
211
+ documentNumber: PO03302026A
212
+ direction: Inbound
213
+ faStatus: inProgress
214
+ sandbox: false
215
+ s3Key: 7588296c08f440698d9d601792aebba5
216
+ isaSenderId: '1234567890 '
217
+ isaReceiverId: 'CELIGOLABZ '
218
+ gsSenderId: '1234567890'
219
+ gsReceiverId: CELIGOLABZ
220
+ controlNumber:
221
+ interchange: '000000005'
222
+ group: '1'
223
+ transactionSet: '0004'
224
+ lastModified: '2026-05-14T16:53:44.624Z'
225
+ edifact_record:
226
+ summary: EDIFACT ORDERS inbound
227
+ value:
228
+ ediTransactions:
229
+ - _id: 69f628898c43da1347a1ca2d
230
+ _userId: 5e58483b68b52e5827d56a86
231
+ _integrationId: 66cc9b31f2be816bf9377036
232
+ _flowJobId: 6a05fdbf0f139ef519238dd7
233
+ fileType: EDIFACT
234
+ documentType: ORDERS
235
+ documentNumber: '0032560422'
236
+ direction: Inbound
237
+ faStatus: notApplicable
238
+ sandbox: false
239
+ s3Key: 873e11b6fedd42c88498dc8ed59692d5
240
+ unbSenderId: '3017581483'
241
+ unbReceiverId: '7177587895'
242
+ controlNumber:
243
+ unb: '1'
244
+ unh: '100001'
245
+ lastModified: '2026-05-14T16:52:19.677Z'
246
+ '400':
247
+ description: The request body failed validation.
248
+ content:
249
+ application/json:
250
+ schema:
251
+ $ref: '#/components/schemas/Error'
252
+ examples:
253
+ invalid_filetype:
254
+ value:
255
+ errors:
256
+ - code: invalid_filetype
257
+ message: 'fileType is invalid. fileType should be one of the following: X12, EDIFACT'
258
+ invalid_limit_value:
259
+ value:
260
+ errors:
261
+ - code: invalid_limit_value
262
+ message: limit should be between 1 & 1000 inclusive
263
+ invalid_date_range:
264
+ value:
265
+ errors:
266
+ - code: invalid_date_range
267
+ message: please provide a valid date range
268
+ '401':
269
+ $ref: '#/components/responses/401-unauthorized'
270
+ /v1/ediTransactions/{_ediTransactionId}/faDetails:
271
+ get:
272
+ x-internal: false
273
+ operationId: getEdiTransactionFaDetails
274
+ tags:
275
+ - EDI Transactions
276
+ summary: Get FA details for an EDI transaction
277
+ description: |-
278
+ Returns functional acknowledgment (FA) details for a specific EDI
279
+ transaction. FA details are only available for transactions with a
280
+ "Rejected" status in B2B Manager.
281
+ parameters:
282
+ - name: _ediTransactionId
283
+ in: path
284
+ required: true
285
+ schema:
286
+ type: string
287
+ examples:
288
+ - 6a0377fcbfecf34a362e9be2
289
+ description: The EDI transaction ID.
290
+ - name: fileType
291
+ in: query
292
+ required: true
293
+ schema:
294
+ type: string
295
+ enum:
296
+ - X12
297
+ - EDIFACT
298
+ x-enumDescriptions:
299
+ X12: ANSI X12 EDI standard.
300
+ EDIFACT: UN/EDIFACT EDI standard.
301
+ description: EDI file type.
302
+ responses:
303
+ '200':
304
+ description: FA detail envelope.
305
+ content:
306
+ application/json:
307
+ schema:
308
+ type: object
309
+ properties:
310
+ faDetails:
311
+ type: object
312
+ properties:
313
+ Interchange Control Number:
314
+ type: string
315
+ examples:
316
+ - '000000005'
317
+ Group:
318
+ type: array
319
+ items:
320
+ type: object
321
+ properties:
322
+ Group Control Number:
323
+ type: string
324
+ examples:
325
+ - '1'
326
+ Identifier Code:
327
+ type: string
328
+ examples:
329
+ - FA
330
+ Transaction:
331
+ type: array
332
+ items:
333
+ type: object
334
+ properties:
335
+ Transaction set Control Number:
336
+ type: string
337
+ examples:
338
+ - '0004'
339
+ Document Type:
340
+ type: string
341
+ examples:
342
+ - '850'
343
+ Errors:
344
+ type: array
345
+ items:
346
+ type: object
347
+ properties:
348
+ Segment ID:
349
+ type: string
350
+ examples:
351
+ - BEG
352
+ Element ID:
353
+ type: string
354
+ examples:
355
+ - BEG03
356
+ Error message:
357
+ type: string
358
+ examples:
359
+ - Mandatory data element missing
360
+ Data in error:
361
+ type: string
362
+ examples:
363
+ - REF*PO*
364
+ Segment error:
365
+ type: string
366
+ examples:
367
+ - '4'
368
+ examples:
369
+ rejected_997:
370
+ summary: 997 rejection with segment-level errors
371
+ value:
372
+ faDetails:
373
+ Interchange Control Number: '000000005'
374
+ Group:
375
+ - Group Control Number: '1'
376
+ Identifier Code: FA
377
+ Transaction:
378
+ - Transaction set Control Number: '0004'
379
+ Document Type: '850'
380
+ Errors:
381
+ - Segment ID: BEG
382
+ Element ID: BEG03
383
+ Error message: Mandatory data element missing
384
+ Data in error: ''
385
+ Segment error: '4'
386
+ '400':
387
+ description: |-
388
+ The `fileType` query parameter is present but not a valid value, or the
389
+ transaction's FA status is not `rejected` (FA details are only available
390
+ for rejected transactions).
391
+ content:
392
+ application/json:
393
+ schema:
394
+ $ref: '#/components/schemas/Error'
395
+ examples:
396
+ invalid_filetype:
397
+ summary: fileType is not X12 or EDIFACT
398
+ value:
399
+ errors:
400
+ - code: invalid_filetype
401
+ message: 'fileType is invalid. fileType should be one of the following: X12, EDIFACT'
402
+ not_rejected:
403
+ summary: Transaction is not in a rejected FA status
404
+ value:
405
+ errors:
406
+ - code: invalid_request
407
+ message: Functional Acknowledgement Details can only be retrieved for a transaction with "FA Status" as "Rejected".
408
+ '401':
409
+ $ref: '#/components/responses/401-unauthorized'
410
+ '404':
411
+ description: |-
412
+ The EDI transaction was not found, or the `fileType` query
413
+ parameter was omitted entirely (the server treats a missing
414
+ `fileType` as a lookup failure rather than a validation error).
415
+ content:
416
+ application/json:
417
+ schema:
418
+ $ref: '#/components/schemas/Error'
419
+ examples:
420
+ not_found:
421
+ value:
422
+ errors:
423
+ - code: invalid_ref
424
+ message: EdiTransaction not found.
425
+ /v1/ediTransactions/{_ediTransactionId}/mdn:
426
+ get:
427
+ x-internal: false
428
+ operationId: getEdiTransactionMdn
429
+ tags:
430
+ - EDI Transactions
431
+ summary: Get MDN details for an EDI transaction
432
+ description: |-
433
+ Returns AS2 Message Disposition Notification (MDN) metadata for a specific
434
+ EDI transaction record from the B2B Manager dashboard. The server reads the
435
+ stored MDN artifact associated with the transaction and returns its raw body
436
+ text together with a parsed disposition classification.
437
+
438
+ Get `_id` from a record returned by `POST /v1/ediTransactions/query`.
439
+ parameters:
440
+ - name: _ediTransactionId
441
+ in: path
442
+ required: true
443
+ schema:
444
+ type: string
445
+ format: objectId
446
+ examples:
447
+ - 6a0377fcbfecf34a362e9be2
448
+ description: The EDI transaction ID.
449
+ responses:
450
+ '200':
451
+ description: MDN metadata for the transaction.
452
+ content:
453
+ application/json:
454
+ schema:
455
+ $ref: '#/components/schemas/EDITransactionMdnResponse'
456
+ examples:
457
+ processed:
458
+ summary: MDN reporting successful processing
459
+ value:
460
+ mdnStatusMessage: |-
461
+ ------70B008BC93BAB50F580B205FC5CEF948
462
+ Content-Type: multipart/report;Report-Type=disposition-notification;boundary=yFK5DJ9f
463
+
464
+ --yFK5DJ9f
465
+ Content-Type: text/plain
466
+ Content-Transfer-Encoding: 7bit
467
+
468
+ The EDI message has been received successfully.
469
+ --yFK5DJ9f
470
+ Content-Type: message/disposition-notification
471
+ Content-Transfer-Encoding: 7bit
472
+
473
+ Reporting-UA: integrator.io
474
+ Original-Recipient: rfc822; partner-as2-id
475
+ Final-Recipient: rfc822; partner-as2-id
476
+ Original-Message-ID: <message-id@integrator.io>
477
+ Disposition: automatic-action/MDN-sent-automatically;processed
478
+ Received-Content-MIC: jVA1LAPZqJjQBEs/yBmHe/T3wwqMlJlh4gpLSdjO9U8=, sha256
479
+
480
+ --yFK5DJ9f--
481
+ mdnTimestamp: '2026-05-21T21:32:52.000Z'
482
+ mdnDisposition: processed
483
+ error:
484
+ summary: MDN reporting a processing error
485
+ value:
486
+ mdnStatusMessage: |-
487
+ ------A8EE28C63B41510F2EA6087D3B35403E
488
+ Content-Type: multipart/report;Report-Type=disposition-notification;boundary=lEeEqSs1
489
+
490
+ --lEeEqSs1
491
+ Content-Type: text/plain
492
+ Content-Transfer-Encoding: 7bit
493
+
494
+ There was an error receiving the EDI message. Error: AS2 decryption failed.
495
+ --lEeEqSs1
496
+ Content-Type: message/disposition-notification
497
+ Content-Transfer-Encoding: 7bit
498
+
499
+ Reporting-UA: integrator.io
500
+ Original-Recipient: rfc822; partner-as2-id
501
+ Final-Recipient: rfc822; partner-as2-id
502
+ Original-Message-ID: <message-id@integrator.io>
503
+ Disposition: automatic-action/MDN-sent-automatically;processed/error: decryption-failed
504
+
505
+ --lEeEqSs1--
506
+ mdnTimestamp: '2026-05-21T21:32:52.000Z'
507
+ mdnDisposition: error
508
+ '401':
509
+ $ref: '#/components/responses/401-unauthorized'
510
+ '404':
511
+ description: |-
512
+ The EDI transaction was not found, has no associated MDN artifact, or
513
+ the MDN artifact is no longer available in storage.
514
+ content:
515
+ application/json:
516
+ schema:
517
+ $ref: '#/components/schemas/Error'
518
+ examples:
519
+ transaction_not_found:
520
+ value:
521
+ errors:
522
+ - code: transaction_not_found_for_id
523
+ message: No transaction found for the given ID.
524
+ file_unavailable:
525
+ value:
526
+ errors:
527
+ - code: edi_transaction_file_unavailable
528
+ message: The requested file for this transaction is not available or has expired.
529
+ '500':
530
+ description: An unexpected error occurred while retrieving the MDN.
531
+ content:
532
+ application/json:
533
+ schema:
534
+ $ref: '#/components/schemas/Error'
535
+ examples:
536
+ download_error:
537
+ value:
538
+ errors:
539
+ - code: edi_file_download_error
540
+ message: An error occurred while retrieving the EDI file. Please try again later.
541
+ /v1/edi/documents/{documentNumber}/ediFile:
542
+ get:
543
+ x-internal: false
544
+ operationId: downloadEdiFile
545
+ tags:
546
+ - EDI Transactions
547
+ summary: Download an EDI file
548
+ description: |-
549
+ Downloads the raw EDI file content for a specific document number.
550
+
551
+ The `documentType` query parameter is required and must be the EDI
552
+ document type code — for X12, the numeric transaction-set ID as a
553
+ string (e.g. `850`, `810`, `856`, `997`); for EDIFACT, the UNH01
554
+ message type (e.g. `ORDERS`, `INVOIC`, `DESADV`, `CONTRL`).
555
+
556
+ The server uses `documentType` + `documentNumber` together to locate
557
+ the transaction record and return the associated raw EDI file.
558
+
559
+ Get `documentNumber` and `documentType` from a transaction record
560
+ returned by `POST /v1/ediTransactions/query`. Alternatively,
561
+ download via `POST /v1/jobs/{_flowJobId}/files/signedURL` using
562
+ the `s3Key` from the transaction record.
563
+ parameters:
564
+ - name: documentNumber
565
+ in: path
566
+ required: true
567
+ schema:
568
+ type: string
569
+ examples:
570
+ - PO03302026A
571
+ description: |-
572
+ The business document number that identifies the EDI transaction
573
+ (e.g. a purchase-order number from an 850's BEG03). Matches the
574
+ `documentNumber` field on an EDI transaction record.
575
+ - name: documentType
576
+ in: query
577
+ required: true
578
+ schema:
579
+ type: string
580
+ description: |-
581
+ The EDI document type code. For X12, this is the numeric
582
+ transaction-set ID as a string (e.g. `850`, `810`, `856`, `997`).
583
+ For EDIFACT, this is the UNH01 message type (e.g. `ORDERS`,
584
+ `INVOIC`, `DESADV`, `CONTRL`).
585
+
586
+ Values like `X12` or `EDIFACT` are **not** valid here — those
587
+ identify the EDI standard family, not the document type.
588
+ examples:
589
+ x12_850:
590
+ value: '850'
591
+ summary: X12 Purchase Order
592
+ x12_810:
593
+ value: '810'
594
+ summary: X12 Invoice
595
+ edifact_orders:
596
+ value: ORDERS
597
+ summary: EDIFACT Purchase Order
598
+ responses:
599
+ '200':
600
+ description: Raw EDI file content.
601
+ content:
602
+ text/plain:
603
+ schema:
604
+ type: string
605
+ '400':
606
+ description: The request failed validation.
607
+ content:
608
+ application/json:
609
+ schema:
610
+ $ref: '#/components/schemas/Error'
611
+ examples:
612
+ missing:
613
+ summary: documentType query parameter missing
614
+ value:
615
+ errors:
616
+ - code: document_type_required
617
+ message: The "documentType" query parameter is required to process this request.
618
+ invalid:
619
+ summary: Invalid document type value
620
+ value:
621
+ errors:
622
+ - code: edi_invalid_document_type
623
+ message: X12 is not a valid document type. Please verify the value and try again.
624
+ '401':
625
+ $ref: '#/components/responses/401-unauthorized'
626
+ '404':
627
+ description: |-
628
+ No transaction was found matching the provided document type and
629
+ document number combination.
630
+ content:
631
+ application/json:
632
+ schema:
633
+ $ref: '#/components/schemas/Error'
634
+ examples:
635
+ not_found:
636
+ value:
637
+ errors:
638
+ - code: edi_transaction_not_found
639
+ message: No transaction was found matching the provided document type and document number.
640
+ components:
641
+ securitySchemes:
642
+ bearerAuth:
643
+ type: http
644
+ scheme: bearer
645
+ schemas:
646
+ EDITransaction:
647
+ type: object
648
+ required:
649
+ - _id
650
+ - _userId
651
+ - fileType
652
+ - documentType
653
+ - direction
654
+ - faStatus
655
+ - s3Key
656
+ - lastModified
657
+ - controlNumber
658
+ description: |-
659
+ A single EDI transaction record indexed by the B2B Manager dashboard.
660
+
661
+ Represents one EDI document — one X12 transaction set (e.g. a single 850
662
+ purchase order) or one EDIFACT message (e.g. a single ORDERS message) —
663
+ processed through a Celigo flow. Envelope metadata is extracted from the
664
+ ISA/GS (X12) or UNB/UNG (EDIFACT) segments at flow execution time.
665
+ X12 and EDIFACT records share common fields (`_id`, `documentType`,
666
+ `direction`, `faStatus`, etc.) but use different field names for
667
+ sender/receiver IDs and control numbers — see individual field
668
+ descriptions.
669
+
670
+ Transaction records are retained for a license-dependent window (30, 60,
671
+ or 180 days after last modification) and then expire; expired transactions
672
+ no longer appear in query results. Unlike most resources, these records
673
+ are not soft-deleted into the recycle bin, and `createdAt` / `deletedAt`
674
+ are not returned.
675
+ properties:
676
+ _id:
677
+ type: string
678
+ format: objectId
679
+ readOnly: true
680
+ description: Unique identifier for the transaction record.
681
+ examples:
682
+ - 5f8d43a1b9e5a80011a35f2c
683
+ lastModified:
684
+ type: string
685
+ format: date-time
686
+ readOnly: true
687
+ description: |-
688
+ Timestamp when the record was last updated (e.g. by an faStatus
689
+ change). Also restarts the retention window.
690
+ examples:
691
+ - '2026-04-15T14:30:15.123Z'
692
+ _userId:
693
+ type: string
694
+ format: objectId
695
+ description: Owning account user ID.
696
+ x-celigo-refModel: users
697
+ examples:
698
+ - 5e58483b68b52e5827d56a86
699
+ _integrationId:
700
+ type: string
701
+ format: objectId
702
+ description: |-
703
+ Integration that processed this transaction. Omitted on records whose
704
+ flow ran outside an integration context.
705
+ x-celigo-refModel: integrations
706
+ examples:
707
+ - 66cc9b31f2be816bf9377036
708
+ _flowJobId:
709
+ type: string
710
+ format: objectId
711
+ description: |-
712
+ Flow-run Job ID that produced this record. Combine with `s3Key` and
713
+ `POST /v1/jobs/{_flowJobId}/files/signedURL` (body
714
+ `{ "fileIds": ["<s3Key>"] }`) to download the raw EDI file.
715
+ x-celigo-refModel: jobs
716
+ examples:
717
+ - 6a05fe1675bab7047b42f047
718
+ _faFlowJobId:
719
+ type: string
720
+ format: objectId
721
+ description: |-
722
+ Job ID of the flow run that processed the functional acknowledgement
723
+ (997 / CONTRL) for this transaction. Present only once an FA has been
724
+ received and processed.
725
+ x-celigo-refModel: jobs
726
+ examples:
727
+ - 6a05fdbf0f139ef519238dd7
728
+ fileType:
729
+ type: string
730
+ enum:
731
+ - X12
732
+ - EDIFACT
733
+ x-enumDescriptions:
734
+ X12: ANSI X12 EDI standard.
735
+ EDIFACT: UN/EDIFACT EDI standard.
736
+ description: EDI standard family of this transaction.
737
+ documentType:
738
+ type: string
739
+ description: |-
740
+ EDI document type. X12: usually the numeric transaction-set ID as a
741
+ string (`"850"`, `"810"`, `"856"`, `"997"`). EDIFACT: UNH01 message
742
+ type (`"ORDERS"`, `"INVOIC"`, `"DESADV"`, `"CONTRL"`). Not a closed
743
+ set — file definitions can supply partner-specific document codes
744
+ instead (e.g. `"PO"`, `"SH"`, `"IB"`, `"OSTRPT"`), so treat this as a
745
+ free-form label.
746
+ examples:
747
+ - '850'
748
+ documentNumber:
749
+ type: string
750
+ description: |-
751
+ Business document number extracted from the transaction set
752
+ (e.g. purchase-order number from BEG03 in an 850 / BGM02 in an
753
+ ORDERS). Omitted when the document carries no business number or the
754
+ file definition does not extract one — most functional
755
+ acknowledgements (997 / CONTRL / FA) and many status or inventory
756
+ documents. May also be an empty string.
757
+ examples:
758
+ - PO03302026A
759
+ direction:
760
+ type: string
761
+ enum:
762
+ - Inbound
763
+ - Outbound
764
+ x-enumDescriptions:
765
+ Inbound: Document received from a trading partner.
766
+ Outbound: Document sent to a trading partner.
767
+ description: Whether the document was received from or sent to a trading partner.
768
+ faStatus:
769
+ type: string
770
+ enum:
771
+ - inProgress
772
+ - notApplicable
773
+ - notReceived
774
+ - accepted
775
+ - acceptedWithErrors
776
+ - rejected
777
+ - failed
778
+ x-enumDescriptions:
779
+ inProgress: Awaiting functional acknowledgment from the trading partner.
780
+ notApplicable: No functional acknowledgment expected — the document is itself an FA, or the trading partner does not require one.
781
+ notReceived: Functional acknowledgment expected but not yet received.
782
+ accepted: Functional acknowledgment received and transaction was accepted.
783
+ acceptedWithErrors: Functional acknowledgment received with errors but transaction was accepted.
784
+ rejected: Functional acknowledgment received and transaction was rejected.
785
+ failed: Functional acknowledgment processing failed.
786
+ description: |-
787
+ Latest known functional-acknowledgement status for the transaction set.
788
+ Updates asynchronously as 997 (X12) / CONTRL (EDIFACT) acknowledgements
789
+ arrive from the trading partner, so this value may change without a
790
+ new flow run.
791
+ s3Key:
792
+ type: string
793
+ description: |-
794
+ Opaque file identifier for the raw EDI document in object storage.
795
+ The value may be a hex token or an EDI file name — treat it as
796
+ opaque, not as an S3 path or a fixed format. Combine with
797
+ `_flowJobId` and call
798
+ `POST /v1/jobs/{_flowJobId}/files/signedURL` with body
799
+ `{ "fileIds": ["<s3Key>"] }` to obtain a short-lived signed
800
+ download URL.
801
+ examples:
802
+ - 7588296c08f440698d9d601792aebba5
803
+ faS3Key:
804
+ type: string
805
+ description: |-
806
+ Opaque file identifier for the stored functional-acknowledgement
807
+ (997 / CONTRL) file. Present only once an FA has been received.
808
+ One acknowledgement file can cover many transactions, which then
809
+ share the same `faS3Key`. Download it via
810
+ `GET /v1/ediTransactions/{_ediTransactionId}/ediFile?type=fa`.
811
+ examples:
812
+ - 9a7c3e14b2af45d8bc0e6090c5be6afa
813
+ mdnStatus:
814
+ type: string
815
+ enum:
816
+ - received
817
+ - sent
818
+ x-enumDescriptions:
819
+ received: An MDN was received from the trading partner, confirming an outbound transmission.
820
+ sent: An MDN was sent to the trading partner, acknowledging an inbound transmission.
821
+ description: |-
822
+ AS2 Message Disposition Notification status. Present only on AS2
823
+ transactions. `received` appears on outbound transactions (the partner
824
+ returned an MDN); `sent` appears on inbound transactions (Celigo
825
+ returned an MDN to the partner).
826
+ mdnS3Key:
827
+ type: string
828
+ description: |-
829
+ Opaque file identifier for the stored AS2 MDN artifact. Received MDNs
830
+ (`mdnStatus: received`) use a UUID; sent MDNs store the MDN file name
831
+ or a hex token — treat the value as opaque. Present only on AS2
832
+ transactions that have an MDN. Retrieve the parsed MDN via
833
+ `GET /v1/ediTransactions/{_ediTransactionId}/mdn`.
834
+ examples:
835
+ - 70b008bc-93ba-b50f-580b-205fc5cef948
836
+ isaSenderId:
837
+ type: string
838
+ description: |-
839
+ X12 only. ISA06 Interchange Sender ID. On inbound records this is the
840
+ fixed-width 15-character value as received (space-padded); outbound
841
+ records store the configured ID unpadded. Absent on EDIFACT records
842
+ (see `unbSenderId`).
843
+ examples:
844
+ - '1234567890 '
845
+ isaReceiverId:
846
+ type: string
847
+ description: |-
848
+ X12 only. ISA08 Interchange Receiver ID. On inbound records this is
849
+ the fixed-width 15-character value as received (space-padded);
850
+ outbound records store the configured ID unpadded. Absent on EDIFACT
851
+ records (see `unbReceiverId`).
852
+ examples:
853
+ - 'CELIGOLABZ '
854
+ gsSenderId:
855
+ type: string
856
+ description: X12 only. GS02 Application Sender's Code.
857
+ examples:
858
+ - '1234567890'
859
+ gsReceiverId:
860
+ type: string
861
+ description: X12 only. GS03 Application Receiver's Code.
862
+ examples:
863
+ - CELIGOLABZ
864
+ unbSenderId:
865
+ type: string
866
+ description: |-
867
+ EDIFACT only. UNB02 sender identification. Absent on X12 records
868
+ (see `isaSenderId`).
869
+ examples:
870
+ - '3017581483'
871
+ unbReceiverId:
872
+ type: string
873
+ description: |-
874
+ EDIFACT only. UNB03 receiver identification. Absent on X12 records
875
+ (see `isaReceiverId`).
876
+ examples:
877
+ - '7177587895'
878
+ controlNumber:
879
+ type: object
880
+ description: |-
881
+ EDI control numbers extracted from the envelope. The property names
882
+ differ by `fileType`: X12 records use `interchange`, `group`, and
883
+ `transactionSet`; EDIFACT records use `unb` and `unh` (and `ung`
884
+ when a UNG group is present).
885
+ properties:
886
+ interchange:
887
+ type: string
888
+ description: X12 only. ISA13 interchange control number.
889
+ examples:
890
+ - '000000005'
891
+ group:
892
+ type: string
893
+ description: X12 only. GS06 group control number.
894
+ examples:
895
+ - '1'
896
+ transactionSet:
897
+ type: string
898
+ description: |-
899
+ X12 only. ST02 transaction-set control number. Occasionally
900
+ stored with a trailing segment terminator and/or CR (e.g.
901
+ `"0004~\r"` instead of `"0004"`) — strip trailing non-alphanumeric
902
+ characters when comparing.
903
+ examples:
904
+ - '0004'
905
+ unb:
906
+ type: string
907
+ description: EDIFACT only. UNB05 interchange control reference.
908
+ examples:
909
+ - '1'
910
+ ung:
911
+ type: string
912
+ description: |-
913
+ EDIFACT only. UNG05 group reference number. Absent when no UNG
914
+ group is present in the interchange.
915
+ examples:
916
+ - '1'
917
+ unh:
918
+ type: string
919
+ description: EDIFACT only. UNH01 message reference number.
920
+ examples:
921
+ - '100001'
922
+ Error:
923
+ type: object
924
+ description: Standard error response envelope returned by integrator.io APIs.
925
+ properties:
926
+ errors:
927
+ type: array
928
+ description: List of errors that occurred while processing the request.
929
+ items:
930
+ type: object
931
+ properties:
932
+ code:
933
+ oneOf:
934
+ - type: string
935
+ - type: integer
936
+ description: |-
937
+ Machine-readable error code. Usually a string like
938
+ `invalid_ref`, `missing_required_field`, or `unauthorized`;
939
+ may be an **integer** when the error mirrors an upstream HTTP
940
+ status (e.g. `500`) — most commonly returned by connection-ping
941
+ and adaptor-proxy responses.
942
+ message:
943
+ type: string
944
+ description: Human-readable description of the error.
945
+ field:
946
+ type: string
947
+ description: |-
948
+ Optional pointer to the document field that caused the error.
949
+ Used by structural validation errors (`missing_required_field`,
950
+ `invalid_ref`) to indicate which field is at fault
951
+ (e.g. `_id`, `type`, `http.baseURI`).
952
+ source:
953
+ type: string
954
+ description: |-
955
+ Optional origin layer for the error — e.g. `application` when
956
+ the error came from the remote system the adaptor called,
957
+ `connector` when the adaptor itself rejected the request.
958
+ required:
959
+ - message
960
+ required:
961
+ - errors
962
+ EDITransactionsQueryRequest:
963
+ type: object
964
+ description: |-
965
+ Filter for `POST /v1/ediTransactions/query`. All fields are optional.
966
+ Results are narrowed by `fileType`, `interchangeSenderId`,
967
+ `interchangeReceiverId`, `documentNumber`, `faStatus`, and the
968
+ `startDate`/`endDate` window. `direction`, `documentType`, and
969
+ `_integrationId` are accepted but not applied server-side (filter on those
970
+ client-side). Records come back newest-first by `lastModified` and are
971
+ cursor-paginated via `pageToken`.
972
+ properties:
973
+ fileType:
974
+ type: string
975
+ enum:
976
+ - X12
977
+ - EDIFACT
978
+ x-enumDescriptions:
979
+ X12: ANSI X12 EDI standard.
980
+ EDIFACT: UN/EDIFACT EDI standard.
981
+ description: |-
982
+ EDI standard family. Defaults to `X12` when omitted — set
983
+ `fileType: EDIFACT` explicitly to query EDIFACT records.
984
+ interchangeSenderId:
985
+ type: string
986
+ description: |-
987
+ Filter by interchange sender ID — exact match against the record's
988
+ `isaSenderId` (X12 ISA06). Applied server-side.
989
+ examples:
990
+ - '1234567890'
991
+ interchangeReceiverId:
992
+ type: string
993
+ description: |-
994
+ Filter by interchange receiver ID — exact match against the record's
995
+ `isaReceiverId` (X12 ISA08). Applied server-side.
996
+ examples:
997
+ - CELIGOLABZ
998
+ direction:
999
+ type: string
1000
+ enum:
1001
+ - Inbound
1002
+ - Outbound
1003
+ x-enumDescriptions:
1004
+ Inbound: Document received from a trading partner.
1005
+ Outbound: Document sent to a trading partner.
1006
+ description: |-
1007
+ Transaction direction. Accepted by the endpoint but not applied as a
1008
+ server-side filter — the result set is unaffected; filter client-side.
1009
+ documentType:
1010
+ type: string
1011
+ description: |-
1012
+ EDI document type code. For X12 this is the numeric transaction-set ID
1013
+ as a string (e.g. `"850"`, `"810"`, `"856"`, `"997"`); for EDIFACT the
1014
+ UNH01 message type (e.g. `"ORDERS"`, `"INVOIC"`, `"DESADV"`, `"CONTRL"`).
1015
+ Accepted but not applied as a server-side filter — the result set is
1016
+ unaffected; filter client-side.
1017
+ examples:
1018
+ - '850'
1019
+ documentNumber:
1020
+ type: string
1021
+ description: |-
1022
+ Business document number to filter on — matches the `documentNumber`
1023
+ field extracted from the transaction set (e.g. a purchase-order number
1024
+ from an 850's BEG03).
1025
+ examples:
1026
+ - PO03302026A
1027
+ _integrationId:
1028
+ type: string
1029
+ format: objectId
1030
+ description: |-
1031
+ Integration the transaction was processed by. Accepted but not applied
1032
+ as a server-side filter — the result set is unaffected; filter
1033
+ client-side.
1034
+ x-celigo-refModel: integrations
1035
+ examples:
1036
+ - 66cc9b31f2be816bf9377036
1037
+ faStatus:
1038
+ type: array
1039
+ items:
1040
+ type: string
1041
+ enum:
1042
+ - inProgress
1043
+ - notApplicable
1044
+ - notReceived
1045
+ - accepted
1046
+ - acceptedWithErrors
1047
+ - rejected
1048
+ - failed
1049
+ x-enumDescriptions:
1050
+ inProgress: Acknowledgment is pending from the trading partner
1051
+ notApplicable: Transaction type does not require a functional acknowledgment
1052
+ notReceived: Acknowledgment window expired without a response
1053
+ accepted: Trading partner accepted the transaction without errors
1054
+ acceptedWithErrors: Trading partner accepted but reported non-fatal errors
1055
+ rejected: Trading partner rejected the transaction entirely
1056
+ failed: Acknowledgment processing failed due to a system error
1057
+ description: |-
1058
+ Filter by functional acknowledgment status. Pass an array of one or
1059
+ more values to match. Must be an array, not a bare string. Omit to
1060
+ include all statuses.
1061
+ startDate:
1062
+ type: integer
1063
+ format: int64
1064
+ description: |-
1065
+ Lower bound of the `lastModified` window, as epoch milliseconds.
1066
+ The CLI converts ISO-8601 date strings to epoch-ms before calling.
1067
+ When omitted, the server applies an internal default window.
1068
+ examples:
1069
+ - 1742774400000
1070
+ endDate:
1071
+ type: integer
1072
+ format: int64
1073
+ description: |-
1074
+ Upper bound of the `lastModified` window, as epoch milliseconds.
1075
+ Must be greater than `startDate`.
1076
+ examples:
1077
+ - 1745452800000
1078
+ limit:
1079
+ type: integer
1080
+ minimum: 1
1081
+ maximum: 1000
1082
+ description: |-
1083
+ Maximum number of records to return per page. Server-enforced
1084
+ range is 1–1000.
1085
+ When more records exist beyond the limit, the response includes a
1086
+ `pageToken.next` cursor for the next page.
1087
+ examples:
1088
+ - 100
1089
+ pageToken:
1090
+ type: string
1091
+ description: |-
1092
+ Opaque cursor from a previous response's `pageToken.next`. Pass
1093
+ this value to retrieve the next page of results. Omit on the
1094
+ first call.
1095
+ EDITransactionsQueryResponse:
1096
+ type: object
1097
+ description: |-
1098
+ One page of EDI transaction records matching the request filter. When
1099
+ more records exist beyond the `limit`, `pageToken.next` contains an
1100
+ opaque cursor to pass back on the next request for the next page.
1101
+ properties:
1102
+ ediTransactions:
1103
+ type: array
1104
+ description: |-
1105
+ Matching EDI transaction records, newest first by `lastModified`.
1106
+ Empty array when no records match — the endpoint does not switch to
1107
+ 204 for empty results.
1108
+ items:
1109
+ $ref: '#/components/schemas/EDITransaction'
1110
+ pageToken:
1111
+ type: object
1112
+ description: |-
1113
+ Pagination cursor. Present only when more records exist beyond
1114
+ the current page. Absent on the last (or only) page.
1115
+ properties:
1116
+ next:
1117
+ type: string
1118
+ description: |-
1119
+ Opaque cursor string. Pass as `pageToken` in the next request
1120
+ body to retrieve the next page.
1121
+ EDITransactionMdnResponse:
1122
+ type: object
1123
+ description: |-
1124
+ AS2 Message Disposition Notification (MDN) metadata for an EDI transaction.
1125
+ The server reads the stored MDN artifact and returns the raw status message
1126
+ body together with a parsed disposition classification.
1127
+ properties:
1128
+ mdnStatusMessage:
1129
+ type: string
1130
+ description: |-
1131
+ Full raw MDN body text, including the MIME headers and the `Disposition:`
1132
+ line from the disposition-notification part.
1133
+ mdnTimestamp:
1134
+ type: string
1135
+ format: date-time
1136
+ description: |-
1137
+ Timestamp of the stored MDN artifact — its last-modified time when
1138
+ available, otherwise the transaction's `lastModified`.
1139
+ examples:
1140
+ - '2026-05-21T21:32:52.000Z'
1141
+ mdnDisposition:
1142
+ type: string
1143
+ enum:
1144
+ - processed
1145
+ - warning
1146
+ - error
1147
+ - failure
1148
+ x-enumDescriptions:
1149
+ processed: MDN indicates the partner processed the message successfully.
1150
+ warning: MDN reports processed with a warning modifier.
1151
+ error: MDN reports an error modifier.
1152
+ failure: MDN reports a failure modifier.
1153
+ description: |-
1154
+ Disposition classification parsed from the modifier on the `Disposition:`
1155
+ header in `mdnStatusMessage` (the status token after the disposition
1156
+ type, e.g. `processed` or `processed/error`).
1157
+ required:
1158
+ - mdnStatusMessage
1159
+ - mdnTimestamp
1160
+ - mdnDisposition
1161
+ responses:
1162
+ 400-bad-request:
1163
+ description: |
1164
+ Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
1165
+ content:
1166
+ application/json:
1167
+ schema:
1168
+ $ref: '#/components/schemas/Error'
1169
+ examples:
1170
+ default:
1171
+ value:
1172
+ errors:
1173
+ - code: invalid_request
1174
+ message: The request body failed validation.
1175
+ 401-unauthorized:
1176
+ description: |-
1177
+ Unauthorized. The request lacks a valid bearer token, or the provided token
1178
+ failed to authenticate.
1179
+
1180
+ Note: the 401 response is produced by the auth middleware **before** the
1181
+ request reaches the endpoint handler, so it does **not** follow the
1182
+ standard `{errors: [...]}` envelope. Instead the body is a bare
1183
+ `{message: string}` object with no `code`, no `errors` array. Callers
1184
+ handling 401s should key off the HTTP status and the `message` string,
1185
+ not try to destructure an `errors[]`.
1186
+ content:
1187
+ application/json:
1188
+ schema:
1189
+ type: object
1190
+ properties:
1191
+ message:
1192
+ type: string
1193
+ description: |-
1194
+ Human-readable description of the auth failure. Known values:
1195
+ - `"Unauthorized"` — no `Authorization` header on the request.
1196
+ - `"Bearer Authentication Failed"` — header present but token
1197
+ is invalid, revoked, or expired.
1198
+ required:
1199
+ - message
1200
+ examples:
1201
+ missing_token:
1202
+ summary: No Authorization header sent
1203
+ value:
1204
+ message: Unauthorized
1205
+ invalid_token:
1206
+ summary: Bearer token invalid or revoked
1207
+ value:
1208
+ message: Bearer Authentication Failed
1209
+ x-enable-proxy: true
1210
+ x-internal: false