Move data in and out seamlessly
Bulk CSV import with preview and validation before persisting. Export to JSON or CSV with dimension-aware scope flattening for clean, channel-ready data files.
CSV Import
Upload rows mapped to schema attributes. Preview validates every row before committing — catch errors before they persist.
Scope Flattening
Export with a scope parameter to flatten dimension-scoped values into simple columns. Perfect for language-specific CSV feeds.
Column Mapping
Map CSV column headers to attribute aliases via columnMapping. Use "_id" to target existing records for updates.
Dual Formats
Export as application/json for API consumers or text/csv with Content-Disposition for direct file downloads.
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /import/preview |
Preview import — validate rows without persisting |
| POST | /import/execute |
Execute import — create or update records |
| GET | /export |
Export records as JSON or CSV |
POST /import/preview
Validate import data without persisting any records. Returns per-row validation results so you can review and fix errors before executing the actual import.
Request Body
| Field | Type | Description |
|---|---|---|
rows |
Record<string, string>[] |
Array of row objects. Each key is a CSV column name, each value is the cell string. |
schemaId |
string |
The schema ID to import records into. |
columnMapping |
Record<string, string> |
Maps CSV column names to attribute aliases. Use "_id" as the target to match existing records for updates. |
Example — Preview a CSV import
POST /import/execute
Execute the import, creating new records or updating existing ones. Accepts the same request body as /import/preview. When a row's columnMapping includes "_id", the importer matches existing records by ID and updates them instead of creating duplicates.
Request Body
Same schema as POST /import/preview — rows, schemaId, and columnMapping.
Example — Execute a CSV import
Example — Update existing records by ID
GET /export
Export records as JSON or CSV. When exporting as CSV with a scope parameter, dimension-scoped attribute values are flattened into simple columns — perfect for generating language- or market-specific product feeds.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
format |
"json" | "csv" |
"json" |
Output format. CSV responses include Content-Disposition: attachment. |
schemaId |
string |
— | Filter to records belonging to this schema. |
scope |
string |
— | JSON-encoded DimensionScope object for CSV flattening. Example: {"dim-language":"seg-en"} |
Example — Export as JSON
Example — Export as CSV with English scope flattening
When scope is provided, the exporter resolves each scoped attribute to a single value matching the given dimension segments. This turns multi-scope JSON arrays into flat CSV columns.