Skip to content
Silona

Developers

Silona Connector Spec 1.0

How data from any ERP or business system, plus spreadsheets, gets into Silona on a schedule, safely. Two adapters ship today: file drop (CSV over https, the SFTP-style flow) and REST / OData. Anyone can write another adapter against this spec; it must pass the conformance suite below.

Silona connectors are built to this open spec by Silona. They are not certified by, endorsed by or partnered with any ERP vendor, and we make no such claim.

Datasets and schemas

Field names are the same for connectors, the REST API (API docs) and the column mapper. Every dataset also accepts an optional _modifiedAt timestamp. The external key decides which rows are "the same record".

Items ITEM_MASTER

schema 1.0 · key: sku + location

Required: sku, description · Optional: uom, unitCost, category, moq, orderMultiple, location

Demand history DEMAND_HISTORY

schema 1.0 · key: sku + location + date

Required: sku, date, quantity · Optional: location

On-hand inventory ON_HAND

schema 1.0 · key: sku + location

Required: sku, onHand · Optional: location, unitCost

Open purchase orders OPEN_PO

schema 1.0 · key: poNumber + line

Required: poNumber, sku, openQuantity · Optional: line, supplierCode, supplierName, orderDate, promisedDate, unitPrice, location

Lead times LEAD_TIME

schema 1.0 · key: sku + location

Required: sku, leadTimeDays · Optional: leadTimeStdDev, location, serviceLevel

Sync rules

Idempotent runs
Each run has an idempotency key: the date for the daily schedule, the file checksum for file drops, the client's Idempotency-Key header for API-triggered runs (otherwise the minute). A finished run with the same key is returned instead of running again.
Idempotent records
Every record is fingerprinted (SHA-256 of its normalized fields) under its external key. A record whose fingerprint matches the last sync is counted as unchanged and not written, so re-sending a file or replaying a page changes nothing.
Cursors and resume
The cursor returned with each batch is saved only after that batch is written. If a later page fails, the next run resumes from the last saved cursor. A run reads at most 20 pages per dataset and continues next time.
Retries with backoff
Retryable errors are retried up to 3 times with exponential backoff and jitter (about 1s, 2s, 4s). Non-retryable errors stop the dataset at once and are logged. Secrets are redacted from every log line.
Conflict handling
A conflict is the same external key twice in one batch with different values, or an update whose _modifiedAt is older than the one already applied. The connector's policy decides: NEWEST_WINS (default; uses _modifiedAt, otherwise the later row), SOURCE_WINS (always apply), or SKIP_AND_FLAG (skip and count it). Conflicts are counted and logged per run.
Validation
Records are checked against the dataset schema: required fields, numbers (thousands separators, currency symbols and trailing minus accepted) and dates (ISO 8601, MM/DD/YYYY, YYYYMMDD, OData /Date(ms)/). Invalid records are rejected with a reason; valid ones still load.
Versioned schemas
Schemas are versioned major.minor. A minor version only adds optional fields, so any 1.x batch is accepted and unknown fields are ignored. A different major version is refused with a clear error.
Health
HEALTHY after a clean run; DEGRADED after a partial run, one or two failures in a row, or a daily connector with no success for 50 hours; FAILING after three failures in a row; PAUSED when disabled. Health, last sync and the last five run logs show on Settings → Data connectors and GET /api/v1/connectors.

File drop (SFTP-style over https)

  1. Create a File drop connector in Settings → Data connectors and an API key with the write scope in Settings → Integrations.
  2. Name each export by dataset: items_*.csv, demand_*.csv (or sales_, history_), onhand_*.csv (or stock_, inventory_), po_*.csv (or purchase_), leadtime_*.csv. Or pass dataset=.
  3. Send it from your scheduler. The same file twice is recognised by checksum and not imported again.
curl -X POST "https://silona.app/api/v1/connectors/<connector id>/files?filename=onhand_20261125.csv" \
  -H "Authorization: Bearer $SILONA_API_KEY" \
  -H "Content-Type: text/csv" \
  --data-binary @onhand_20261125.csv

Or give the connector an https address per dataset (for example a pre-signed object-storage link) and Silona pulls it on the daily schedule, using ETag and checksum so an unchanged file is skipped. Private and local addresses are refused. Silona does not host an SFTP server; this flow carries the same files over https.

REST / OData

Connector API

Adapter SDK

An adapter is a small TypeScript module. It only reads from the source and returns records in spec field names; validation, change detection, conflicts, retries, writes, logs and health are handled by Silona's sync engine.

interface ConnectorAdapter {
  kind: string;            // UPPER_SNAKE, e.g. "FILE_DROP"
  label: string;
  specVersion: string;     // "1.0"
  datasets(config): SyncDataset[];
  validateConfig(config, secret): string | null;   // null = valid
  testConnection(ctx): Promise<{ ok: boolean; detail: string }>;
  fetchBatch(ctx: {
    config, secret, dataset, cursor: string | null,
    fetcher: typeof fetch, now: Date, files: DroppedFile[]
  }): Promise<{
    schemaVersion: string;           // "1.x"
    records: Record<string, unknown>[];  // spec field names (+ optional _modifiedAt)
    nextCursor: string | null;       // opaque; persisted after the batch is written
    done: boolean;                   // false = call again with nextCursor
    consumedFileIds?: string[];
    notes?: string[];
  }>;
}
// Throw ConnectorError(message, retryable) on failure:
//   retryable = true  for timeouts, HTTP 429 and 5xx
//   retryable = false for bad configuration, HTTP 401/403/404, unparseable responses

Conformance suite

runConformance(adapter, harness) runs these checks against a fake source the adapter author provides (a healthy fetcher, a 503 fetcher and a 401 fetcher). Both built-in adapters pass it in Silona's test suite on every build.