@celigo/api-specs 0.2.75 → 0.2.76

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.
@@ -1536,6 +1536,345 @@ paths:
1536
1536
  - |-
1537
1537
  Read the status as the target's, not the proxy's: a 422 or 404 with a non-invalid_ref
1538
1538
  body is the downstream system's validation result for the forwarded request.
1539
+ /v1/connections/{_id}/import:
1540
+ post:
1541
+ x-internal: false
1542
+ operationId: invokeVirtualImport
1543
+ tags:
1544
+ - Connections
1545
+ summary: Run an import document through a connection
1546
+ description: |-
1547
+ Runs an import document sent in the request body — a virtual import —
1548
+ through this connection against the supplied records and returns one
1549
+ result per record, synchronously. Nothing is saved: the document can be
1550
+ an unsaved draft, a modified copy, or a saved import as fetched (`_id`
1551
+ and metadata accepted). Each record runs the document's own pipeline —
1552
+ input filter, preMap hook, mappings, postMap hook, request, postSubmit
1553
+ hook — and the request executes against the live destination: a real
1554
+ write, not a dry run; a saved `mockResponse` does not substitute. A
1555
+ record the input filter excludes comes back `ignored`, never sent.
1556
+ Adaptors `POST /v1/imports/preview` rejects with `invalid_adaptor` run
1557
+ here — NetSuite and RDBMS verified alongside HTTP.
1558
+
1559
+ The step runs with the document's own `settings` only: hooks receive
1560
+ `options.settings` with an `import` key but no `integration` or `flow`
1561
+ key and no `_flowId` / `_integrationId`; `{{settings.integration.*}}`
1562
+ and `{{settings.flow.*}}` templates render empty. A document that reads
1563
+ integration- or flow-level settings behaves differently here than in a
1564
+ flow run, and nothing in the request supplies that context. The
1565
+ connection in the path is the one used; a `_connectionId` on the
1566
+ document is ignored.
1567
+
1568
+ `POST /v1/imports/{_id}/invoke` runs a saved import the same way with
1569
+ the same per-record shape; the read-side sibling is the virtual export,
1570
+ `POST /v1/connections/{_id}/export`.
1571
+ parameters:
1572
+ - in: path
1573
+ name: _id
1574
+ required: true
1575
+ schema:
1576
+ type: string
1577
+ format: objectId
1578
+ x-celigo-refModel: connections
1579
+ examples:
1580
+ - 6a04b5309dc296c4efb1a6e0
1581
+ description: Connection the import document runs through.
1582
+ requestBody:
1583
+ required: true
1584
+ content:
1585
+ application/json:
1586
+ schema:
1587
+ type: object
1588
+ description: The import document to run and the records to run through it.
1589
+ x-celigo-ai-guidance:
1590
+ - |-
1591
+ This executes the request against the live destination — a real write, even when the
1592
+ document carries a saved `mockResponse`. Treat it like a flow run, never like a preview.
1593
+ - |-
1594
+ The step gets the document's own settings only: hooks see `options.settings = {import}`
1595
+ with no `integration` / `flow` key and no `_flowId` / `_integrationId`, and
1596
+ `{{settings.integration.*}}` / `{{settings.flow.*}}` render empty. A step whose hooks or
1597
+ templates read those settings builds a different record here than in a flow run — do
1598
+ not send it this way.
1599
+ - |-
1600
+ NetSuite and RDBMS documents run here, where `POST /v1/imports/preview` answers
1601
+ `invalid_adaptor`. A record the input filter excludes comes back
1602
+ `{ignored: true, stage: "inputFilter"}` and was never sent; omitting `data` is a
1603
+ `400 invalid_request`.
1604
+ required:
1605
+ - import
1606
+ - data
1607
+ properties:
1608
+ import:
1609
+ type: object
1610
+ description: |-
1611
+ The import document to run (mirror of the `POST /v1/imports`
1612
+ body shape); `name` and `_connectionId` are not needed, and a
1613
+ saved import's `_id` and metadata may ride along unchanged.
1614
+ Adaptor-specific blocks (`http`, `netsuite_da`, `rdbms`, …),
1615
+ `mapping`, `filter` and `hooks` apply exactly as on a saved
1616
+ import.
1617
+ additionalProperties: true
1618
+ data:
1619
+ type: array
1620
+ description: |-
1621
+ Records to run through the document, each becoming one result.
1622
+ An empty array returns an empty array; omitting `data` is
1623
+ rejected.
1624
+ items:
1625
+ type: object
1626
+ additionalProperties: true
1627
+ additionalProperties: true
1628
+ examples:
1629
+ unsaved_http_import:
1630
+ summary: Run an unsaved HTTP import against one record
1631
+ value:
1632
+ import:
1633
+ adaptorType: HTTPImport
1634
+ mapping:
1635
+ fields:
1636
+ - extract: email
1637
+ generate: Email
1638
+ lists: []
1639
+ http:
1640
+ relativeURI:
1641
+ - /post
1642
+ method:
1643
+ - POST
1644
+ requestType:
1645
+ - CREATE
1646
+ requestMediaType: json
1647
+ successMediaType: json
1648
+ sendPostMappedData: true
1649
+ formType: http
1650
+ data:
1651
+ - email: contact@acme.com
1652
+ responses:
1653
+ '200':
1654
+ description: |-
1655
+ One result per input record, in input order — accepted, failed at
1656
+ the destination, or ignored by the document's own input filter.
1657
+ content:
1658
+ application/json:
1659
+ schema:
1660
+ type: array
1661
+ items:
1662
+ $ref: '#/components/schemas/ImportRecordResult'
1663
+ examples:
1664
+ accepted:
1665
+ summary: Record accepted — the destination's response body in _json
1666
+ value:
1667
+ - statusCode: 200
1668
+ _json:
1669
+ Email: contact@acme.com
1670
+ _headers:
1671
+ content-type: application/json; charset=utf-8
1672
+ destination_rejected:
1673
+ summary: Destination rejected the record
1674
+ value:
1675
+ - statusCode: 422
1676
+ _json: {}
1677
+ errors:
1678
+ - message: 'Failed to create, update/transform record because com.netledger.common.exceptions.NLUserError: The record type [CUSTOMRECORD_ZZ] is invalid.'
1679
+ code: javaexception
1680
+ source: application
1681
+ resolved: false
1682
+ occurredAt: 1791309460117
1683
+ stage: apiCall
1684
+ classification: missing
1685
+ ignored_by_input_filter:
1686
+ summary: Record excluded by the input filter — nothing sent
1687
+ value:
1688
+ - statusCode: 200
1689
+ _json: {}
1690
+ ignored: true
1691
+ stage: inputFilter
1692
+ '400':
1693
+ description: |-
1694
+ Request body is malformed — the top-level `import` object or the
1695
+ `data` array is missing. Returned as a bare array of error objects,
1696
+ not the standard `errors` envelope.
1697
+ content:
1698
+ application/json:
1699
+ schema:
1700
+ type: array
1701
+ items:
1702
+ type: object
1703
+ properties:
1704
+ code:
1705
+ type: string
1706
+ message:
1707
+ type: string
1708
+ examples:
1709
+ missing_import:
1710
+ value:
1711
+ - code: invalid_request
1712
+ message: Request body should contain an import object details.
1713
+ missing_data:
1714
+ value:
1715
+ - code: invalid_request
1716
+ message: Request body should contain data which is to be imported.
1717
+ '401':
1718
+ $ref: '#/components/responses/401-unauthorized'
1719
+ '422':
1720
+ description: '`invalid_ref` — `_id` is not a connection in the account.'
1721
+ content:
1722
+ application/json:
1723
+ schema:
1724
+ $ref: '#/components/schemas/Error'
1725
+ examples:
1726
+ connection_not_found:
1727
+ value:
1728
+ errors:
1729
+ - field: connection
1730
+ code: invalid_ref
1731
+ message: connection not found.
1732
+ - field: _connectionId
1733
+ code: invalid_ref
1734
+ message: a9e11dc0de1ec0de00000009 is not a valid _connectionId
1735
+ /v1/connections/{_id}/export:
1736
+ post:
1737
+ x-internal: false
1738
+ operationId: invokeVirtualExport
1739
+ tags:
1740
+ - Connections
1741
+ summary: Run an export document through a connection
1742
+ description: |-
1743
+ Runs an export document sent in the request body — a virtual export —
1744
+ through this connection against the live source and returns the fetched
1745
+ records, synchronously. Nothing is saved and no job is created: the
1746
+ document can be an unsaved draft, a modified copy of a saved export, or
1747
+ a saved export as fetched. Use it to read from a system through an
1748
+ existing connection before an export exists, or to check what a changed
1749
+ export definition would return.
1750
+
1751
+ The connection in the path is the one used; a `_connectionId` on the
1752
+ document is not needed. The read executes against the live source
1753
+ (HTTP and NetSuite RESTlet searches verified) and `dataURIs` carries,
1754
+ per record, a link to the record in the source system when the adaptor
1755
+ provides one (`null` otherwise).
1756
+
1757
+ The export-side preview surfaces, `POST /v1/exports/preview` and the
1758
+ flow-scoped `POST /v1/integrations/{_integrationId}/flows/{_flowId}/exports/preview`,
1759
+ return the same records inside a stage-by-stage envelope; prefer them
1760
+ when the export's transform or filter output matters. The write-side
1761
+ sibling is the virtual import, `POST /v1/connections/{_id}/import`.
1762
+ parameters:
1763
+ - in: path
1764
+ name: _id
1765
+ required: true
1766
+ schema:
1767
+ type: string
1768
+ format: objectId
1769
+ x-celigo-refModel: connections
1770
+ examples:
1771
+ - 6a04b5309dc296c4efb1a6e0
1772
+ description: Connection the export document runs through.
1773
+ requestBody:
1774
+ required: true
1775
+ content:
1776
+ application/json:
1777
+ schema:
1778
+ type: object
1779
+ description: The export document to run.
1780
+ required:
1781
+ - export
1782
+ properties:
1783
+ export:
1784
+ type: object
1785
+ description: |-
1786
+ The export document to run (mirror of the `POST /v1/exports`
1787
+ body shape); `name` and `_connectionId` are not needed.
1788
+ Adaptor-specific blocks (`http`, `netsuite`, `rdbms`, …) apply
1789
+ exactly as on a saved export.
1790
+ additionalProperties: true
1791
+ additionalProperties: true
1792
+ examples:
1793
+ netsuite_search:
1794
+ summary: Run an ad-hoc NetSuite search by externalid
1795
+ value:
1796
+ export:
1797
+ adaptorType: NetSuiteExport
1798
+ netsuite:
1799
+ type: restlet
1800
+ skipGrouping: true
1801
+ restlet:
1802
+ recordType: customrecord_payout_variance
1803
+ restletVersion: suitebundle
1804
+ columns:
1805
+ - name: internalid
1806
+ label: internalid
1807
+ - name: externalid
1808
+ label: externalid
1809
+ criteria:
1810
+ - field: externalid
1811
+ operator: is
1812
+ searchValue: SEED-01
1813
+ responses:
1814
+ '200':
1815
+ description: The records the source returned, with a per-record link when the adaptor provides one.
1816
+ content:
1817
+ application/json:
1818
+ schema:
1819
+ type: object
1820
+ properties:
1821
+ data:
1822
+ type: array
1823
+ description: Records fetched from the source, in the order the source returned them.
1824
+ items:
1825
+ type: object
1826
+ additionalProperties: true
1827
+ dataURIs:
1828
+ type: array
1829
+ description: |-
1830
+ One entry per record in `data`: a link to the record in the
1831
+ source system when the adaptor provides one, otherwise `null`.
1832
+ items:
1833
+ type:
1834
+ - string
1835
+ - 'null'
1836
+ additionalProperties: true
1837
+ examples:
1838
+ netsuite_rows:
1839
+ summary: NetSuite search result with record links
1840
+ value:
1841
+ data:
1842
+ - id: '1'
1843
+ recordType: customrecord_payout_variance
1844
+ internalid: '1'
1845
+ externalid: SEED-01
1846
+ dataURIs:
1847
+ - https://1234567.app.netsuite.com/app/common/custom/custrecordentry.nl?rectype=923&id=1
1848
+ '400':
1849
+ description: The top-level `export` object is missing.
1850
+ content:
1851
+ application/json:
1852
+ schema:
1853
+ $ref: '#/components/schemas/Error'
1854
+ examples:
1855
+ missing_export:
1856
+ value:
1857
+ errors:
1858
+ - code: invalid_request
1859
+ message: Request body should contain an export object details.
1860
+ '401':
1861
+ $ref: '#/components/responses/401-unauthorized'
1862
+ '422':
1863
+ description: '`invalid_ref` — `_id` is not a connection in the account.'
1864
+ content:
1865
+ application/json:
1866
+ schema:
1867
+ $ref: '#/components/schemas/Error'
1868
+ examples:
1869
+ connection_not_found:
1870
+ value:
1871
+ errors:
1872
+ - field: _connectionId
1873
+ code: invalid_ref
1874
+ message: a9e11dc0de1ec0de00000009 is not a valid _connectionId
1875
+ - field: connection
1876
+ code: invalid_ref
1877
+ message: connection not found.
1539
1878
  /v1/connections/{_id}/debug:
