Setyenv · Docs
  • English
  • Spanish
  • Chinese
  • Japanese
  • Arabic
  • German
  • French
  • Hindi
  • Indonesian
  • Italian
  • Dutch
  • Portuguese
  • Russian
  • Turkish

CSV import & export

Import records from CSV files. Supports dry-run preview, conflict resolution, and automatic field mapping.

Import endpoint

POST /pfm/v1/{entity}/import-csv (requires pfm_create_records)

Options

OptionValuesDescription
dry_runtrue/falseValidate and report without committing
has_headertrue/falseWhether the first row is a header (default: true)
ignore_unknown_columnstrue/falseSkip columns not matching fields instead of erroring
conflict_policyerror/skip/updateHow to handle duplicate rows (via unique_key)
unique_keyfield name or sys_idWhich field determines uniqueness
delimitersingle charCSV delimiter (default: ,)

Conflict policies

PolicyBehaviour
errorReport the row as an error, do not apply
skipSilently skip the row
updatePatch the existing record with imported values

Validation

  • Headers are validated against declared field names
  • Each cell is coerced through the standard field type validation pipeline
  • UTF-8 BOM is stripped, NULL bytes are stripped
  • The unique key field must be sys_id or a field with is_unique=true

Response

{
  "status": "ok",
  "data": {
    "rows_total": 150,
    "rows_inserted": 142,
    "rows_updated": 0,
    "rows_skipped": 3,
    "rows_errored": 5,
    "errors": [
      {"row": 23, "message": "Required field 'email' is empty"}
    ]
  }
}
Always do a dry run first to catch mapping and validation issues
before committing data.