Parse Import
const url = 'https://example.com/api/v1/import/parse';const form = new FormData();form.append('file', 'example');
const options = {method: 'POST'};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/import/parse \ --header 'Content-Type: multipart/form-data' \ --form file=exampleParse uploaded CSV/ODS file and return preview data.
routes by file extension (.csv or .ods). rejects files without a date column with 422. Per SEC-2.1: streams file in chunks to prevent memory exhaustion.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “Responses”Successful Response
Response from the /api/import/parse endpoint.
Contains the full parsed data — accounts list (column mappings) and all parsed rows. The frontend sends this back (minus total_rows) as ImportCommitRequest on commit.
detected_bank: if the file was recognised as a French bank CSV export, contains the bank name (e.g. “Crédit Agricole”). None for generic CSV/ODS.
object
Maps a spreadsheet column header to an existing or new account.
column headers are matched case-insensitively to existing account names. account_id=None means a new account will be created on commit. institution: populated from the export’s institution header row (if present). column_index: 0-based column position in the source file — uniquely identifies a column even when duplicate headers exist (e.g., two “Courant” columns with different institutions).
A single parsed data row from the spreadsheet.
date is ISO format YYYY-MM-DD (parsed from French DD/MM/YY or DD/MM/YYYY). balance is Decimal serialized as string to match backend Decimal serialization (avoids float precision issues). column_index: 0-based column position — uniquely identifies which column this row’s balance came from, enabling correct account attribution when duplicate headers exist.
object
Example
{ "accounts": [ { "is_new": false, "column_index": 0 } ], "rows": [ { "column_index": 0 } ]}Validation Error
object
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}