1540
1879
  get:
1541
1880
  x-internal: false
@@ -8806,6 +9145,82 @@ components:
8806
9145
  minItems: 1
8807
9146
  items:
8808
9147
  $ref: '#/components/schemas/JsonPatchOperation'
9148
+ ImportRecordResult:
9149
+ type: object
9150
+ description: |-
9151
+ The outcome of running one input record through an import — one element
9152
+ per record, in input order — shared by `POST /v1/imports/{_id}/invoke`
9153
+ and the virtual import `POST /v1/connections/{_id}/import`. A record the
9154
+ import itself ignored before any request carries `ignored: true` and the
9155
+ `stage` that dropped it; a record the destination accepted carries its
9156
+ parsed response; a record the destination rejected — or that the
9157
+ import's `failPath` / `failValues` rules judged a failure even on a
9158
+ `2xx` — carries `errors[]`.
9159
+ properties:
9160
+ statusCode:
9161
+ type: integer
9162
+ description: |-
9163
+ HTTP status of the record's outcome. The destination's status for an
9164
+ accepted record; `422` when the import recorded a failure for the
9165
+ record — including when the destination itself answered `200` and
9166
+ the import's `failPath` rules declared it a failure.
9167
+ _json:
9168
+ type: object
9169
+ description: |-
9170
+ The destination's parsed response body for the record — the slice
9171
+ under the import's `response.resourcePath` when one is defined — not
9172
+ the record that was sent. `{}` when the record was ignored or the
9173
+ destination returned no usable body.
9174
+ additionalProperties: true
9175
+ _headers:
9176
+ type: object
9177
+ description: Response headers the destination returned for the record.
9178
+ additionalProperties: true
9179
+ ignored:
9180
+ type: boolean
9181
+ description: |-
9182
+ When true, the import dropped the record before sending anything and
9183
+ `stage` names the gate; the destination was not called for it.
9184
+ stage:
9185
+ type: string
9186
+ description: |-
9187
+ The import stage that ignored the record — `inputFilter` when the
9188
+ import's own input filter excluded it. Present only with `ignored`.
9189
+ examples:
9190
+ - inputFilter
9191
+ errors:
9192
+ type: array
9193
+ description: |-
9194
+ Errors recorded for the record. `source: application` with
9195
+ `stage: apiCall` means the request reached the destination and its
9196
+ answer was the failure; the destination's response body rides in
9197
+ `message`.
9198
+ items:
9199
+ type: object
9200
+ properties:
9201
+ source:
9202
+ type: string
9203
+ code:
9204
+ oneOf:
9205
+ - type: string
9206
+ - type: integer
9207
+ description: |-
9208
+ The adaptor's error code, or the destination's HTTP status as
9209
+ an integer when the import's `failPath` rules turned a
9210
+ successful-looking response into a failure.
9211
+ message:
9212
+ type: string
9213
+ resolved:
9214
+ type: boolean
9215
+ occurredAt:
9216
+ type: integer
9217
+ format: int64
9218
+ stage:
9219
+ type: string
9220
+ classification:
9221
+ type: string
9222
+ additionalProperties: true
9223
+ additionalProperties: true
8809
9224
  ConnectionMetadataRequest:
