v1

latestOpenAPI 3.1.02026-07-263644911022.4 KB
Ingestion

Trigger a manual fetch-and-ingest from an external transport

Lists every object matching the supplied transport coordinates (SFTP today) and streams each into the trusted-content ingestion pipeline (dedup + outbox + match-trigger), returning a per-file outcome in fetch order. The tenant is resolved from the JWT and the context/source from the path — NEVER from the body. The body carries connection coordinates plus an OPAQUE credential reference, never a secret. A transport-level fetch failure (the external endpoint is unreachable or rejects the credential) returns 503; per-file intake failures are reported in the response body without failing the batch.

post/v1/imports/contexts/{contextId}/sources/{sourceId}/fetch

Path parameters

contextIdstring uuid required

Context ID

Context ID

sourceIdstring uuid required

Source ID

Source ID

Request body

connectOptionsobject

Optional non-secret transport tuning (e.g. known_hosts, user, timeout_seconds)

credentialRefstring required

Opaque stored-credential reference (not a secret)

formatstring

Fallback content-format hint applied when a fetched object declares none. Accepts the namespaced FormatDescriptor key (region/family/variant) or the legacy flat aliases (cnab240, cielo_edi, ...); both resolve through the same parser registry

globstring

Optional glob filter; empty fetches all

hoststring required

Remote endpoint hostname or IP

kind'sftp' | 'https' | 's3' | 'imap'

Transport kind selecting the adapter

pathstring required

Remote directory to list/fetch from

portinteger required

Remote endpoint port

Example request

{
  "credentialRef": "cred-handle-123",
  "format": "br/cnab240/febraban-base",
  "glob": "*.ret",
  "host": "sftp.bank.example",
  "kind": "sftp",
  "path": "outbound/returns",
  "port": 22
}

Response

Accepted

Example response

{
  "files": [
    {
      "ingestionJobId": "550e8400-e29b-41d4-a716-446655440000",
      "name": "statement-2025-06.ret",
      "transactionCount": 42
    }
  ]
}