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
| Option | Values | Description |
|---|---|---|
dry_run | true/false | Validate and report without committing |
has_header | true/false | Whether the first row is a header (default: true) |
ignore_unknown_columns | true/false | Skip columns not matching fields instead of erroring |
conflict_policy | error/skip/update | How to handle duplicate rows (via unique_key) |
unique_key | field name or sys_id | Which field determines uniqueness |
delimiter | single char | CSV delimiter (default: ,) |
Conflict policies
| Policy | Behaviour |
|---|---|
error | Report the row as an error, do not apply |
skip | Silently skip the row |
update | Patch 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_idor a field withis_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.
before committing data.