Skip to content
Alpha: Odal Node is in active development. APIs, schemas and docs will change before 1.0.

Importing product data

Product data arrives the way it already exists: in spreadsheets and exports. Every row you import becomes a draft passport, checked before anything is signed.

Each product group has a CSV template: the header row the import expects.

Terminal window
odal template battery -o battery.csv

Templates and bulk import cover nine of the eleven product groups today; phones and tablets, and detergents, are still to come. The JSON Schema behind each group is available too, with odal schema show <group>.

Terminal window
odal passport import battery.csv

The CLI imports CSV, TSV or JSON files; the import service also accepts Excel workbooks. Send an import with mode=dry_run to the import endpoint to validate every row without creating anything, and get back the results the real run would produce.

The node reports problems row by row instead of rejecting the whole file, so one bad row does not hold up the rest.

Terminal window
odal passport validate # check the drafts
odal passport validate p.json # dry-run one passport body from a file
odal passport lint <id> # re-run the plausibility checks

Validation runs the product group’s schema and its sandboxed rules. Plausibility checks flag values that look unlikely; they are advisory and never block publishing.

An import creates the draft passports and a job record with each row’s validation findings; the node deletes the job record after 30 days. See What Odal can and cannot see.