Skip to main content
POST
/
v1
/
imports
/
contexts
/
{contextId}
/
sources
/
{sourceId}
/
fetch
Trigger a manual fetch-and-ingest from an external transport
curl --request POST \
  --url https://matcher.sandbox.lerian.net/v1/imports/contexts/{contextId}/sources/{sourceId}/fetch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "credentialRef": "<string>",
  "host": "<string>",
  "path": "<string>",
  "port": 32768,
  "connectOptions": {},
  "format": "<string>",
  "glob": "<string>"
}
'
{
  "files": [
    {
      "name": "<string>",
      "transactionCount": 123,
      "error": "<string>",
      "ingestionJobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer token authentication (format: "Bearer {token}")

Path Parameters

contextId
string<uuid>
required

Context ID

sourceId
string<uuid>
required

Source ID

Body

application/json
credentialRef
string
required

Opaque stored-credential reference (not a secret)

Minimum string length: 1
Example:

"cred-handle-123"

host
string
required

Remote endpoint hostname or IP

Minimum string length: 1
Example:

"sftp.bank.example"

path
string
required

Remote directory to list/fetch from

Minimum string length: 1
Example:

"outbound/returns"

port
integer<int64>
required

Remote endpoint port

Required range: 1 <= x <= 65535
Example:

22

connectOptions
object

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

format
string

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

Example:

"br/cnab240/febraban-base"

glob
string

Optional glob filter; empty fetches all

Example:

"*.ret"

kind
enum<string>

Transport kind selecting the adapter

Available options:
sftp,
https,
s3,
imap
Example:

"sftp"

Response

Accepted

files
object[] | null
required

Per-file outcomes of the fetch-and-ingest batch, in fetch order