8810
9225
  type: object
8811
9226
  description: |-
package/dist/flow.yml CHANGED
@@ -3762,23 +3762,33 @@ paths:
3762
3762
  summary: Preview the output of a flow's page processor
3763
3763
  description: |-
3764
3764
  Runs a flow's page generators and page processors through the preview
3765
- pipeline and returns the record arriving at a specific page-processor
3766
- node, with the whole upstream chain applied server-side: the source
3767
- export executes live (its transform, output filter, and preSavePage
3768
- hook are applied), router branch filters and step input filters gate
3769
- the records, upstream lookups execute live unless a saved `mockOutput`
3770
- is present (a saved mock always wins), and upstream imports are NEVER
3771
- executed — each substitutes its saved `mockResponse`, or a platform
3772
- placeholder when none is saved, before its response mapping and
3773
- postResponseMap hook run. A target IMPORT obeys its map entry's
3774
- options flag: `{preview: true}` composes the request and returns it
3775
- without sending, while `{sendAndPreview: true}` (the import
3776
- editor's "Send" button) executes it against the live destination —
3777
- a real write. A target LOOKUP executes its live query
3778
- (even when it carries a saved `mockOutput` — the mock substitutes
3779
- only when the lookup is upstream of the target). With
3780
- `includeStages: false` the response is the bare result object
3781
- rather than the `{data, stages}` envelope.
3765
+ pipeline and returns the record arriving at one page-processor node,
3766
+ with the upstream chain applied server-side. A target IMPORT obeys its
3767
+ map entry's options flag: `{preview: true}` composes the request
3768
+ without sending; `{sendAndPreview: true}` (the import editor's "Send"
3769
+ button) executes it against the live destination — a real write — and
3770
+ stops at the parsed response (the target's postSubmit hook does not
3771
+ run). Both composing modes serve HTTP import targets only: a NetSuite,
3772
+ Salesforce, RDBMS or FTP target answers `422 no_data_available` ("You
3773
+ must add at least one mock input record…") whatever records the chain
3774
+ delivers — the generic "no record reached the target", not a data
3775
+ problem; execute such a step as a virtual import instead
3776
+ (`POST /v1/connections/{_id}/import`). No options flag returns the
3777
+ arriving record for any adaptor without touching the target.
3778
+
3779
+ Upstream behavior: the source export executes live (transform, output
3780
+ filter and preSavePage hook applied); router branch filters and step
3781
+ input filters gate the records; upstream lookups execute live unless a
3782
+ saved `mockOutput` is present (a saved mock always wins); upstream
3783
+ imports are NEVER executed — each substitutes its saved `mockResponse`,
3784
+ or a platform placeholder when none is saved, before its response
3785
+ mapping and postResponseMap hook run. A target LOOKUP executes its
3786
+ live query even when it carries a saved `mockOutput` (the mock
3787
+ substitutes only upstream). When a target import's `failPath` rules
3788
+ judge the destination's answer a failure, the response is `422` whose
3789
+ `errors[]` carry `source: application` and `stage: apiCall` — the
3790
+ request did execute. With `includeStages: false` the response is the
3791
+ bare result object rather than the `{data, stages}` envelope.
3782
3792
 
3783
3793
  Body carries the flow shape plus resolved maps of page-generator and
3784
3794
  page-processor docs keyed by `_id`. The server uses those maps as the
@@ -3824,8 +3834,8 @@ paths:
3824
3834
  6508ab8b20b16404da729c64:
3825
3835
  doc:
3826
3836
  _id: 6508ab8b20b16404da729c64
3827
- name: Upsert NetSuite Customers
3828
- adaptorType: NetSuiteImport
3837
+ name: Upsert customers in the destination API
3838
+ adaptorType: HTTPImport
3829
3839
  options:
3830
3840
  preview: true
3831
3841
  includeStages: true
@@ -3878,6 +3888,39 @@ paths:
3878
3888
  message: 'The pageGenerator doc corresponding to the _id: is not found in the given pageGeneratorMap.'
3879
3889
  '401':
3880
3890
  $ref: '#/components/responses/401-unauthorized'
3891
+ '422':
3892
+ description: |-
3893
+ Two distinct meanings, told apart by `errors[].source`:
3894
+ `no_data_available` with `source: integrator` — no record reached
3895
+ the target in a composing mode (the target is a NetSuite,
3896
+ Salesforce, RDBMS or FTP import, which these modes cannot drive, or
3897
+ the chain's gates dropped every record); `source: application` with
3898
+ `stage: apiCall` after `sendAndPreview` — the request DID execute
3899
+ and the target import's `failPath` rules judged the destination's
3900
+ answer a failure; `message` carries the destination's response body
3901
+ and `code` its HTTP status.
3902
+ content:
3903
+ application/json:
3904
+ schema:
3905
+ $ref: '#/components/schemas/Error'
3906
+ examples:
3907
+ noRecordReachedTarget:
3908
+ summary: Composing mode on a non-HTTP target, or every record gated out
3909
+ value:
3910
+ errors:
3911
+ - code: no_data_available
3912
+ source: integrator
3913
+ message: You must add at least one mock input record. If you still get this error after adding an input record, verify that your current mapping configuration isn't ignoring all record output. Mock input records must pass through the input filter and hooks to qualify for Preview and Send.
3914
+ failPathTripped:
3915
+ summary: sendAndPreview executed; the target's failPath rules judged the 200 a failure
3916
+ description: |-
3917
+ The live error also carries `stage: apiCall`, `classification`,
3918
+ `resolved` and `occurredAt` beside the fields shown.
3919
+ value:
3920
+ errors:
3921
+ - code: 200
3922
+ source: application
3923
+ message: '{"args":{},"json":{"FirstName":"FAILME"}}'
3881
3924
  /v1/flows/{_id}/dependencies:
3882
3925
  get:
3883
3926
  x-internal: false
@@ -7691,6 +7734,17 @@ components:
7691
7734
  Flow-page-processor preview request. Carries the flow shape plus
7692
7735
  side-loaded maps of page-generator and page-processor docs so the
7693
7736
  preview engine can run without reading the persisted flow doc.
7737
+ x-celigo-ai-guidance:
7738
+ - |-
7739
+ The target import's `{preview: true}` / `{sendAndPreview: true}` composing modes serve HTTP
7740
+ import targets only: a NetSuite, Salesforce, RDBMS or FTP target answers `422
7741
+ no_data_available` whatever records the chain delivers — not a data problem. Execute such a
7742
+ step as a virtual import (`POST /v1/connections/{_id}/import`) instead; with no options flag
7743
+ this call still returns the arriving record for any adaptor.
7744
+ - |-
7745
+ A `422` whose `errors[]` carry `source: application` and `stage: apiCall` after
7746
+ `sendAndPreview` means the request DID execute and the target's `failPath` rules judged the
7747
+ destination's answer a failure — a completed send, not a request-validation error.
7694
7748
  properties:
7695
7749
  flow:
7696
7750
  type: object
@@ -7761,10 +7815,12 @@ components:
7761
7815
  the mock input the editor's "Mock input" pane would provide.
7762
7816
  Upstream entries carry `{}`.
7763
7817
  Request composition is adaptor-gated: the `preview`/`sendAndPreview`
7764
- modes work for HTTP, REST, and GraphQL import targets — RDBMS-family
7765
- import targets fail with `no_data_available` regardless of supplied
7766
- input (database imports have no request-preview surface; only the
7767
- no-flag input-data preview works for them).
7818
+ modes work for HTTP, REST, and GraphQL import targets — a NetSuite,
7819
+ Salesforce, RDBMS or FTP import target fails with
7820
+ `422 no_data_available` regardless of supplied input (those
7821
+ adaptors have no request-preview surface; only the no-flag
7822
+ input-data preview works for them, and the virtual import
7823
+ `POST /v1/connections/{_id}/import` executes them).
7768
7824
  additionalProperties:
7769
7825
  type: object
7770
7826
  properties:
@@ -7778,7 +7834,8 @@ components:
7778
7834
  64a1234567890abcdef12345:
7779
7835
  doc:
7780
7836
  _id: 64a1234567890abcdef12345
7781
- name: Import Orders to NetSuite
7837
+ name: Create orders in the destination API
7838
+ adaptorType: HTTPImport
7782
7839
  _connectionId: 5f7c579b6411271af4e7cefb
7783
7840
  options:
7784
7841
  preview: true
package/dist/import.yml CHANGED
@@ -533,16 +533,27 @@ paths:
533
533
  data records and returns per-record results synchronously.
534
534
 
535
535
  The request body should contain a `data` array of records to import. Each
536
- record is processed through the import's mappings, transformations, and
537
- hooks before being sent to the destination.
538
-
539
- The response is an **array** of per-record result objects, each containing
540
- a `statusCode`, the transformed `_json` payload, and any `errors`
541
- encountered during processing. This endpoint writes to the destination
542
- system — and so does `POST /v1/imports/preview` (verified to execute the
543
- composed request), so neither is a dry run against a production
544
- destination. A 200 response may still contain per-record failures in
545
- each element's `errors` array.
536
+ record is processed through the import's input filter, mappings, hooks
537
+ (preMap, postMap, postSubmit) and transformations before being sent to
538
+ the destination; a record the input filter excludes comes back `ignored`
539
+ and is never sent.
540
+
541
+ The response is an **array** of per-record result objects — `statusCode`,
542
+ the destination's parsed response body as `_json`, `errors` when the
543
+ record failed. This endpoint writes to the destination system — and so
544
+ does `POST /v1/imports/preview` (verified to execute the composed
545
+ request), so neither is a dry run against a production destination. A
546
+ 200 response may still contain per-record failures in each element's
547
+ `errors` array. Every import adaptor runs here (HTTP, NetSuite, RDBMS,
548
+ FTP verified), including the ones `POST /v1/imports/preview` rejects with
549
+ `invalid_adaptor`. For a file import the 200 reflects the file being
550
+ composed, not delivered — an FTP import against an unreachable host
551
+ still returns `{name, fileLocation}`.
552
+
553
+ The import must be saved; to run an import definition that is not saved
554
+ (or a modified copy of one), use the virtual import
555
+ `POST /v1/connections/{_id}/import`, which takes the import document in
556
+ the body and returns the same per-record results.
546
557
  parameters:
547
558
  - in: path
548
559
  name: _id
@@ -579,45 +590,25 @@ paths:
579
590
  responses:
580
591
  '200':
581
592
  description: |-
582
- Import completed. Returns a per-record result array. Each element
583
- contains the `statusCode` from the destination, the transformed
584
- `_json` payload, and any `errors` encountered.
593
+ Import completed. One result per input record, in input order —
594
+ accepted, failed at the destination, or ignored by the import's own
595
+ input filter.
585
596
  content:
586
597
  application/json:
587
598
  schema:
588
599
  type: array
589
600
  items:
590
- type: object
591
- properties:
592
- statusCode:
593
- type: integer
594
- description: HTTP status code from the destination system
595
- _json:
596
- type: object
597
- description: The transformed record as sent to the destination
598
- additionalProperties: true
599
- errors:
600
- type: array
601
- description: Errors encountered processing this record
602
- items:
603
- type: object
604
- properties:
605
- source:
606
- type: string
607
- code:
608
- type: string
609
- message:
610
- type: string
611
- resolved:
612
- type: boolean
613
- occurredAt:
614
- type: integer
615
- format: int64
616
- stage:
617
- type: string
618
- classification:
619
- type: string
601
+ $ref: '#/components/schemas/ImportRecordResult'
620
602
  examples:
603
+ accepted:
604
+ summary: Record accepted — the destination's response body in _json
605
+ value:
606
+ - statusCode: 200
607
+ _json:
608
+ id: 0031U00001AbCdEQAV
609
+ success: true
610
+ _headers:
611
+ content-type: application/json; charset=utf-8
621
612
  destination_error:
622
613
  summary: Record failed at destination
623
614
  value:
@@ -631,6 +622,13 @@ paths:
631
622
  occurredAt: 1777645680144
632
623
  stage: apiCall
633
624
  classification: value
625
+ ignored_by_input_filter:
626
+ summary: Record excluded by the import's input filter — nothing sent
627
+ value:
628
+ - statusCode: 200
629
+ _json: {}
630
+ ignored: true
631
+ stage: inputFilter
634
632
  '401':
635
633
  $ref: '#/components/responses/401-unauthorized'
636
634
  '404':
@@ -780,10 +778,14 @@ paths:
780
778
  '422':
781
779
  description: |-
782
780
  Request body is malformed — most commonly the top-level `import`
783
- object is missing — or the adaptor type is unsupported: RDBMS-family
784
- imports are rejected with `invalid_adaptor` ("Import preview is not
785
- supported for adaptor type: RDBMSImport"); database imports have no
786
- request-preview surface anywhere (the SQL editor's Handlebars
781
+ object is missing — or the adaptor type is unsupported: NetSuite,
782
+ Salesforce, RDBMS and FTP imports are rejected with `invalid_adaptor`
783
+ ("Import preview is not supported for adaptor type: <adaptorType>")
784
+ before any connection is resolved, while HTTP-family and AI-agent
785
+ imports preview normally. The rejected adaptors execute through the
786
+ virtual import, `POST /v1/connections/{_id}/import`, which runs the
787
+ document for real and returns per-record results; database imports
788
+ have no compose-only surface anywhere (the SQL editor's Handlebars
787
789
  evaluation is their only preview). Structural validation returns the
788
790
  standard errors envelope.
789
791
  content:
@@ -801,6 +803,11 @@ paths:
801
803
  errors:
802
804
  - code: invalid_adaptor
803
805
  message: 'Import preview is not supported for adaptor type: RDBMSImport.'
806
+ netsuite_unsupported:
807
+ value:
808
+ errors:
809
+ - code: invalid_adaptor
810
+ message: 'Import preview is not supported for adaptor type: NetSuiteDistributedImport.'
804
811
  /v1/netsuiteDA/previewImportMappingFields:
805
812
  put:
806
813
  x-internal: false
@@ -16663,6 +16670,82 @@ components:
16663
16670
  description: The stack id associated with the resource, or null if no stack is involved.
16664
16671
  examples:
16665
16672
  - 5f8d43a1b9e5a80011a35f2c
16673
+ ImportRecordResult:
16674
+ type: object
16675
+ description: |-
16676
+ The outcome of running one input record through an import — one element
16677
+ per record, in input order — shared by `POST /v1/imports/{_id}/invoke`
16678
+ and the virtual import `POST /v1/connections/{_id}/import`. A record the
16679
+ import itself ignored before any request carries `ignored: true` and the
16680
+ `stage` that dropped it; a record the destination accepted carries its
16681
+ parsed response; a record the destination rejected — or that the
16682
+ import's `failPath` / `failValues` rules judged a failure even on a
16683
+ `2xx` — carries `errors[]`.
16684
+ properties:
16685
+ statusCode:
16686
+ type: integer
16687
+ description: |-
16688
+ HTTP status of the record's outcome. The destination's status for an
16689
+ accepted record; `422` when the import recorded a failure for the
16690
+ record — including when the destination itself answered `200` and
16691
+ the import's `failPath` rules declared it a failure.
16692
+ _json:
16693
+ type: object
16694
+ description: |-
16695
+ The destination's parsed response body for the record — the slice
16696
+ under the import's `response.resourcePath` when one is defined — not
16697
+ the record that was sent. `{}` when the record was ignored or the
16698
+ destination returned no usable body.
16699
+ additionalProperties: true
16700
+ _headers:
16701
+ type: object
16702
+ description: Response headers the destination returned for the record.
16703
+ additionalProperties: true
16704
+ ignored:
16705
+ type: boolean
16706
+ description: |-
16707
+ When true, the import dropped the record before sending anything and
16708
+ `stage` names the gate; the destination was not called for it.
16709
+ stage:
16710
+ type: string
16711
+ description: |-
16712
+ The import stage that ignored the record — `inputFilter` when the
16713
+ import's own input filter excluded it. Present only with `ignored`.
16714
+ examples:
16715
+ - inputFilter
16716
+ errors:
16717
+ type: array
16718
+ description: |-
16719
+ Errors recorded for the record. `source: application` with
16720
+ `stage: apiCall` means the request reached the destination and its
16721
+ answer was the failure; the destination's response body rides in
16722
+ `message`.
16723
+ items:
16724
+ type: object
16725
+ properties:
16726
+ source:
16727
+ type: string
16728
+ code:
16729
+ oneOf:
16730
+ - type: string
16731
+ - type: integer
16732
+ description: |-
16733
+ The adaptor's error code, or the destination's HTTP status as
16734
+ an integer when the import's `failPath` rules turned a
16735
+ successful-looking response into a failure.
16736
+ message:
16737
+ type: string
16738
+ resolved:
16739
+ type: boolean
16740
+ occurredAt:
16741
+ type: integer
16742
+ format: int64
16743
+ stage:
16744
+ type: string
16745
+ classification:
16746
+ type: string
16747
+ additionalProperties: true
16748
+ additionalProperties: true
16666
16749
  ImportPreviewResponse:
16667
16750
  type: object
16668
16751
  description: |-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celigo/api-specs",
3
- "version": "0.2.75",
3
+ "version": "0.2.76",
4
4
  "private": false,
5
5
  "description": "Public OpenAPI bundles (dist/) and the celigo-cli lint schema pack (schemas.json).",
6
6
  "keywords": [
package/schemas.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "provenance": {
3
3
  "repo": "celigo/integrator-api-specs",
4
- "iasCommit": "25001a3",
4
+ "iasCommit": "1d2dcf0",
5
5
  "generatedAt": "2026-10-06"
6
6
  },
7
7
  "roots": {